You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3950 lines
119 KiB
Plaintext

11 months ago
unit u_op_apply;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, bsSkinCtrls, ExtCtrls, DB, ADODB, dxExEdtr, dxCntner, dxTL,
dxDBCtrl, dxDBGrid, ComCtrls, bsSkinTabs, RxLookup, StdCtrls, Mask,
DBCtrls, wwdbdatetimepicker, wwdblook, u_op_sate, u_fee, u_op_card, Menus,
dxDBTLCl, dxGrClms, bsdbctrls, XPMenu, wwdbedit, Wwdotdot, Wwdbcomb,shellapi,
DBCtrlsEh;
type
Tfrm_op_apply = class(TForm)
Panel2: TPanel;
bsSkinButton7: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinButton1: TbsSkinButton;
bsSkinButton11: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinButton38: TbsSkinButton;
Notebook1: TNotebook;
t_op_seae: TADOQuery;
t_op_seae1: TDataSource;
dxDBGrid1: TdxDBGrid;
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
bsSkinTabSheet2: TbsSkinTabSheet;
bsSkinTabSheet3: TbsSkinTabSheet;
bsSkinPanel1: TbsSkinPanel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label5: TLabel;
Label4: TLabel;
Label65: TLabel;
DBEdit1: TDBEdit;
DBEdit2: TDBEdit;
DBEdit3: TDBEdit;
DBEdit4: TDBEdit;
RxDBLookupCombo1: TRxDBLookupCombo;
DBEdit18: TDBEdit;
fra_op_state1: Tfra_op_state;
fra_fee1: Tfra_fee;
bsSkinTabSheet4: TbsSkinTabSheet;
fra_op_card1: Tfra_op_card;
t_ch_fee: TADOQuery;
PopupMenu3: TPopupMenu;
N37: TMenuItem;
N38: TMenuItem;
N62: TMenuItem;
N25: TMenuItem;
N64: TMenuItem;
N63: TMenuItem;
N17: TMenuItem;
N18: TMenuItem;
N34: TMenuItem;
N35: TMenuItem;
N36: TMenuItem;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
dxDBGrid1Column4: TdxDBGridDateColumn;
dxDBGrid1Column5: TdxDBGridMaskColumn;
dxDBGrid1Column6: TdxDBGridMaskColumn;
dxDBGrid1Column7: TdxDBGridMaskColumn;
dxDBGrid1Column8: TdxDBGridMaskColumn;
dxDBGrid1Column9: TdxDBGridMaskColumn;
dxDBGrid1Column12: TdxDBGridDateColumn;
dxDBGrid1Column15: TdxDBGridMaskColumn;
dxDBGrid1Column16: TdxDBGridMaskColumn;
dxDBGrid1Column18: TdxDBGridMaskColumn;
dxDBGrid1Column19: TdxDBGridDateColumn;
dxDBGrid1Column20: TdxDBGridMaskColumn;
dxDBGrid1Column21: TdxDBGridMaskColumn;
dxDBGrid1Column22: TdxDBGridMaskColumn;
dxDBGrid1Column24: TdxDBGridMaskColumn;
dxDBGrid1Column25: TdxDBGridCheckColumn;
dxDBGrid1Column26: TdxDBGridCheckColumn;
dxDBGrid1Column27: TdxDBGridCheckColumn;
dxDBGrid1Column28: TdxDBGridDateColumn;
dxDBGrid1Column29: TdxDBGridMaskColumn;
dxDBGrid1Column30: TdxDBGridMaskColumn;
dxDBGrid1Column31: TdxDBGridMaskColumn;
dxDBGrid1Column32: TdxDBGridMaskColumn;
dxDBGrid1Column33: TdxDBGridMaskColumn;
dxDBGrid1Column34: TdxDBGridMaskColumn;
dxDBGrid1Column37: TdxDBGridCheckColumn;
dxDBGrid1Column38: TdxDBGridDateColumn;
dxDBGrid1Column39: TdxDBGridMaskColumn;
dxDBGrid1Column40: TdxDBGridMaskColumn;
dxDBGrid1Column41: TdxDBGridMaskColumn;
dxDBGrid1Column42: TdxDBGridMaskColumn;
dxDBGrid1Column43: TdxDBGridMaskColumn;
dxDBGrid1Column44: TdxDBGridMaskColumn;
dxDBGrid1Column45: TdxDBGridMaskColumn;
dxDBGrid1Column46: TdxDBGridMaskColumn;
dxDBGrid1Column48: TdxDBGridDateColumn;
dxDBGrid1Column49: TdxDBGridDateColumn;
dxDBGrid1Column50: TdxDBGridMaskColumn;
dxDBGrid1Column51: TdxDBGridDateColumn;
dxDBGrid1Column52: TdxDBGridDateColumn;
dxDBGrid1Column53: TdxDBGridDateColumn;
dxDBGrid1Column54: TdxDBGridDateColumn;
dxDBGrid1Column55: TdxDBGridMaskColumn;
dxDBGrid1Column56: TdxDBGridMaskColumn;
dxDBGrid1Column57: TdxDBGridMaskColumn;
dxDBGrid1Column17: TdxDBGridColumn;
dxDBGrid1Column47: TdxDBGridColumn;
XPMenu1: TXPMenu;
PopupMenu2: TPopupMenu;
N10: TMenuItem;
N11: TMenuItem;
N14: TMenuItem;
N13: TMenuItem;
N12: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
bsSkinPanel2: TbsSkinPanel;
Label45: TLabel;
Label47: TLabel;
Label48: TLabel;
Label49: TLabel;
Label50: TLabel;
Label51: TLabel;
wwDBDateTimePicker9: TwwDBDateTimePicker;
wwDBDateTimePicker11: TwwDBDateTimePicker;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
wwDBDateTimePicker12: TwwDBDateTimePicker;
Label52: TLabel;
wwDBDateTimePicker13: TwwDBDateTimePicker;
Label53: TLabel;
Label54: TLabel;
RxDBLookupCombo2: TRxDBLookupCombo;
Label56: TLabel;
RxDBLookupCombo5: TRxDBLookupCombo;
Label57: TLabel;
Label58: TLabel;
Edit5: TEdit;
Edit6: TEdit;
bsSkinButton8: TbsSkinButton;
bsSkinButton12: TbsSkinButton;
bsSkinButton13: TbsSkinButton;
dxDBGrid1Column58: TdxDBGridColumn;
dxDBGrid1Column59: TdxDBGridColumn;
dxDBGrid1Column60: TdxDBGridColumn;
dxDBGrid1Column61: TdxDBGridColumn;
dxDBGrid1Column62: TdxDBGridColumn;
dxDBGrid1Column63: TdxDBGridColumn;
t_op_seae_danwei: TADOQuery;
t_op_seae_danwei1: TDataSource;
bsSkinButton14: TbsSkinButton;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
dxDBGrid1Column64: TdxDBGridColumn;
wwDBComboBox3: TwwDBComboBox;
Label62: TLabel;
Notebook2: TNotebook;
bsSkinPanel3: TbsSkinPanel;
Label125: TLabel;
Label126: TLabel;
Label15: TLabel;
Label7: TLabel;
Label124: TLabel;
Label73: TLabel;
Label19: TLabel;
Label20: TLabel;
Label42: TLabel;
Label16: TLabel;
Label6: TLabel;
Label8: TLabel;
Label10: TLabel;
Label11: TLabel;
Label12: TLabel;
Label13: TLabel;
Label14: TLabel;
Label18: TLabel;
Label21: TLabel;
Label22: TLabel;
Label23: TLabel;
Label24: TLabel;
Label25: TLabel;
Label26: TLabel;
Label164: TLabel;
Label27: TLabel;
Label165: TLabel;
Label166: TLabel;
Label167: TLabel;
Label28: TLabel;
Label29: TLabel;
Label30: TLabel;
Label31: TLabel;
Label32: TLabel;
Label33: TLabel;
Label34: TLabel;
Label35: TLabel;
Label39: TLabel;
Label40: TLabel;
Label41: TLabel;
Label43: TLabel;
Label44: TLabel;
Label55: TLabel;
Label46: TLabel;
Label59: TLabel;
Label36: TLabel;
Label17: TLabel;
Label9: TLabel;
wwDBLookupCombo49: TwwDBLookupCombo;
DBEdit63: TDBEdit;
wwDBDateTimePicker2: TwwDBDateTimePicker;
wwDBLookupCombo3: TwwDBLookupCombo;
wwDBLookupCombo52: TwwDBLookupCombo;
RxDBLookupCombo20: TRxDBLookupCombo;
RxDBLookupCombo12: TRxDBLookupCombo;
RxDBLookupCombo29: TRxDBLookupCombo;
RxDBLookupCombo30: TRxDBLookupCombo;
RxDBLookupCombo14: TRxDBLookupCombo;
DBEdit5: TDBEdit;
DBEdit6: TDBEdit;
DBEdit11: TDBEdit;
DBEdit12: TDBEdit;
DBEdit13: TDBEdit;
DBEdit14: TDBEdit;
DBEdit15: TDBEdit;
DBEdit16: TDBEdit;
DBEdit17: TDBEdit;
DBEdit19: TDBEdit;
wwDBDateTimePicker1: TwwDBDateTimePicker;
wwDBDateTimePicker3: TwwDBDateTimePicker;
DBMemo39: TDBMemo;
DBMemo2: TDBMemo;
DBMemo40: TDBMemo;
DBMemo41: TDBMemo;
DBMemo42: TDBMemo;
DBMemo1: TDBMemo;
DBEdit81: TDBEdit;
wwDBLookupCombo61: TwwDBLookupCombo;
DBEdit20: TDBEdit;
DBEdit21: TDBEdit;
DBEdit22: TDBEdit;
wwDBDateTimePicker4: TwwDBDateTimePicker;
wwDBDateTimePicker5: TwwDBDateTimePicker;
wwDBDateTimePicker6: TwwDBDateTimePicker;
wwDBDateTimePicker7: TwwDBDateTimePicker;
wwDBDateTimePicker8: TwwDBDateTimePicker;
DBEdit23: TDBEdit;
DBMemo3: TDBMemo;
bsSkinDBCheckRadioBox1: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox2: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox3: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox7: TbsSkinDBCheckRadioBox;
wwDBDateTimePicker10: TwwDBDateTimePicker;
RxDBLookupCombo7: TRxDBLookupCombo;
DBEdit7: TDBEdit;
DBEdit24: TDBEdit;
Button1: TButton;
Button2: TButton;
RxDBLookupCombo4: TRxDBLookupCombo;
RxDBLookupCombo13: TRxDBLookupCombo;
RxDBLookupCombo3: TRxDBLookupCombo;
Label133: TLabel;
DBEdit41: TDBEdit;
Label37: TLabel;
DBEdit8: TDBEdit;
bsSkinSpeedButton1: TbsSkinSpeedButton;
Label38: TLabel;
DBEdit9: TDBEdit;
Label60: TLabel;
DBEdit10: TDBEdit;
t_op_seai1: TDataSource;
t_op_seai: TADOQuery;
bsSkinPanel4: TbsSkinPanel;
Label63: TLabel;
Label64: TLabel;
Label66: TLabel;
Label67: TLabel;
Label68: TLabel;
Label69: TLabel;
Label70: TLabel;
Label71: TLabel;
Label72: TLabel;
Label74: TLabel;
Label75: TLabel;
Label76: TLabel;
Label77: TLabel;
Label78: TLabel;
Label79: TLabel;
Label80: TLabel;
Label81: TLabel;
Label82: TLabel;
Label83: TLabel;
Label84: TLabel;
Label85: TLabel;
Label86: TLabel;
Label87: TLabel;
Label88: TLabel;
Label89: TLabel;
Label90: TLabel;
Label91: TLabel;
Label92: TLabel;
Label93: TLabel;
Label94: TLabel;
Label95: TLabel;
Label96: TLabel;
Label97: TLabel;
Label98: TLabel;
Label99: TLabel;
Label100: TLabel;
Label101: TLabel;
Label102: TLabel;
Label103: TLabel;
Label104: TLabel;
Label105: TLabel;
Label106: TLabel;
Label107: TLabel;
Label108: TLabel;
Label109: TLabel;
Label110: TLabel;
wwDBLookupCombo2: TwwDBLookupCombo;
DBEdit25: TDBEdit;
wwDBDateTimePicker14: TwwDBDateTimePicker;
wwDBLookupCombo4: TwwDBLookupCombo;
RxDBLookupCombo6: TRxDBLookupCombo;
RxDBLookupCombo8: TRxDBLookupCombo;
RxDBLookupCombo9: TRxDBLookupCombo;
RxDBLookupCombo10: TRxDBLookupCombo;
RxDBLookupCombo11: TRxDBLookupCombo;
DBEdit26: TDBEdit;
DBEdit27: TDBEdit;
DBEdit28: TDBEdit;
DBEdit29: TDBEdit;
DBEdit30: TDBEdit;
DBEdit31: TDBEdit;
DBEdit32: TDBEdit;
DBEdit33: TDBEdit;
DBEdit34: TDBEdit;
wwDBDateTimePicker15: TwwDBDateTimePicker;
wwDBDateTimePicker16: TwwDBDateTimePicker;
DBMemo4: TDBMemo;
DBMemo5: TDBMemo;
DBMemo6: TDBMemo;
DBMemo7: TDBMemo;
DBMemo8: TDBMemo;
DBMemo9: TDBMemo;
DBEdit35: TDBEdit;
wwDBLookupCombo5: TwwDBLookupCombo;
DBEdit36: TDBEdit;
DBEdit37: TDBEdit;
DBEdit38: TDBEdit;
wwDBDateTimePicker17: TwwDBDateTimePicker;
wwDBDateTimePicker18: TwwDBDateTimePicker;
wwDBDateTimePicker19: TwwDBDateTimePicker;
wwDBDateTimePicker20: TwwDBDateTimePicker;
wwDBDateTimePicker21: TwwDBDateTimePicker;
DBEdit39: TDBEdit;
DBMemo10: TDBMemo;
bsSkinDBCheckRadioBox4: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox5: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox6: TbsSkinDBCheckRadioBox;
RxDBLookupCombo15: TRxDBLookupCombo;
DBEdit40: TDBEdit;
DBEdit42: TDBEdit;
Button3: TButton;
Button4: TButton;
RxDBLookupCombo33: TRxDBLookupCombo;
RxDBLookupCombo32: TRxDBLookupCombo;
RxDBLookupCombo16: TRxDBLookupCombo;
RxDBLookupCombo17: TRxDBLookupCombo;
Label111: TLabel;
RxDBLookupCombo18: TRxDBLookupCombo;
Label112: TLabel;
RxDBLookupCombo19: TRxDBLookupCombo;
Label113: TLabel;
DBEdit43: TDBEdit;
bsSkinSpeedButton2: TbsSkinSpeedButton;
Label114: TLabel;
DBEdit44: TDBEdit;
Label115: TLabel;
DBEdit45: TDBEdit;
bsSkinPanel5: TbsSkinPanel;
t_op_aire1: TDataSource;
t_op_aire: TADOQuery;
Label116: TLabel;
Label117: TLabel;
Label118: TLabel;
Label119: TLabel;
Label120: TLabel;
Label121: TLabel;
Label122: TLabel;
Label123: TLabel;
Label127: TLabel;
Label128: TLabel;
Label129: TLabel;
Label130: TLabel;
Label131: TLabel;
Label132: TLabel;
Label134: TLabel;
Label135: TLabel;
Label136: TLabel;
Label137: TLabel;
Label138: TLabel;
Label139: TLabel;
Label140: TLabel;
Label141: TLabel;
Label142: TLabel;
DBEdit46: TDBEdit;
DBEdit47: TDBEdit;
DBEdit48: TDBEdit;
DBEdit49: TDBEdit;
DBEdit50: TDBEdit;
wwDBDateTimePicker22: TwwDBDateTimePicker;
DBEdit51: TDBEdit;
wwDBDateTimePicker23: TwwDBDateTimePicker;
DBEdit52: TDBEdit;
RxDBLookupCombo21: TRxDBLookupCombo;
DBMemo11: TDBMemo;
DBMemo12: TDBMemo;
DBMemo13: TDBMemo;
DBMemo14: TDBMemo;
DBMemo15: TDBMemo;
DBMemo16: TDBMemo;
bsSkinDBCheckRadioBox8: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox9: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox10: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox11: TbsSkinDBCheckRadioBox;
wwDBDateTimePicker24: TwwDBDateTimePicker;
RxDBLookupCombo22: TRxDBLookupCombo;
RxDBLookupCombo23: TRxDBLookupCombo;
DBMemo17: TDBMemo;
DBEdit53: TDBEdit;
Label143: TLabel;
RxDBLookupCombo24: TRxDBLookupCombo;
Label144: TLabel;
DBEdit55: TDBEdit;
bsSkinSpeedButton3: TbsSkinSpeedButton;
Label145: TLabel;
DBEditEh1: TDBEditEh;
Label146: TLabel;
DBEdit56: TDBEdit;
Label147: TLabel;
DBEdit57: TDBEdit;
Label149: TLabel;
DBEdit58: TDBEdit;
Label152: TLabel;
RxDBLookupCombo25: TRxDBLookupCombo;
Label150: TLabel;
wwDBDateTimePicker25: TwwDBDateTimePicker;
Label151: TLabel;
wwDBLookupCombo7: TwwDBLookupCombo;
Label148: TLabel;
wwDBDateTimePicker26: TwwDBDateTimePicker;
bsSkinPanel6: TbsSkinPanel;
Label153: TLabel;
RxDBLookupCombo26: TRxDBLookupCombo;
Label154: TLabel;
DBEdit59: TDBEdit;
bsSkinSpeedButton4: TbsSkinSpeedButton;
Label155: TLabel;
DBEdit60: TDBEdit;
Label156: TLabel;
DBEdit61: TDBEdit;
Label157: TLabel;
DBEdit62: TDBEdit;
Label158: TLabel;
DBEdit64: TDBEdit;
Label159: TLabel;
wwDBDateTimePicker27: TwwDBDateTimePicker;
Label160: TLabel;
wwDBLookupCombo8: TwwDBLookupCombo;
Label161: TLabel;
wwDBDateTimePicker28: TwwDBDateTimePicker;
Label162: TLabel;
RxDBLookupCombo27: TRxDBLookupCombo;
Label163: TLabel;
Label168: TLabel;
Label169: TLabel;
Label170: TLabel;
Label171: TLabel;
Label172: TLabel;
Label173: TLabel;
Label174: TLabel;
Label175: TLabel;
Label176: TLabel;
Label177: TLabel;
Label178: TLabel;
Label179: TLabel;
Label180: TLabel;
Label181: TLabel;
Label182: TLabel;
Label183: TLabel;
Label184: TLabel;
Label185: TLabel;
Label186: TLabel;
Label187: TLabel;
Label188: TLabel;
DBEdit65: TDBEdit;
DBEdit66: TDBEdit;
DBEdit67: TDBEdit;
DBEdit68: TDBEdit;
wwDBDateTimePicker29: TwwDBDateTimePicker;
DBEdit69: TDBEdit;
wwDBDateTimePicker30: TwwDBDateTimePicker;
DBEdit70: TDBEdit;
RxDBLookupCombo28: TRxDBLookupCombo;
DBMemo18: TDBMemo;
DBMemo19: TDBMemo;
DBMemo20: TDBMemo;
DBMemo21: TDBMemo;
DBMemo22: TDBMemo;
DBMemo23: TDBMemo;
bsSkinDBCheckRadioBox12: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox13: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox14: TbsSkinDBCheckRadioBox;
bsSkinDBCheckRadioBox15: TbsSkinDBCheckRadioBox;
wwDBDateTimePicker31: TwwDBDateTimePicker;
DBMemo24: TDBMemo;
RxDBLookupCombo34: TRxDBLookupCombo;
RxDBLookupCombo35: TRxDBLookupCombo;
DBEdit71: TDBEdit;
t_op_airi1: TDataSource;
t_op_airi: TADOQuery;
v_op_apply: TADOQuery;
v_op_apply1: TDataSource;
DBEdit73: TDBEdit;
PopupMenu4: TPopupMenu;
N2: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
N5: TMenuItem;
N6: TMenuItem;
N7: TMenuItem;
N8: TMenuItem;
dxDBGrid1Column65: TdxDBGridColumn;
wwDBLookupCombo1: TwwDBLookupCombo;
wwDBLookupCombo6: TwwDBLookupCombo;
wwDBLookupCombo9: TwwDBLookupCombo;
wwDBLookupCombo10: TwwDBLookupCombo;
dxDBGrid1Column66: TdxDBGridColumn;
dxDBGrid1Column67: TdxDBGridColumn;
wwDBComboBox1: TwwDBComboBox;
wwDBComboBox2: TwwDBComboBox;
Label189: TLabel;
DBEdit54: TDBEdit;
t_op_file_items1: TDataSource;
t_op_file_items: TADOQuery;
dsrFuJian: TDataSource;
t_op_file: TADOQuery;
bsSkinTabSheet5: TbsSkinTabSheet;
dxDBGrid4: TdxDBGrid;
dxDBGrid4Column2: TdxDBGridColumn;
dxDBGridColumn10: TdxDBGridColumn;
dxDBGrid4Column3: TdxDBGridColumn;
bsSkinGroupBox13: TbsSkinGroupBox;
bsSkinPanel14: TbsSkinPanel;
bsSkinButton48: TbsSkinButton;
bsSkinButton49: TbsSkinButton;
bsSkinButton50: TbsSkinButton;
bsSkinButton51: TbsSkinButton;
bsSkinButton66: TbsSkinButton;
bsSkinButton67: TbsSkinButton;
dxDBGrid3: TdxDBGrid;
dxDBGrid2fid: TdxDBGridMaskColumn;
dxDBGrid2rl_id: TdxDBGridMaskColumn;
dxDBGridColumn1: TdxDBGridColumn;
dxDBGridColumn2: TdxDBGridColumn;
dxDBGridColumn3: TdxDBGridColumn;
dxDBGridDateColumn1: TdxDBGridDateColumn;
dxDBGridColumn4: TdxDBGridColumn;
dxDBGridColumn5: TdxDBGridColumn;
dxDBGrid3Column9: TdxDBGridColumn;
CheckBox1: TCheckBox;
OpenDialog2: TOpenDialog;
SaveDialog1: TSaveDialog;
OpenDialog1: TOpenDialog;
bsSkinTabSheet6: TbsSkinTabSheet;
t_op_seae2: TDataSource;
t_op_seaeop: TADOQuery;
Label190: TLabel;
DBMemo25: TDBMemo;
DBMemo26: TDBMemo;
Label191: TLabel;
Label192: TLabel;
DBMemo27: TDBMemo;
Label193: TLabel;
DBMemo38: TDBMemo;
Label194: TLabel;
DBEdit72: TDBEdit;
DBMemo37: TDBMemo;
Label195: TLabel;
Label196: TLabel;
DBMemo28: TDBMemo;
DBMemo29: TDBMemo;
Label197: TLabel;
DBMemo30: TDBMemo;
Label198: TLabel;
Label199: TLabel;
DBMemo31: TDBMemo;
Label200: TLabel;
Label201: TLabel;
Label202: TLabel;
Label203: TLabel;
Label204: TLabel;
Label205: TLabel;
Label206: TLabel;
Label207: TLabel;
Label208: TLabel;
Label209: TLabel;
Label210: TLabel;
Label211: TLabel;
Label212: TLabel;
Label213: TLabel;
Label214: TLabel;
Label215: TLabel;
Label216: TLabel;
Label217: TLabel;
Label218: TLabel;
Label219: TLabel;
Label220: TLabel;
Label221: TLabel;
Label222: TLabel;
Label223: TLabel;
Label224: TLabel;
Label225: TLabel;
Label226: TLabel;
Label227: TLabel;
Label228: TLabel;
Label229: TLabel;
Label230: TLabel;
Label231: TLabel;
Label232: TLabel;
Label233: TLabel;
Label234: TLabel;
wwDBLookupCombo11: TwwDBLookupCombo;
DBEdit74: TDBEdit;
wwDBLookupCombo12: TwwDBLookupCombo;
wwDBDateTimePicker32: TwwDBDateTimePicker;
wwDBDateTimePicker33: TwwDBDateTimePicker;
wwDBDateTimePicker34: TwwDBDateTimePicker;
wwDBLookupCombo13: TwwDBLookupCombo;
wwDBComboBox4: TwwDBComboBox;
wwDBLookupCombo21: TwwDBLookupCombo;
wwDBComboBox5: TwwDBComboBox;
wwDBDateTimePicker35: TwwDBDateTimePicker;
RxDBLookupCombo36: TRxDBLookupCombo;
RxDBLookupCombo37: TRxDBLookupCombo;
RxDBLookupCombo38: TRxDBLookupCombo;
RxDBLookupCombo39: TRxDBLookupCombo;
RxDBLookupCombo40: TRxDBLookupCombo;
RxDBLookupCombo41: TRxDBLookupCombo;
RxDBLookupCombo42: TRxDBLookupCombo;
RxDBLookupCombo43: TRxDBLookupCombo;
RxDBLookupCombo44: TRxDBLookupCombo;
RxDBLookupCombo45: TRxDBLookupCombo;
RxDBLookupCombo46: TRxDBLookupCombo;
Button5: TButton;
RxDBLookupCombo47: TRxDBLookupCombo;
RxDBLookupCombo49: TRxDBLookupCombo;
RxDBLookupCombo48: TRxDBLookupCombo;
wwDBComboBox9: TwwDBComboBox;
wwDBLookupCombo16: TwwDBLookupCombo;
wwDBLookupCombo17: TwwDBLookupCombo;
RxDBLookupCombo50: TRxDBLookupCombo;
wwDBLookupCombo20: TwwDBLookupCombo;
wwDBLookupCombo22: TwwDBLookupCombo;
wwDBLookupCombo23: TwwDBLookupCombo;
bsSkinDBCheckRadioBox19: TbsSkinDBCheckRadioBox;
wwDBDateTimePicker36: TwwDBDateTimePicker;
wwDBComboBox16: TwwDBComboBox;
RxDBLookupCombo51: TRxDBLookupCombo;
wwDBComboBox17: TwwDBComboBox;
DBEdit75: TDBEdit;
wwDBLookupCombo14: TwwDBLookupCombo;
DBEdit82: TDBEdit;
Label235: TLabel;
DBEdit83: TDBEdit;
Label236: TLabel;
N9: TMenuItem;
N19: TMenuItem;
N20: TMenuItem;
N21: TMenuItem;
dxDBGrid1Column68: TdxDBGridColumn;
procedure bsSkinButton5Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure Panel2Resize(Sender: TObject);
procedure bsSkinButton7Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure bsSkinButton38Click(Sender: TObject);
procedure bsSkinButton13Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure t_op_seaeBeforeCancel(DataSet: TDataSet);
procedure t_op_seaeBeforeDelete(DataSet: TDataSet);
procedure t_op_seaeBeforeEdit(DataSet: TDataSet);
procedure t_op_seaeBeforePost(DataSet: TDataSet);
procedure t_op_seaePostError(DataSet: TDataSet; E: EDatabaseError;
var Action: TDataAction);
procedure N37Click(Sender: TObject);
procedure N62Click(Sender: TObject);
procedure N64Click(Sender: TObject);
procedure N17Click(Sender: TObject);
procedure N34Click(Sender: TObject);
procedure N36Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure N10Click(Sender: TObject);
procedure N14Click(Sender: TObject);
procedure N12Click(Sender: TObject);
procedure N16Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure bsSkinButton12Click(Sender: TObject);
procedure DBEdit1KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit2KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit3KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit4KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit18KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo1KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo3KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo13KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit8KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit9KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo4KeyPress(Sender: TObject; var Key: Char);
procedure wwDBLookupCombo49KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit63KeyPress(Sender: TObject; var Key: Char);
procedure wwDBDateTimePicker2KeyPress(Sender: TObject; var Key: Char);
procedure wwDBLookupCombo3KeyPress(Sender: TObject; var Key: Char);
procedure wwDBLookupCombo52KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit7KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit5KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo20KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit6KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit11KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit12KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit13KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit14KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit15KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit16KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit17KeyPress(Sender: TObject; var Key: Char);
procedure wwDBDateTimePicker1KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit19KeyPress(Sender: TObject; var Key: Char);
procedure wwDBDateTimePicker3KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit81KeyPress(Sender: TObject; var Key: Char);
procedure wwDBLookupCombo61KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit20KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit21KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit22KeyPress(Sender: TObject; var Key: Char);
procedure wwDBDateTimePicker10KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo7KeyPress(Sender: TObject; var Key: Char);
procedure wwDBDateTimePicker4KeyPress(Sender: TObject; var Key: Char);
procedure wwDBDateTimePicker5KeyPress(Sender: TObject; var Key: Char);
procedure wwDBDateTimePicker6KeyPress(Sender: TObject; var Key: Char);
procedure wwDBDateTimePicker7KeyPress(Sender: TObject; var Key: Char);
procedure wwDBDateTimePicker8KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit23KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit24KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo1Enter(Sender: TObject);
procedure RxDBLookupCombo1Exit(Sender: TObject);
procedure RxDBLookupCombo4Exit(Sender: TObject);
procedure RxDBLookupCombo4Enter(Sender: TObject);
procedure RxDBLookupCombo7Enter(Sender: TObject);
procedure RxDBLookupCombo7Exit(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure wwDBLookupCombo1KeyPress(Sender: TObject; var Key: Char);
procedure N1Click(Sender: TObject);
procedure bsSkinButton14Click(Sender: TObject);
procedure RxDBLookupCombo31KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit41KeyPress(Sender: TObject; var Key: Char);
procedure DBEdit10KeyPress(Sender: TObject; var Key: Char);
procedure bsSkinSpeedButton1Click(Sender: TObject);
procedure DBEdit6Change(Sender: TObject);
procedure t_op_seaiBeforePost(DataSet: TDataSet);
procedure t_op_seaiBeforeCancel(DataSet: TDataSet);
procedure t_op_seaiBeforeDelete(DataSet: TDataSet);
procedure t_op_seaiBeforeEdit(DataSet: TDataSet);
procedure t_op_aireBeforePost(DataSet: TDataSet);
procedure t_op_aireBeforeCancel(DataSet: TDataSet);
procedure t_op_aireBeforeDelete(DataSet: TDataSet);
procedure t_op_aireBeforeEdit(DataSet: TDataSet);
procedure t_op_airiBeforePost(DataSet: TDataSet);
procedure t_op_airiBeforeCancel(DataSet: TDataSet);
procedure t_op_airiBeforeDelete(DataSet: TDataSet);
procedure t_op_airiBeforeEdit(DataSet: TDataSet);
procedure Notebook1PageChanged(Sender: TObject);
procedure N2Click(Sender: TObject);
procedure N4Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure t_op_seaeAfterPost(DataSet: TDataSet);
procedure N6Click(Sender: TObject);
procedure N8Click(Sender: TObject);
procedure bsSkinPageControl1Change(Sender: TObject);
procedure RxDBLookupCombo36KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo36Enter(Sender: TObject);
procedure RxDBLookupCombo36Exit(Sender: TObject);
procedure RxDBLookupCombo37Enter(Sender: TObject);
procedure RxDBLookupCombo37Exit(Sender: TObject);
procedure RxDBLookupCombo37KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo38Enter(Sender: TObject);
procedure RxDBLookupCombo38Exit(Sender: TObject);
procedure RxDBLookupCombo38KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo39Enter(Sender: TObject);
procedure RxDBLookupCombo39Exit(Sender: TObject);
procedure RxDBLookupCombo39KeyPress(Sender: TObject; var Key: Char);
procedure RxDBLookupCombo36Change(Sender: TObject);
procedure dxDBGrid1Column2CustomDraw(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
AFocused: Boolean; var ADone: Boolean);
procedure dxDBGrid1Column3CustomDraw(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
AFocused: Boolean; var ADone: Boolean);
procedure t_op_seaiAfterPost(DataSet: TDataSet);
procedure t_op_aireAfterPost(DataSet: TDataSet);
procedure t_op_airiAfterPost(DataSet: TDataSet);
procedure t_op_file_itemsAfterInsert(DataSet: TDataSet);
procedure t_op_file_itemsAfterPost(DataSet: TDataSet);
procedure bsSkinButton66Click(Sender: TObject);
procedure bsSkinButton48Click(Sender: TObject);
procedure bsSkinButton49Click(Sender: TObject);
procedure bsSkinButton51Click(Sender: TObject);
procedure bsSkinButton50Click(Sender: TObject);
procedure bsSkinButton67Click(Sender: TObject);
procedure N19Click(Sender: TObject);
procedure dxDBGrid4Click(Sender: TObject);
procedure dxDBGrid4CustomDraw(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
AFocused: Boolean; var ADone: Boolean);
procedure N21Click(Sender: TObject);
private
procedure UpLoadPro(fname:string); //fname<6D><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
procedure UpLoadProFile(fname,RemotePathName,Users,pw,mblNo,bsno:string;fid:integer); //fname<6D><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
procedure UpLoadProFile_pl(fname,RemotePathName,Users,pw,mblNo,bsno:string;fid:integer); //fname<6D><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
procedure DownLoadPro(fname:string); //<2F><><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF>ı<EFBFBD><C4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
procedure DownLoadProFils(RemotePathName,Users,pw,fname: string); //<2F><><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF>ı<EFBFBD><C4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
procedure WMDROPFILES(var Msg: TMessage);message WM_DROPFILES;
{ Private declarations }
public
naspath:WideString;
{ Public declarations }
end;
var
frm_op_apply: Tfrm_op_apply;
frm_op_apply_create:boolean;
implementation
uses u_main,u_data_share, my_sys_function, u_sys_progress,
u_op_seae_apply_add, u_op_add_code, u_op_date_change, u_op_seai_apply_add,
Input_regu;
{$R *.dfm}
procedure Tfrm_op_apply.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_apply.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrid1,caption);
// savewwgrid(fra_fee1.wwDBGrid1,'<27><><EFBFBD><EFBFBD><EFBFBD>̼<EFBFBD>Ӧ<EFBFBD><D3A6>');
// savewwgrid(fra_fee1.wwDBGrid2,'<27><><EFBFBD><EFBFBD><EFBFBD>̼<EFBFBD>Ӧ<EFBFBD><D3A6>');
frm_op_apply.Hide;
frm_op_apply.ManualFloat(frm_op_apply.BoundsRect );
frm_op_apply_create:=false;
frm_main.freeTabs('frm_op_apply');
action:=cafree;
frm_op_apply:=nil;
end;
procedure Tfrm_op_apply.Panel2Resize(Sender: TObject);
var
i:integer;
begin
i:=round(Panel2.Width/11);
bsSkinButton7.Width:=i;
bsSkinButton6.Width:=i;
bsSkinButton9.Width:=i;
bsSkinButton1.Width:=i;
bsSkinButton11.Width:=i;
bsSkinButton14.Width:=i;
bsSkinButton2.Width:=i;
bsSkinButton4.Width:=i;
bsSkinButton3.Width:=i;
bsSkinButton38.Width:=i;
end;
procedure Tfrm_op_apply.bsSkinButton7Click(Sender: TObject);
begin
table_Prior(v_op_apply);
Notebook1PageChanged(nil);
end;
procedure Tfrm_op_apply.bsSkinButton6Click(Sender: TObject);
begin
table_next(v_op_apply);
Notebook1PageChanged(nil);
end;
procedure Tfrm_op_apply.bsSkinButton2Click(Sender: TObject);
begin
if t_op_seae.Active then
table_post(t_op_seae);
if t_op_seai.Active then
table_post(t_op_seai);
if t_op_aire.Active then
table_post(t_op_aire);
if t_op_airi.Active then
table_post(t_op_airi);
end;
procedure Tfrm_op_apply.bsSkinButton9Click(Sender: TObject);
begin
sys_print('<27><><EFBFBD>ڱ<EFBFBD><DAB1>ر<EFBFBD><D8B1><EFBFBD>',2,v_op_apply1,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_apply.bsSkinButton11Click(Sender: TObject);
var
answer:TModalResult;
begin
if bsSkinButton11.Caption='<27><EFBFBD>޸<EFBFBD>' then
begin
Notebook1.PageIndex:=1;
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
end
else
begin
if (t_op_seae.State=dsinsert)or(t_op_seae.State=dsedit) then
BEGIN
answer:=messagedlg( '<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE>޸ģ<DEB8><C4A3>Ƿ񱣴棿',mtWarning,mbYesNoCancel,0);
if Notebook2.PageIndex=0 then begin
if answer=mrYes then
begin
t_op_seae.post;
end;
if answer=mrNo then
begin
t_op_seae.cancel;
end;
if answer=mrCancel then
begin
exit;
end;
end;
if Notebook2.PageIndex=1 then begin
if answer=mrYes then
begin
t_op_seai.post;
end;
if answer=mrNo then
begin
t_op_seai.cancel;
end;
if answer=mrCancel then
begin
exit;
end;
end;
if Notebook2.PageIndex=2 then begin
if answer=mrYes then
begin
t_op_aire.post;
end;
if answer=mrNo then
begin
t_op_aire.cancel;
end;
if answer=mrCancel then
begin
exit;
end;
end;
if Notebook2.PageIndex=3 then begin
if answer=mrYes then
begin
t_op_airi.post;
end;
if answer=mrNo then
begin
t_op_airi.cancel;
end;
if answer=mrCancel then
begin
exit;
end;
end;
END;
Notebook1.PageIndex:=0;
bsSkinButton11.Caption:='<27><EFBFBD>޸<EFBFBD>';
end;
end;
procedure Tfrm_op_apply.bsSkinButton4Click(Sender: TObject);
var
aQuery:TADOQuery;
begin
t_ch_fee.close;
t_ch_fee.Parameters[0].value:=v_op_apply.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_ch_fee.open;
if not t_ch_fee.IsEmpty then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD>ڷ<EFBFBD><DAB7><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
if t_op_seae.Active then begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
close;sql.clear;
sql.add('update t_op_seae set <20><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD>=0 where <20><><EFBFBD><EFBFBD>='''+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'''');
execsql;
end;
finally
FreeAndNil(aQuery);
end;
// table_delete(t_op_seae);
v_op_apply.Requery();
t_op_seae.Close;
t_op_seae.Open;
end else begin
t_op_seae.Open;
aQuery:=CreateAdoQuery;
try
with aQuery do begin
close;sql.clear;
sql.add('update t_op_seae set <20><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD>=0 where <20><><EFBFBD><EFBFBD>='''+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'''');
execsql;
end;
finally
FreeAndNil(aQuery);
end;
// table_delete(t_op_seae);
v_op_apply.Requery();
end;
end;
procedure Tfrm_op_apply.bsSkinButton3Click(Sender: TObject);
begin
if t_op_seae.Active then
table_cancel(t_op_seae);
if t_op_seai.Active then
table_cancel(t_op_seai);
if t_op_aire.Active then
table_cancel(t_op_aire);
if t_op_airi.Active then
table_cancel(t_op_airi);
end;
procedure Tfrm_op_apply.bsSkinButton38Click(Sender: TObject);
var
book1:Tbookmark;
begin
book1:=v_op_apply.GetBookmark;
v_op_apply.Refresh;
v_op_apply.GotoBookmark(book1);
end;
procedure Tfrm_op_apply.bsSkinButton13Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton13.ClientToScreen(Point(0,bsSkinButton13.Height));
PopupMenu3.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_op_apply.FormShow(Sender: TObject);
begin
Notebook1.PageIndex:=0;
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(self);
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ򡣡<C8BA><F2A1A3A1><EFBFBD>';
frm_sys_progress.Show;
frm_sys_progress.bsSkinGauge1.MaxValue:=28;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
frm_sys_progress.Update;
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>').Asstring)='<27>Զ<EFBFBD>ȡ<EFBFBD><C8A1>' then begin
DBEdit8.Width:=110;
bsSkinSpeedButton1.Visible:=false;
if frm_data_share.t_sys_noset.fieldbyname('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6>༭').AsBoolean then begin
DBEdit8.ReadOnly:=false;
end else begin
DBEdit8.ReadOnly:=true;
end;
end else if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>').Asstring)='<27>ֶ<EFBFBD>ȡ<EFBFBD><C8A1>' then begin
DBEdit8.Width:=90;
bsSkinSpeedButton1.Visible:=true;
if frm_data_share.t_sys_noset.fieldbyname('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6>༭').AsBoolean then begin
DBEdit8.ReadOnly:=false;
end else begin
DBEdit8.ReadOnly:=true;
end;
end else if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>').Asstring)='<27>ֶ<EFBFBD><D6B6>༭' then begin
DBEdit8.ReadOnly:=false;
DBEdit8.Width:=110;
bsSkinSpeedButton1.Visible:=false;
end;
naspath:=get_parameters_value(175,'\\223.223.95.160\data');
v_op_apply.Close;
v_op_apply.SQL.clear;
v_op_apply.SQL.Add('select top 100 * from v_op_bscard_all where <20><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD>=1 and '
+'(<28><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>='+''''+employee+''''
+' or <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+employee+''''+')'
+default_sort(53,'v_op_bscard_all','','desc'));
v_op_apply.open;
t_op_seae_danwei.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
fra_op_card1.t_op_card.DataSource:=v_op_apply1;
fra_op_card1.t_op_card.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
loadreggrid(dxdbgrid1,false,caption);
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
if if_open('293') or if_open('294') then
begin
fra_fee1.edit_type.text:='1';
fra_fee1.baoguan.text:='1';
fra_fee1.edit_data.text:='0001';
fra_fee1.edit_report.text:='<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>';
fra_fee1.t_ch_accept.DataSource:=v_op_apply1;
if strtobool(get_parameters_value(150,'false')) then
fra_fee1.bsSkinPanel3.Visible:=true;
fra_fee1.DBEdit48.DataSource:=v_op_apply1;
if if_open('293') then
begin
fra_fee1.t_ch_accept.DataSource:=v_op_apply1;
if (strtobool(get_parameters_value(153,'false'))=true) then begin
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('206')=false) then
begin
fra_fee1.t_ch_accept.close;
fra_fee1.t_ch_accept.SQL.Clear;
fra_fee1.t_ch_accept.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and (¼<><C2BC><EFBFBD><EFBFBD>='
+''''+employee+''''+' or (¼<><C2BC><EFBFBD><EFBFBD><>'+''''+employee+''''
+' and <20><><EFBFBD><EFBFBD><>1) ) and '+open_data('7000','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
+' order by ˳<><CBB3>,CH_ID');
end else begin
fra_fee1.t_ch_accept.close;
fra_fee1.t_ch_accept.SQL.Clear;
fra_fee1.t_ch_accept.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and '
+open_data('7000','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
+' order by ˳<><CBB3>,CH_ID');
end;
fra_fee1.t_ch_accept.open;
end else begin
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('206')=false) then
begin
fra_fee1.t_ch_accept.close;
fra_fee1.t_ch_accept.SQL.Clear;
fra_fee1.t_ch_accept.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and (¼<><C2BC><EFBFBD><EFBFBD>='
+''''+employee+''''+' or (¼<><C2BC><EFBFBD><EFBFBD><>'+''''+employee+''''
+' and <20><><EFBFBD><EFBFBD><>1) ) order by ˳<><CBB3>,CH_ID');
end;
fra_fee1.t_ch_accept.open;
end;
fra_fee1.a_shen_delete.open;
fra_fee1.a_shen_modify_old.open;
fra_fee1.a_shen_modify_new.open;
fra_fee1.Panel3.visible:=true;
end
else
fra_fee1.Panel3.visible:=false;
if if_open('294') then
begin
fra_fee1.t_ch_pay.DataSource:=v_op_apply1;
if (strtobool(get_parameters_value(153,'false'))=true) then begin
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('206')=false) then
begin
fra_fee1.t_ch_pay.close;
fra_fee1.t_ch_pay.SQL.Clear;
fra_fee1.t_ch_pay.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and (¼<><C2BC><EFBFBD><EFBFBD>='
+''''+employee+''''+' or (¼<><C2BC><EFBFBD><EFBFBD><>'+''''+employee+''''
+' and <20><><EFBFBD><EFBFBD><>1) ) and '+open_data('7000','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
+' order by ˳<><CBB3>,CH_ID');
end else begin
fra_fee1.t_ch_pay.close;
fra_fee1.t_ch_pay.SQL.Clear;
fra_fee1.t_ch_pay.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and '
+open_data('7000','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no')
+' order by ˳<><CBB3>,CH_ID');
end;
fra_fee1.t_ch_pay.open;
end else begin
if (strtobool(get_parameters_value(64,'false'))=true) and (if_open('206')=false) then
begin
fra_fee1.t_ch_pay.close;
fra_fee1.t_ch_pay.SQL.Clear;
fra_fee1.t_ch_pay.SQL.Add('select * from t_ch_fee where <20><><EFBFBD><EFBFBD>='
+''''+'<27><>'+''''+' and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and (¼<><C2BC><EFBFBD><EFBFBD>='
+''''+employee+''''+' or (¼<><C2BC><EFBFBD><EFBFBD><>'+''''+employee+''''
+' and <20><><EFBFBD><EFBFBD><>1) ) order by ˳<><CBB3>,CH_ID');
end;
fra_fee1.t_ch_pay.open;
end;
fra_fee1.p_shen_delete.open;
fra_fee1.p_shen_modify_old.open;
fra_fee1.p_shen_modify_new.open;
fra_fee1.Panel1.visible:=true;
end
else
fra_fee1.Panel1.visible:=false;
if fra_fee1.Panel1.visible and
fra_fee1.Panel3.visible then
begin
if if_open('253') then begin
fra_fee1.Panel8.Visible:=true;
fra_fee1.Panel8.Height:=20;
end else
fra_fee1.Panel8.Visible:=false;
fra_fee1.t_op_gain.DataSource:=v_op_apply1;
fra_fee1.t_op_gain.open;
fra_fee1.Panel9.Visible:=false;
end
else
begin
fra_fee1.Panel8.Visible:=false;
end;
end
else
begin
fra_fee1.Visible:=false;
end;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_op_apply_create:=true;
fra_op_state1.edit_state.Text:='1';
fra_op_state1.t_op_state.DataSource:=v_op_apply1;
fra_op_state1.t_op_state.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
// loadwwgrid(fra_fee1.wwDBGrid1,'<27><><EFBFBD><EFBFBD><EFBFBD>̼<EFBFBD>Ӧ<EFBFBD><D3A6>');
// loadwwgrid(fra_fee1.wwDBGrid2,'<27><><EFBFBD><EFBFBD><EFBFBD>̼<EFBFBD>Ӧ<EFBFBD><D3A6>');
frm_sys_progress.close;
frm_sys_progress:=nil;
end;
procedure Tfrm_op_apply.t_op_seaeBeforeCancel(DataSet: TDataSet);
begin
delete_no(t_op_seae);
if t_op_seae.State=dsinsert then
if not t_op_seae.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').IsNull then
delwtno(t_op_seae['ί<>б<EFBFBD><D0B1><EFBFBD>']);
end;
procedure Tfrm_op_apply.t_op_seaeBeforeDelete(DataSet: TDataSet);
begin
op_befor_post(t_op_seae,'0001');
delete_add(1,t_op_seae);
if not t_op_seae.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').IsNull then
delwtno(t_op_seae['ί<>б<EFBFBD><D0B1><EFBFBD>']);
end;
procedure Tfrm_op_apply.t_op_seaeBeforeEdit(DataSet: TDataSet);
begin
op_befor_post(t_op_seae,'0001');
end;
procedure Tfrm_op_apply.t_op_seaeBeforePost(DataSet: TDataSet);
var
aQuery:TAdoQuery;
str:string;
begin
{
table_before_post(t_op_seae,'ί<>е<EFBFBD>λ');
table_before_post(t_op_seae,'<27><><EFBFBD><EFBFBD>Ա');
table_before_post(t_op_seae,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_op_seae,'<27>ͷ<EFBFBD>Ա');
table_before_post(t_op_seae,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_op_seae,'<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>');
table_before_post(t_op_seae,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>').Asstring)='<27>Զ<EFBFBD>ȡ<EFBFBD><C8A1>' then
if t_op_seae.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').IsNull or (trim(t_op_seae['ί<>б<EFBFBD><D0B1><EFBFBD>'])='') then
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>').Asstring)='<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>' then
t_op_seae['ί<>б<EFBFBD><D0B1><EFBFBD>']:=getwtno(1,subComp,department,employee,t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>'])
else
t_op_seae['ί<>б<EFBFBD><D0B1><EFBFBD>']:=getwtno(1,subComp,department,employee,t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
if op_empty('t_op_seae',t_op_seae) then
Abort;
if t_op_seae.FieldByName('ί<>е<EFBFBD>λ').OldValue<>t_op_seae.FieldByName('ί<>е<EFBFBD>λ').asstring then
begin
if frm_data_share.t_crm_client_all.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_op_seae.FieldByName('ί<>е<EFBFBD>λ').asstring,[])then
begin
if frm_data_share.t_crm_client_all.fieldbyname('<27>ͻ<EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>'then
begin
showmessage('<27><>ǰҵ<C7B0><D2B5>ί<EFBFBD>е<EFBFBD>λ<EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><E6A3AC><EFBFBD><EFBFBD><EFBFBD>ٽ<EFBFBD><D9BD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>лָ<D0BB><D6B8>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
abort;
end;
end;
end;
if t_op_seae.State=dsinsert then
begin
if t_op_seae.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring=''then
begin
t_op_seae['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_no(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').AsDateTime,getbsno(Logininfo.CustomExP,'BE'));
t_op_seae['<27><><EFBFBD><EFBFBD>']:=get_id;
end;
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae['<27><><EFBFBD><EFBFBD>'];
t_op_seae['ҵ<><D2B5>״̬']:='<27><><EFBFBD><EFBFBD>ί<EFBFBD><CEAF>';
t_op_seae['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
end;
if strtobool(get_parameters_value(31,'false')) then
begin
if (trim(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring)='') then //or (t_op_seae.fieldbyname('װ<>˷<EFBFBD>ʽ').asstring='<27><><EFBFBD><EFBFBD>')
begin
t_op_seae['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_seae['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_seae['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_seae['<27><><EFBFBD><EFBFBD><E1B5A5>'];
end;
end
else
begin
t_op_seae['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_seae['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(32,'false')) then
begin
if (trim(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring)='') then
begin
t_op_seae['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_seae['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_seae['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_seae['<27><><EFBFBD><EFBFBD><E1B5A5>'];
end;
end
else
begin
t_op_seae['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_seae['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(33,'false')) then
begin
if (trim(t_op_seae.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring)='') then
begin
t_op_seae['ί<>б<EFBFBD>׼']:=t_op_seae['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_seae['ί<>б<EFBFBD>׼']:=t_op_seae['ί<>б<EFBFBD><D0B1><EFBFBD>'];
end;
end
else
begin
t_op_seae['ί<>б<EFBFBD>׼']:=t_op_seae['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(57,'false')) then
begin
if (trim(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='') then
begin
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׼']:=t_op_seae['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׼']:=t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
end
else
begin
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׼']:=t_op_seae['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(58,'false')) then
begin
if (trim(t_op_seae.fieldbyname('<27><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>').asstring)='') then
begin
t_op_seae['<27><><EFBFBD>ر<EFBFBD>׼']:=t_op_seae['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_seae['<27><><EFBFBD>ر<EFBFBD>׼']:=t_op_seae['<27><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>'];
end;
end
else
begin
t_op_seae['<27><><EFBFBD>ر<EFBFBD>׼']:=t_op_seae['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(59,'false')) then
begin
if (trim(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><ECB5A5>').asstring)='') then
begin
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׼']:=t_op_seae['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׼']:=t_op_seae['<27><><EFBFBD><EFBFBD><ECB5A5>'];
end;
end
else
begin
t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׼']:=t_op_seae['<27><><EFBFBD><EFBFBD>'];
end;
if t_op_seae.fieldbyname('<27><>Ʊ<EFBFBD><C6B1>').AsString<>'' then begin
if t_op_seae.fieldbyname('<27><>Ʊ<EFBFBD><C6B1>').OldValue<>t_op_seae.fieldbyname('<27><>Ʊ<EFBFBD><C6B1>').NewValue then begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD> from t_op_seae where <20><>Ʊ<EFBFBD><C6B1>='''+t_op_seae.fieldbyname('<27><>Ʊ<EFBFBD><C6B1>').AsString+''' and <20><><EFBFBD><EFBFBD><>'''+t_op_seae['<27><><EFBFBD><EFBFBD>']+'''');
Open;
if not IsEmpty then begin
str:='select * from t_op_seae where <20><>Ʊ<EFBFBD><C6B1>='+''''+t_op_seae['<27><>Ʊ<EFBFBD><C6B1>']+'''';
double_seae(str,7);
end;
end;
finally
FreeAndNil(aQuery);
end;
end;
end;
}
// t_op_seae['װ<>˷<EFBFBD>ʽ']:='<27><><EFBFBD><EFBFBD>';
t_op_seae['<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD>']:=1;
t_op_seae['upload']:=1;
end;
procedure Tfrm_op_apply.t_op_seaePostError(DataSet: TDataSet;
E: EDatabaseError; var Action: TDataAction);
var
str:widestring;
begin
if pos('SOME VALUES MAY HAVE BEEN CHANGED',UpperCase(E.Message))<>0 then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>޸ģ<DEB8><C4A3><EFBFBD>ǰ<EFBFBD>޸IJ<DEB8><C4B2>ܱ<EFBFBD><DCB1><EFBFBD>'+#13#10+'<27><>ˢ<EFBFBD><CBA2><EFBFBD><EFBFBD><EFBFBD>ݺ<EFBFBD><DDBA><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>');
abort;
end;
if pos('<27><><EFBFBD><EFBFBD><E1B5A5>׼',UpperCase(E.Message))<>0 then
begin
str:='select * from t_op_seae where װ<>˷<EFBFBD>ʽ=''<27><><EFBFBD><EFBFBD>'' and <20><><EFBFBD><EFBFBD><E1B5A5>׼='+''''+t_op_seae['<27><><EFBFBD><EFBFBD><E1B5A5>׼']+'''';
double_seae(str,1);
abort;
end;
if pos('<27><><EFBFBD><EFBFBD><E1B5A5>׼',UpperCase(E.Message))<>0 then
begin
str:='select * from t_op_seae where װ<>˷<EFBFBD>ʽ=''<27><><EFBFBD><EFBFBD>'' and <20><><EFBFBD><EFBFBD><E1B5A5>׼='+''''+t_op_seae['<27><><EFBFBD><EFBFBD><E1B5A5>׼']+'''';
double_seae(str,2);
abort;
end;
if pos('ί<>б<EFBFBD>׼',UpperCase(E.Message))<>0 then
begin
str:='select * from t_op_seae where װ<>˷<EFBFBD>ʽ=''<27><><EFBFBD><EFBFBD>'' and ί<>б<EFBFBD>׼='+''''+t_op_seae['ί<>б<EFBFBD>׼']+'''';
double_seae(str,3);
abort;
end;
if pos('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׼',UpperCase(E.Message))<>0 then
begin
str:='select * from t_op_seae where װ<>˷<EFBFBD>ʽ=''<27><><EFBFBD><EFBFBD>'' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׼='+''''+t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׼']+'''';
double_seae(str,4);
abort;
end;
if pos('<27><><EFBFBD>ر<EFBFBD>׼',UpperCase(E.Message))<>0 then
begin
str:='select * from t_op_seae where װ<>˷<EFBFBD>ʽ=''<27><><EFBFBD><EFBFBD>'' and <20><><EFBFBD>ر<EFBFBD>׼='+''''+t_op_seae['<27><><EFBFBD>ر<EFBFBD>׼']+'''';
double_seae(str,5);
abort;
end;
if pos('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׼',UpperCase(E.Message))<>0 then
begin
str:='select * from t_op_seae where װ<>˷<EFBFBD>ʽ=''<27><><EFBFBD><EFBFBD>'' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׼='+''''+t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׼']+'''';
double_seae(str,6);
abort;
end;
end;
procedure Tfrm_op_apply.N37Click(Sender: TObject);
begin
t_op_seae.Close;
t_op_seae.sql.clear;
t_op_seae.sql.text:='select * from t_op_seae where '
+open_data('0001','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
+' and <20><><EFBFBD><EFBFBD> in (select distinct <20><><EFBFBD><EFBFBD> from t_op_state where <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><>1) '
+default_sort(53,'t_op_seae','','desc');
t_op_seae.open;
end;
procedure Tfrm_op_apply.N62Click(Sender: TObject);
begin
t_op_seae.Close;
t_op_seae.sql.clear;
t_op_seae.sql.text:='select * from t_op_seae where '
+open_data('0001','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
+' and <20><><EFBFBD><EFBFBD>״̬<>'+''''+'<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>'+''''
+' and <20><><EFBFBD><EFBFBD> not in (select distinct <20><><EFBFBD><EFBFBD> from t_ch_fee where <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''+')'
+default_sort(53,'t_op_seae','','desc');
t_op_seae.open;
end;
procedure Tfrm_op_apply.N64Click(Sender: TObject);
begin
t_op_seae.Close;
t_op_seae.sql.clear;
t_op_seae.sql.text:='select * from t_op_seae where '
+open_data('0001','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
+' and <20><><EFBFBD><EFBFBD>״̬<>'+''''+'<27><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>'+''''
+' and <20><><EFBFBD><EFBFBD> not in (select distinct <20><><EFBFBD><EFBFBD> from t_ch_fee where <20><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''+')'
+default_sort(53,'t_op_seae','','desc');
t_op_seae.open;
end;
procedure Tfrm_op_apply.N17Click(Sender: TObject);
begin
t_op_seae.Close;
t_op_seae.sql.clear;
t_op_seae.sql.text:='select * from t_op_seae where '
+open_data('0001','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
+' and <20><><EFBFBD><EFBFBD> in (select distinct <20><><EFBFBD><EFBFBD> from t_ch_fee where <20><><EFBFBD><EFBFBD>״̬='
+''''+'¼<><C2BC>״̬'+''''+') '
+default_sort(53,'t_op_seae','','desc');
t_op_seae.open;
end;
procedure Tfrm_op_apply.N34Click(Sender: TObject);
begin
t_op_seae.Close;
t_op_seae.sql.clear;
t_op_seae.sql.text:='select * from t_op_seae where '
+open_data('0001','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
+' and <20><><EFBFBD><EFBFBD> in (select distinct <20><><EFBFBD><EFBFBD> from t_ch_fee where <20><><EFBFBD><EFBFBD>״̬ in ('
+''''+'<27><><EFBFBD><EFBFBD><EFBFBD>ύ'+''''+','+''''+'<27><>ֹ<EFBFBD>޸<EFBFBD>'+''''+','+''''+'<27><>ֹɾ<D6B9><C9BE>'+''''+')) '
+default_sort(53,'t_op_seae','','desc');
t_op_seae.open;
end;
procedure Tfrm_op_apply.N36Click(Sender: TObject);
begin
t_op_seae.Close;
t_op_seae.sql.clear;
t_op_seae.sql.text:='select * from t_op_seae where '
+open_data('0001','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
+' and <20><><EFBFBD><EFBFBD> in (select distinct <20><><EFBFBD><EFBFBD> from t_ch_fee where <20><><EFBFBD><EFBFBD>״̬ in ('
+''''+'<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>'+''''+','+''''+'<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>'+''''+','+''''+'<27><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>'+''''+')) '
+default_sort(53,'t_op_seae','','desc');
t_op_seae.open;
end;
procedure Tfrm_op_apply.bsSkinButton10Click(Sender: TObject);
begin
query_seae(11,'0001');
end;
procedure Tfrm_op_apply.N10Click(Sender: TObject);
begin
update_grid_view_no(dxdbgrid1);
end;
procedure Tfrm_op_apply.N14Click(Sender: TObject);
begin
update_grid_view_all(dxdbgrid1);
end;
procedure Tfrm_op_apply.N12Click(Sender: TObject);
begin
update_grid(dxdbgrid1,101);
end;
procedure Tfrm_op_apply.N16Click(Sender: TObject);
begin
grid_save_xls(dxdbgrid1);
end;
procedure Tfrm_op_apply.bsSkinButton8Click(Sender: TObject);
VAR
str:widestring;
begin
str:='where <20><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD>=1 and '+open_data('0001','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','no');
if Edit1.text<>''then
str:=str+' and <20><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD> like '+''''+'%'+Edit1.text+'%'+'''';
if Edit2.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><ECB5A5> like '+''''+'%'+Edit2.text+'%'+'''';
if Edit3.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><E1B5A5> like '+''''+'%'+Edit3.text+'%'+'''';
if Edit4.text<>''then
str:=str+' and <20><>Ӫ<EFBFBD><D3AA>λ like '+''''+'%'+Edit4.text+'%'+'''';
if Edit5.text<>''then
str:=str+' and <20><>Ʊ<EFBFBD><C6B1> like '+''''+'%'+Edit5.text+'%'+'''';
if Edit6.text<>''then
str:=str+' and <20>ֲ<EFBFBD><D6B2><EFBFBD> like '+''''+'%'+Edit6.text+'%'+'''';
if RxDBLookupCombo2.DisplayValue<>''then
str:=str+' and ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo2.DisplayValues[1]+'''';
if RxDBLookupCombo5.DisplayValue<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo5.DisplayValues[1]+'''';
if wwDBDateTimePicker9.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker9.text+'''';
if wwDBDateTimePicker12.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker12.text+'''';
if wwDBDateTimePicker11.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker11.text+'''';
if wwDBDateTimePicker13.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker13.text+'''';
if wwDBComboBox3.text<>''then
str:=str+' and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBComboBox3.text+'''';
v_op_apply.close;
v_op_apply.sql.clear;
v_op_apply.sql.add('select * from v_op_bscard_all '+str+' order by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
v_op_apply.open;
end;
procedure Tfrm_op_apply.bsSkinButton12Click(Sender: TObject);
begin
Edit1.text:='';
Edit2.text:='';
Edit3.text:='';
Edit4.text:='';
Edit5.text:='';
Edit6.text:='';
RxDBLookupCombo2.ClearValue;
RxDBLookupCombo5.ClearValue;
wwDBDateTimePicker9.text:='';
wwDBDateTimePicker12.text:='';
wwDBDateTimePicker11.text:='';
wwDBDateTimePicker13.text:='';
wwDBComboBox3.text:='';
end;
procedure Tfrm_op_apply.DBEdit1KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit2);
end;
procedure Tfrm_op_apply.DBEdit2KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit3);
end;
procedure Tfrm_op_apply.DBEdit3KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit4);
end;
procedure Tfrm_op_apply.DBEdit4KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit18);
end;
procedure Tfrm_op_apply.DBEdit18KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo1);
end;
procedure Tfrm_op_apply.RxDBLookupCombo1KeyPress(Sender: TObject;
var Key: Char);
begin
// key_RxDBLookupCombo(Key,RxDBLookupCombo31);
end;
procedure Tfrm_op_apply.RxDBLookupCombo3KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo13);
end;
procedure Tfrm_op_apply.RxDBLookupCombo13KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit8);
end;
procedure Tfrm_op_apply.DBEdit8KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit9);
end;
procedure Tfrm_op_apply.DBEdit9KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit10);
end;
procedure Tfrm_op_apply.RxDBLookupCombo4KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit7);
end;
procedure Tfrm_op_apply.wwDBLookupCombo49KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit63);
end;
procedure Tfrm_op_apply.DBEdit63KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBDateTimePicker(Key,wwDBDateTimePicker2);
end;
procedure Tfrm_op_apply.wwDBDateTimePicker2KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBLookupCombo(Key,wwDBLookupCombo52);
end;
procedure Tfrm_op_apply.wwDBLookupCombo3KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBLookupCombo(Key,wwDBLookupCombo52);
end;
procedure Tfrm_op_apply.wwDBLookupCombo52KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo4);
end;
procedure Tfrm_op_apply.DBEdit7KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit5);
end;
procedure Tfrm_op_apply.DBEdit5KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo20);
end;
procedure Tfrm_op_apply.RxDBLookupCombo20KeyPress(Sender: TObject;
var Key: Char);
begin
// key_RxDBLookupCombo(Key,RxDBLookupCombo36);
key_wwDBLookupCombo(Key,wwDBLookupCombo1);
end;
procedure Tfrm_op_apply.DBEdit6KeyPress(Sender: TObject;
var Key: Char);
var
aQuery:TAdoQuery;
begin
if (key=#13) and (t_op_seae.State in [dsedit,dsinsert]) and (t_op_seae.FieldByName('<27><>Ӫ<EFBFBD><D3AA>λ').AsString='') then begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('select <20>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>,<2C>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client where <20><><EFBFBD>ر<EFBFBD><D8B1><EFBFBD>='''+DBEdit6.Text+'''');
Open;
if not IsEmpty then begin
if fieldbyname('<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>').AsString<>'' then
t_op_seae.FieldByName('<27><>Ӫ<EFBFBD><D3AA>λ').AsString:=fieldbyname('<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>').AsString
else
t_op_seae.FieldByName('<27><>Ӫ<EFBFBD><D3AA>λ').AsString:=fieldbyname('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString;
end;
end;
finally
FreeAndNil(aQuery);
end;
end;
key_dbedit(Key,DBEdit11);
end;
procedure Tfrm_op_apply.DBEdit11KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit12);
end;
procedure Tfrm_op_apply.DBEdit12KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit13);
end;
procedure Tfrm_op_apply.DBEdit13KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit14);
end;
procedure Tfrm_op_apply.DBEdit14KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit15);
end;
procedure Tfrm_op_apply.DBEdit15KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit16);
end;
procedure Tfrm_op_apply.DBEdit16KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit17);
end;
procedure Tfrm_op_apply.DBEdit17KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBDateTimePicker(Key,wwDBDateTimePicker1);
end;
procedure Tfrm_op_apply.wwDBDateTimePicker1KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit19);
end;
procedure Tfrm_op_apply.DBEdit19KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBDateTimePicker(Key,wwDBDateTimePicker3);
end;
procedure Tfrm_op_apply.wwDBDateTimePicker3KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit81);
end;
procedure Tfrm_op_apply.DBEdit81KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBLookupCombo(Key,wwDBLookupCombo61);
end;
procedure Tfrm_op_apply.wwDBLookupCombo61KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit20);
end;
procedure Tfrm_op_apply.DBEdit20KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit21);
end;
procedure Tfrm_op_apply.DBEdit21KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit22);
end;
procedure Tfrm_op_apply.DBEdit22KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBDateTimePicker(Key,wwDBDateTimePicker10);
end;
procedure Tfrm_op_apply.wwDBDateTimePicker10KeyPress(Sender: TObject;
var Key: Char);
begin
key_RxDBLookupCombo(Key,RxDBLookupCombo7);
end;
procedure Tfrm_op_apply.RxDBLookupCombo7KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBDateTimePicker(Key,wwDBDateTimePicker4);
end;
procedure Tfrm_op_apply.wwDBDateTimePicker4KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBDateTimePicker(Key,wwDBDateTimePicker5);
end;
procedure Tfrm_op_apply.wwDBDateTimePicker5KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBDateTimePicker(Key,wwDBDateTimePicker6);
end;
procedure Tfrm_op_apply.wwDBDateTimePicker6KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBDateTimePicker(Key,wwDBDateTimePicker7);
end;
procedure Tfrm_op_apply.wwDBDateTimePicker7KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBDateTimePicker(Key,wwDBDateTimePicker8);
end;
procedure Tfrm_op_apply.wwDBDateTimePicker8KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit23);
end;
procedure Tfrm_op_apply.DBEdit23KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit24);
end;
procedure Tfrm_op_apply.DBEdit24KeyPress(Sender: TObject;
var Key: Char);
begin
key_DBMemo(Key,DBMemo39);
end;
procedure Tfrm_op_apply.RxDBLookupCombo1Enter(Sender: TObject);
begin
RxLookupComboEnter(RxDBLookupCombo1);
end;
procedure Tfrm_op_apply.RxDBLookupCombo1Exit(Sender: TObject);
begin
RxLookupComboExit(RxDBLookupCombo1);
end;
procedure Tfrm_op_apply.RxDBLookupCombo4Exit(Sender: TObject);
begin
RxLookupComboExit(RxDBLookupCombo4);
end;
procedure Tfrm_op_apply.RxDBLookupCombo4Enter(Sender: TObject);
begin
RxLookupComboEnter(RxDBLookupCombo4);
end;
procedure Tfrm_op_apply.RxDBLookupCombo7Enter(Sender: TObject);
begin
RxLookupComboEnter(RxDBLookupCombo7);
end;
procedure Tfrm_op_apply.RxDBLookupCombo7Exit(Sender: TObject);
begin
RxLookupComboExit(RxDBLookupCombo7);
end;
procedure Tfrm_op_apply.Button1Click(Sender: TObject);
begin
if t_op_seae.isempty then
exit;
try
frm_op_add_code:=tfrm_op_add_code.Create (self);
frm_op_add_code_num:=1;
frm_op_add_code.caption:='ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1>';
frm_op_add_code.ShowModal;
finally
frm_op_add_code.Free;
frm_op_add_code:=nil;
end;
end;
procedure Tfrm_op_apply.Button2Click(Sender: TObject);
begin
if t_op_seae.isempty then
exit;
try
frm_op_add_code:=tfrm_op_add_code.Create (self);
frm_op_add_code_num:=2;
frm_op_add_code.caption:='<27><>֤<EFBFBD><D6A4>Ϣѡ<CFA2><D1A1>';
frm_op_add_code.ShowModal;
finally
frm_op_add_code.Free;
frm_op_add_code:=nil;
end;
end;
procedure Tfrm_op_apply.wwDBLookupCombo1KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit6);
end;
procedure Tfrm_op_apply.N1Click(Sender: TObject);
begin
if v_op_apply.IsEmpty then
exit;
if DBEdit73.Text='<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>' then begin
if t_op_seae.active then
if t_op_seae.State in [dsedit,dsinsert] then t_op_seae.Post;
t_op_seae.close;
t_op_seae.sql.Text:='select * from t_op_seae where <20><><EFBFBD><EFBFBD>='''+v_op_apply.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
t_op_seae.open;
{
t_op_seaeop.close;
t_op_seaeop.sql.Text:='select * from t_op_seae where <20><><EFBFBD><EFBFBD>='''+v_op_apply.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'''';
t_op_seaeop.open;
}
if not do_data('0001',t_op_seae.FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').asstring
,t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>Ա').asstring
,t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
,t_op_seae.FieldByName('<27>ͷ<EFBFBD>Ա').asstring
,t_op_seae.FieldByName('<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>').asstring
,t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring) then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
if t_op_seae.FieldByName('ҵ<><D2B5>״̬').asstring='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
begin
showmessage('<27><>Ʊҵ<C6B1><D2B5>״̬<D7B4>Ѿ<EFBFBD>Ϊҵ<CEAA><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8>');
abort;
end;
try
frm_op_date_change:=tfrm_op_date_change.Create (self);
frm_op_date_change.DataSource1.Enabled:=false;
frm_op_date_change.DataSource1.DataSet:=t_op_seae;
frm_op_date_change.DataSource1.Enabled:=true;
frm_op_date_change.ShowModal;
finally
frm_op_date_change.Free;
frm_op_date_change:=nil;
end;
end;
if DBEdit73.Text='<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>' then begin
if t_op_seai.active then
if t_op_seai.State in [dsedit,dsinsert] then t_op_seai.Post;
t_op_seai.close;
t_op_seai.sql.Text:='select * from t_op_seai where <20><><EFBFBD><EFBFBD>='''+v_op_apply.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
t_op_seai.open;
if not do_data('0002',t_op_seai.FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').asstring
,t_op_seai.FieldByName('<27><><EFBFBD><EFBFBD>Ա').asstring
,t_op_seai.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
,t_op_seai.FieldByName('<27>ͷ<EFBFBD>Ա').asstring
,t_op_seai.FieldByName('<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>').asstring
,t_op_seai.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring) then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
if t_op_seai.FieldByName('ҵ<><D2B5>״̬').asstring='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
begin
showmessage('<27><>Ʊҵ<C6B1><D2B5>״̬<D7B4>Ѿ<EFBFBD>Ϊҵ<CEAA><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8>');
abort;
end;
try
frm_op_date_change:=tfrm_op_date_change.Create (self);
frm_op_date_change.DataSource1.Enabled:=false;
frm_op_date_change.DataSource1.DataSet:=t_op_seai;
frm_op_date_change.DataSource1.Enabled:=true;
frm_op_date_change.ShowModal;
finally
frm_op_date_change.Free;
frm_op_date_change:=nil;
end;
end;
if DBEdit73.Text='<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>' then begin
if t_op_aire.active then
if t_op_aire.State in [dsedit,dsinsert] then t_op_aire.Post;
t_op_aire.close;
t_op_aire.sql.Text:='select * from t_op_aire where <20><><EFBFBD><EFBFBD>='''+v_op_apply.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
t_op_aire.open;
if not do_data('0003',t_op_aire.FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').asstring
,t_op_aire.FieldByName('<27><><EFBFBD><EFBFBD>Ա').asstring
,t_op_aire.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
,t_op_aire.FieldByName('<27>ͷ<EFBFBD>Ա').asstring
,t_op_aire.FieldByName('<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>').asstring
,t_op_aire.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring) then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
if t_op_aire.FieldByName('ҵ<><D2B5>״̬').asstring='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
begin
showmessage('<27><>Ʊҵ<C6B1><D2B5>״̬<D7B4>Ѿ<EFBFBD>Ϊҵ<CEAA><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8>');
abort;
end;
try
frm_op_date_change:=tfrm_op_date_change.Create (self);
frm_op_date_change.DataSource1.Enabled:=false;
frm_op_date_change.DataSource1.DataSet:=t_op_aire;
frm_op_date_change.DataSource1.Enabled:=true;
frm_op_date_change.ShowModal;
finally
frm_op_date_change.Free;
frm_op_date_change:=nil;
end;
end;
if DBEdit73.Text='<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>' then begin
if t_op_airi.active then
if t_op_airi.State in [dsedit,dsinsert] then t_op_airi.Post;
t_op_airi.close;
t_op_airi.sql.Text:='select * from t_op_airi where <20><><EFBFBD><EFBFBD>='''+v_op_apply.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
t_op_airi.open;
if not do_data('0004',t_op_airi.FieldByName('¼<><C2BC><EFBFBD><EFBFBD>').asstring
,t_op_airi.FieldByName('<27><><EFBFBD><EFBFBD>Ա').asstring
,t_op_airi.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring
,t_op_airi.FieldByName('<27>ͷ<EFBFBD>Ա').asstring
,t_op_airi.FieldByName('<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>').asstring
,t_op_airi.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring) then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD>');
abort;
end;
if t_op_airi.FieldByName('ҵ<><D2B5>״̬').asstring='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
begin
showmessage('<27><>Ʊҵ<C6B1><D2B5>״̬<D7B4>Ѿ<EFBFBD>Ϊҵ<CEAA><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8>');
abort;
end;
try
frm_op_date_change:=tfrm_op_date_change.Create (self);
frm_op_date_change.DataSource1.Enabled:=false;
frm_op_date_change.DataSource1.DataSet:=t_op_airi;
frm_op_date_change.DataSource1.Enabled:=true;
frm_op_date_change.ShowModal;
finally
frm_op_date_change.Free;
frm_op_date_change:=nil;
end;
end;
end;
procedure Tfrm_op_apply.bsSkinButton14Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton14.ClientToScreen(Point(0,bsSkinButton14.Height));
PopupMenu1.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_op_apply.RxDBLookupCombo31KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit41);
end;
procedure Tfrm_op_apply.DBEdit41KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit8);
end;
procedure Tfrm_op_apply.DBEdit10KeyPress(Sender: TObject;
var Key: Char);
begin
key_wwDBLookupCombo(Key,wwDBLookupCombo49);
end;
procedure Tfrm_op_apply.bsSkinSpeedButton1Click(Sender: TObject);
begin
if t_op_seae1.DataSet.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').IsNull or (t_op_seae1.DataSet['ί<>б<EFBFBD><D0B1><EFBFBD>']='') then begin
t_op_seae1.DataSet.Edit;
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>').Asstring)='<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>' then
t_op_seae1.DataSet['ί<>б<EFBFBD><D0B1><EFBFBD>']:=getwtno(1,subComp,department,employee,t_op_seae1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>'])
else
t_op_seae1.DataSet['ί<>б<EFBFBD><D0B1><EFBFBD>']:=getwtno(1,subComp,department,employee,t_op_seae1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
end;
end;
procedure Tfrm_op_apply.DBEdit6Change(Sender: TObject);
var
aQuery:TAdoQuery;
begin
if (t_op_seae.State in [dsedit,dsinsert]) then begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('select <20>ͻ<EFBFBD>ȫ<EFBFBD><C8AB> from t_crm_client where <20><><EFBFBD>ر<EFBFBD><D8B1><EFBFBD>='''+DBEdit6.text+'''');
Open;
if not IsEmpty then begin
if t_op_seae.FieldByName('<27><>Ӫ<EFBFBD><D3AA>λ').AsString='' then
t_op_seae.FieldByName('<27><>Ӫ<EFBFBD><D3AA>λ').AsString:=fieldbyname('<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>').AsString
end;
end;
finally
FreeAndNil(aQuery);
end;
end;
end;
procedure Tfrm_op_apply.t_op_seaiBeforePost(DataSet: TDataSet);
var
aQuery:TAdoQuery;
str:String;
begin
table_before_post(t_op_seai,'ί<>е<EFBFBD>λ');
table_before_post(t_op_seai,'<27><><EFBFBD><EFBFBD>Ա');
table_before_post(t_op_seai,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_op_seai,'<27>ͷ<EFBFBD>Ա');
table_before_post(t_op_seai,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_op_seai,'<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>');
table_before_post(t_op_seai,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>').Asstring)='<27>Զ<EFBFBD>ȡ<EFBFBD><C8A1>' then
if t_op_seai.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').IsNull or (trim(t_op_seai['ί<>б<EFBFBD><D0B1><EFBFBD>'])='') then
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>').Asstring)='<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>' then
t_op_seai['ί<>б<EFBFBD><D0B1><EFBFBD>']:=getwtno(2,subComp,department,employee,t_op_seai['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>'])
else
t_op_seai['ί<>б<EFBFBD><D0B1><EFBFBD>']:=getwtno(2,subComp,department,employee,t_op_seai['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
if op_empty('t_op_seai',t_op_seai) then
Abort;
if t_op_seai.FieldByName('ί<>е<EFBFBD>λ').OldValue<>t_op_seai.FieldByName('ί<>е<EFBFBD>λ').asstring then
begin
if frm_data_share.t_crm_client_all.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_op_seai.FieldByName('ί<>е<EFBFBD>λ').asstring,[])then
begin
if frm_data_share.t_crm_client_all.fieldbyname('<27>ͻ<EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>'then
begin
showmessage('<27><>ǰҵ<C7B0><D2B5>ί<EFBFBD>е<EFBFBD>λ<EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><E6A3AC><EFBFBD><EFBFBD><EFBFBD>ٽ<EFBFBD><D9BD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>лָ<D0BB><D6B8>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
abort;
end;
end;
end;
if t_op_seai.State=dsinsert then
begin
if t_op_seai.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring=''then
begin
t_op_seai['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_no(t_op_seai.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').AsDateTime,getbsno(Logininfo.CustomImp,'BI'));
t_op_seai['<27><><EFBFBD><EFBFBD>']:=get_id;
end;
t_op_seai['ҵ<><D2B5>״̬']:='<27><><EFBFBD><EFBFBD>ί<EFBFBD><CEAF>';
t_op_seai['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seai['<27><><EFBFBD><EFBFBD>'];
t_op_seai['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
end;
if strtobool(get_parameters_value(34,'false')) then
begin
if (t_op_seai.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring='') then //or (t_op_seai.fieldbyname('װ<>˷<EFBFBD>ʽ').asstring='<27><><EFBFBD><EFBFBD>')
begin
t_op_seai['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_seai['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_seai['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_seai['<27><><EFBFBD><EFBFBD><E1B5A5>'];
end;
end
else
begin
t_op_seai['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_seai['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(35,'false')) then
begin
if (t_op_seai.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring='') then //or (t_op_seai.fieldbyname('װ<>˷<EFBFBD>ʽ').asstring='<27><><EFBFBD><EFBFBD>')
begin
t_op_seai['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_seai['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_seai['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_seai['<27><><EFBFBD><EFBFBD><E1B5A5>'];
end;
end
else
begin
t_op_seai['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_seai['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(36,'false')) then
begin
if (t_op_seai.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring='') then //or (t_op_seai.fieldbyname('װ<>˷<EFBFBD>ʽ').asstring='<27><><EFBFBD><EFBFBD>')
begin
t_op_seai['ί<>б<EFBFBD>׼']:=t_op_seai['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_seai['ί<>б<EFBFBD>׼']:=t_op_seai['ί<>б<EFBFBD><D0B1><EFBFBD>'];
end;
end
else
begin
t_op_seai['ί<>б<EFBFBD>׼']:=t_op_seai['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(60,'false')) then
begin
if (trim(t_op_seai.fieldbyname('<27><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>').asstring)='') then //or (t_op_seai.fieldbyname('װ<>˷<EFBFBD>ʽ').asstring='<27><><EFBFBD><EFBFBD>')
begin
t_op_seai['<27><><EFBFBD>ر<EFBFBD>׼']:=t_op_seai['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_seai['<27><><EFBFBD>ر<EFBFBD>׼']:=t_op_seai['<27><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>'];
end;
end
else
begin
t_op_seai['<27><><EFBFBD>ر<EFBFBD>׼']:=t_op_seai['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(61,'false')) then
begin
if (trim(t_op_seai.fieldbyname('<27><><EFBFBD><EFBFBD><ECB5A5>').asstring)='') then //or (t_op_seai.fieldbyname('װ<>˷<EFBFBD>ʽ').asstring='<27><><EFBFBD><EFBFBD>')
begin
t_op_seai['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׼']:=t_op_seai['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_seai['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׼']:=t_op_seai['<27><><EFBFBD><EFBFBD><ECB5A5>'];
end;
end
else
begin
t_op_seai['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׼']:=t_op_seai['<27><><EFBFBD><EFBFBD>'];
end;
t_op_seai['<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD>']:=1;
end;
procedure Tfrm_op_apply.t_op_seaiBeforeCancel(DataSet: TDataSet);
begin
delete_no(t_op_seai);
if t_op_seai.State=dsinsert then
if not t_op_seai.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').IsNull then
delwtno(t_op_seai['ί<>б<EFBFBD><D0B1><EFBFBD>']);
end;
procedure Tfrm_op_apply.t_op_seaiBeforeDelete(DataSet: TDataSet);
begin
op_befor_post(t_op_seai,'0002');
delete_add(2,t_op_seai);
if not t_op_seai.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').IsNull then
delwtno(t_op_seai['ί<>б<EFBFBD><D0B1><EFBFBD>']);
end;
procedure Tfrm_op_apply.t_op_seaiBeforeEdit(DataSet: TDataSet);
begin
op_befor_post(t_op_seai,'0002');
end;
procedure Tfrm_op_apply.t_op_aireBeforePost(DataSet: TDataSet);
var
aQuery:TAdoQuery;
begin
table_before_post(t_op_aire,'ί<>е<EFBFBD>λ');
table_before_post(t_op_aire,'<27><><EFBFBD><EFBFBD>Ա');
table_before_post(t_op_aire,'<27>ͷ<EFBFBD>Ա');
table_before_post(t_op_aire,'һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_op_aire,'һ<>̺<EFBFBD><CCBA><EFBFBD>');
table_before_post(t_op_aire,'ҵ<><D2B5><EFBFBD><EFBFBD>Դ');
if pos('ָ<><D6B8>',t_op_aire.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD>Դ').AsString)>0 then begin
end else begin
table_before_post(t_op_aire,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_op_aire,'<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>');
end;
table_before_post(t_op_aire,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>').Asstring)='<27>Զ<EFBFBD>ȡ<EFBFBD><C8A1>' then
if t_op_aire.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').IsNull or (trim(t_op_aire['ί<>б<EFBFBD><D0B1><EFBFBD>'])='') then
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>').Asstring)='<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>' then
t_op_aire['ί<>б<EFBFBD><D0B1><EFBFBD>']:=getwtno(3,subComp,department,employee,t_op_aire['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>'])
else
t_op_aire['ί<>б<EFBFBD><D0B1><EFBFBD>']:=getwtno(3,subComp,department,employee,t_op_aire['һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
if t_op_aire.FieldByName('ί<>е<EFBFBD>λ').OldValue<>t_op_aire.FieldByName('ί<>е<EFBFBD>λ').asstring then
begin
if frm_data_share.t_crm_client_all.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_op_aire.FieldByName('ί<>е<EFBFBD>λ').asstring,[])then
begin
if frm_data_share.t_crm_client_all.fieldbyname('<27>ͻ<EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>'then
begin
showmessage('<27><>ǰҵ<C7B0><D2B5>ί<EFBFBD>е<EFBFBD>λ<EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><E6A3AC><EFBFBD><EFBFBD><EFBFBD>ٽ<EFBFBD><D9BD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>лָ<D0BB><D6B8>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
abort;
end;
end;
end;
if t_op_aire.State=dsinsert then
begin
if t_op_aire.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring=''then
begin
t_op_aire['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_no(t_op_aire.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').AsDateTime,getbsno(Logininfo.AirExpBsNo,'AE'));
t_op_aire['<27><><EFBFBD><EFBFBD>']:=get_id;
end;
t_op_aire['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_aire['<27><><EFBFBD><EFBFBD>'];
t_op_aire['ҵ<><D2B5>״̬']:='<27><><EFBFBD><EFBFBD>ί<EFBFBD><CEAF>';
t_op_aire['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
end;
t_op_aire['Ӣ<>ĺ<EFBFBD><C4BA><EFBFBD>']:=date_eng(t_op_aire.fieldbyname('һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime);
if strtobool(get_parameters_value(40,'false')) then
begin
if (trim(t_op_aire.fieldbyname('<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>').asstring)='') or (t_op_aire.fieldbyname('װ<>˷<EFBFBD>ʽ').asstring='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ') or (t_op_aire.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>ĵ<EFBFBD>') then
begin
t_op_aire['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_aire['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_aire['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=Logininfo.subcompcode+t_op_aire['<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>'];
end;
end
else
begin
t_op_aire['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_aire['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(41,'false')) then
begin
if (trim(t_op_aire.fieldbyname('<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>').asstring)='') or (t_op_aire.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>ĵ<EFBFBD>') then
begin
t_op_aire['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_aire['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_aire['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=Logininfo.subcompcode+t_op_aire['<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>'];
end;
end
else
begin
t_op_aire['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_aire['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(42,'false')) then
begin
if (trim(t_op_aire.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring)='') or (t_op_aire.fieldbyname('װ<>˷<EFBFBD>ʽ').asstring='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ') or (t_op_aire.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>ĵ<EFBFBD>') then
begin
t_op_aire['ί<>б<EFBFBD>׼']:=t_op_aire['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_aire['ί<>б<EFBFBD>׼']:=t_op_aire['ί<>б<EFBFBD><D0B1><EFBFBD>'];
end;
end
else
begin
t_op_aire['ί<>б<EFBFBD>׼']:=t_op_aire['<27><><EFBFBD><EFBFBD>'];
end;
t_op_aire['<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD>']:=1;
t_op_aire['Upload']:=1;
end;
procedure Tfrm_op_apply.t_op_aireBeforeCancel(DataSet: TDataSet);
begin
delete_no(t_op_aire);
if t_op_aire.State=dsinsert then
if not t_op_aire.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').IsNull then
delwtno(t_op_aire['ί<>б<EFBFBD><D0B1><EFBFBD>']);
end;
procedure Tfrm_op_apply.t_op_aireBeforeDelete(DataSet: TDataSet);
begin
op_befor_post(t_op_aire,'0003');
delete_add(3,t_op_aire);
if not t_op_aire.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').IsNull then
delwtno(t_op_aire['ί<>б<EFBFBD><D0B1><EFBFBD>']);
end;
procedure Tfrm_op_apply.t_op_aireBeforeEdit(DataSet: TDataSet);
begin
op_befor_post(t_op_aire,'0003');
end;
procedure Tfrm_op_apply.t_op_airiBeforePost(DataSet: TDataSet);
begin
table_before_post(t_op_airi,'ί<>е<EFBFBD>λ');
table_before_post(t_op_airi,'<27><><EFBFBD><EFBFBD>Ա');
table_before_post(t_op_airi,'<27>ͷ<EFBFBD>Ա');
table_before_post(t_op_airi,'<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>');
table_before_post(t_op_airi,'<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>');
table_before_post(t_op_airi,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_op_airi,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_op_airi,'ҵ<><D2B5><EFBFBD><EFBFBD>Դ');
if pos('ָ<><D6B8>',t_op_airi.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD>Դ').AsString)>0 then begin
end else begin
table_before_post(t_op_airi,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
table_before_post(t_op_airi,'<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>');
end;
table_before_post(t_op_airi,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>Ź<EFBFBD><C5B9><EFBFBD>').Asstring)='<27>Զ<EFBFBD>ȡ<EFBFBD><C8A1>' then
if t_op_airi.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').IsNull or (trim(t_op_airi['ί<>б<EFBFBD><D0B1><EFBFBD>'])='') then
if Trim(frm_data_share.t_sys_noset.fieldbyname('<27><><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD>').Asstring)='<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>' then
t_op_airi['ί<>б<EFBFBD><D0B1><EFBFBD>']:=getwtno(4,subComp,department,employee,t_op_airi['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>'])
else
t_op_airi['ί<>б<EFBFBD><D0B1><EFBFBD>']:=getwtno(4,subComp,department,employee,t_op_airi['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
if t_op_airi.FieldByName('ί<>е<EFBFBD>λ').OldValue<>t_op_airi.FieldByName('ί<>е<EFBFBD>λ').asstring then
begin
if frm_data_share.t_crm_client_all.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',t_op_airi.FieldByName('ί<>е<EFBFBD>λ').asstring,[])then
begin
if frm_data_share.t_crm_client_all.fieldbyname('<27>ͻ<EFBFBD>״̬').asstring='<27><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD>'then
begin
showmessage('<27><>ǰҵ<C7B0><D2B5>ί<EFBFBD>е<EFBFBD>λ<EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><E6A3AC><EFBFBD><EFBFBD><EFBFBD>ٽ<EFBFBD><D9BD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>лָ<D0BB><D6B8>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
abort;
end;
end;
end;
if t_op_airi.State=dsinsert then
begin
if t_op_airi.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring=''then
begin
t_op_airi['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_no(t_op_airi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').AsDateTime,getbsno(Logininfo.AirImpBsNo,'AI'));
t_op_airi['<27><><EFBFBD><EFBFBD>']:=get_id;
end;
t_op_airi['ҵ<><D2B5>״̬']:='<27><><EFBFBD><EFBFBD>ί<EFBFBD><CEAF>';
t_op_airi['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
end;
if strtobool(get_parameters_value(43,'false')) then
begin
if (trim(t_op_airi.fieldbyname('<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>').asstring)='') or (t_op_airi.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>ĵ<EFBFBD>') then
begin
t_op_airi['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_airi['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_airi['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=Logininfo.subcompcode+t_op_airi['<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>'];
end;
end
else
begin
t_op_airi['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_airi['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(44,'false')) then
begin
if (trim(t_op_airi.fieldbyname('<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>').asstring)='') or (t_op_airi.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>ĵ<EFBFBD>') then
begin
t_op_airi['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_airi['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_airi['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=Logininfo.subcompcode+t_op_airi['<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>'];
end;
end
else
begin
t_op_airi['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_op_airi['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(45,'false')) then
begin
if (trim(t_op_airi.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring)='') or (t_op_airi.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>ĵ<EFBFBD>') then
begin
t_op_airi['ί<>б<EFBFBD>׼']:=t_op_airi['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_op_airi['ί<>б<EFBFBD>׼']:=t_op_airi['ί<>б<EFBFBD><D0B1><EFBFBD>'];
end;
end
else
begin
t_op_airi['ί<>б<EFBFBD>׼']:=t_op_airi['<27><><EFBFBD><EFBFBD>'];
end;
t_op_airi['upload']:=1;
t_op_airi['<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD>']:=1;
end;
procedure Tfrm_op_apply.t_op_airiBeforeCancel(DataSet: TDataSet);
begin
delete_no(t_op_airi);
if t_op_airi.State=dsinsert then
if not t_op_airi.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').IsNull then
delwtno(t_op_airi['ί<>б<EFBFBD><D0B1><EFBFBD>']);
end;
procedure Tfrm_op_apply.t_op_airiBeforeDelete(DataSet: TDataSet);
begin
op_befor_post(t_op_airi,'0004');
delete_add(4,t_op_airi);
if not t_op_airi.FieldByName('ί<>б<EFBFBD><D0B1><EFBFBD>').IsNull then
delwtno(t_op_airi['ί<>б<EFBFBD><D0B1><EFBFBD>']);
end;
procedure Tfrm_op_apply.t_op_airiBeforeEdit(DataSet: TDataSet);
begin
op_befor_post(t_op_airi,'0004');
end;
procedure Tfrm_op_apply.Notebook1PageChanged(Sender: TObject);
begin
if DBEdit73.Text='<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>' then begin
t_op_seae.close;
t_op_seae.sql.Text:='select * from t_op_seae where <20><><EFBFBD><EFBFBD>='''+v_op_apply.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
t_op_seae.open;
DBEdit1.DataSource:=t_op_seae1;
DBEdit2.DataSource:=t_op_seae1;
DBEdit3.DataSource:=t_op_seae1;
DBEdit4.DataSource:=t_op_seae1;
DBEdit18.DataSource:=t_op_seae1;
RxDBLookupCombo1.DataSource:=t_op_seae1;
Notebook2.PageIndex:=0;
end;
if DBEdit73.Text='<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>' then begin
t_op_seai.close;
t_op_seai.sql.Text:='select * from t_op_seai where <20><><EFBFBD><EFBFBD>='''+v_op_apply.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
t_op_seai.open;
DBEdit1.DataSource:=t_op_seai1;
DBEdit2.DataSource:=t_op_seai1;
DBEdit3.DataSource:=t_op_seai1;
DBEdit4.DataSource:=t_op_seai1;
DBEdit18.DataSource:=t_op_seai1;
RxDBLookupCombo1.DataSource:=t_op_seai1;
Notebook2.PageIndex:=1;
end;
if DBEdit73.Text='<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>' then begin
t_op_aire.close;
t_op_aire.sql.Text:='select * from t_op_aire where <20><><EFBFBD><EFBFBD>='''+v_op_apply.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
t_op_aire.open;
DBEdit1.DataSource:=t_op_aire1;
DBEdit2.DataSource:=t_op_aire1;
DBEdit3.DataSource:=t_op_aire1;
DBEdit4.DataSource:=t_op_aire1;
DBEdit18.DataSource:=t_op_aire1;
RxDBLookupCombo1.DataSource:=t_op_aire1;
Notebook2.PageIndex:=2;
end;
if DBEdit73.Text='<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>' then begin
t_op_airi.close;
t_op_airi.sql.Text:='select * from t_op_airi where <20><><EFBFBD><EFBFBD>='''+v_op_apply.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
t_op_airi.open;
DBEdit1.DataSource:=t_op_airi1;
DBEdit2.DataSource:=t_op_airi1;
DBEdit3.DataSource:=t_op_airi1;
DBEdit4.DataSource:=t_op_airi1;
DBEdit18.DataSource:=t_op_airi1;
RxDBLookupCombo1.DataSource:=t_op_airi1;
Notebook2.PageIndex:=3;
end;
if Notebook1.PageIndex=0 then
bsSkinButton11.Caption:='<27><EFBFBD>޸<EFBFBD>'
else
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
end;
procedure Tfrm_op_apply.N2Click(Sender: TObject);
begin
if t_op_seae.Active then begin
if (t_op_seae.State=dsinsert)or(t_op_seae.State=dsedit) then
t_op_seae.post;
t_op_seae.Close;
end;
if t_op_seai.Active then begin
if (t_op_seai.State=dsinsert)or(t_op_seai.State=dsedit) then
t_op_seai.post;
end;
if t_op_aire.Active then begin
if (t_op_aire.State=dsinsert)or(t_op_aire.State=dsedit) then
t_op_aire.post;
end;
if t_op_airi.Active then begin
if (t_op_airi.State=dsinsert)or(t_op_airi.State=dsedit) then
t_op_airi.post;
end;
if not t_op_seae.active then begin
t_op_seae.close;
t_op_seae.SQL.Text:='select * from t_op_seae where <20><><EFBFBD><EFBFBD>='''+v_op_apply.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
t_op_seae.Open;
end;
if not frm_op_apply.bsSkinTabSheet1.Showing then
frm_op_apply.bsSkinTabSheet1.Show;
Notebook1.PageIndex:=1;
DBEdit1.DataSource:=t_op_seae1;
DBEdit2.DataSource:=t_op_seae1;
DBEdit3.DataSource:=t_op_seae1;
DBEdit4.DataSource:=t_op_seae1;
DBEdit18.DataSource:=t_op_seae1;
RxDBLookupCombo1.DataSource:=t_op_seae1;
Notebook2.PageIndex:=0;
try
frm_op_seae_apply_add:=tfrm_op_seae_apply_add.Create (self);
frm_op_seae_apply_add.data1.Enabled:=false;
frm_op_seae_apply_add.data1.DataSet:=t_op_seae;
frm_op_seae_apply_add.data1.Enabled:=true;
seae_apply_add_total:=true;
frm_op_seae_apply_add.ShowModal;
finally
frm_op_seae_apply_add.Free;
frm_op_seae_apply_add:=nil;
seae_apply_add_total:=false;
end;
end;
procedure Tfrm_op_apply.N4Click(Sender: TObject);
begin
if t_op_seae.Active then begin
if (t_op_seae.State=dsinsert)or(t_op_seae.State=dsedit) then
t_op_seae.post;
end;
if t_op_seai.Active then begin
if (t_op_seai.State=dsinsert)or(t_op_seai.State=dsedit) then
t_op_seai.post;
end;
if t_op_aire.Active then begin
if (t_op_aire.State=dsinsert)or(t_op_aire.State=dsedit) then
t_op_aire.post;
end;
if t_op_airi.Active then begin
if (t_op_airi.State=dsinsert)or(t_op_airi.State=dsedit) then
t_op_airi.post;
end;
if not t_op_seai.active then begin
t_op_seai.close;
t_op_seai.SQL.Text:='select * from t_op_seai where <20><><EFBFBD><EFBFBD>='''+v_op_apply.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
t_op_seai.Open;
end;
if not frm_op_apply.bsSkinTabSheet1.Showing then
frm_op_apply.bsSkinTabSheet1.Show;
Notebook1.PageIndex:=1;
DBEdit1.DataSource:=t_op_seai1;
DBEdit2.DataSource:=t_op_seai1;
DBEdit3.DataSource:=t_op_seai1;
DBEdit4.DataSource:=t_op_seai1;
DBEdit18.DataSource:=t_op_seai1;
RxDBLookupCombo1.DataSource:=t_op_seai1;
Notebook2.PageIndex:=1;
try
frm_op_seai_apply_add:=tfrm_op_seai_apply_add.Create (self);
frm_op_seai_apply_add.data1.Enabled:=false;
frm_op_seai_apply_add.data1.DataSet:=t_op_seai;
frm_op_seai_apply_add.data1.Enabled:=true;
seai_apply_add_total:=true;
frm_op_seai_apply_add.ShowModal;
finally
frm_op_seai_apply_add.Free;
frm_op_seai_apply_add:=nil;
seai_apply_add_total:=false;
end;
end;
procedure Tfrm_op_apply.bsSkinButton1Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton1.ClientToScreen(Point(0,bsSkinButton1.Height));
PopupMenu4.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_op_apply.t_op_seaeAfterPost(DataSet: TDataSet);
begin
v_op_apply.Requery;
v_op_apply.Locate('<27><><EFBFBD><EFBFBD>',t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString,[]);
Notebook1PageChanged(nil);
end;
procedure Tfrm_op_apply.N6Click(Sender: TObject);
begin
if t_op_seae.Active then begin
if (t_op_seae.State=dsinsert)or(t_op_seae.State=dsedit) then
t_op_seae.post;
end;
if t_op_seai.Active then begin
if (t_op_seai.State=dsinsert)or(t_op_seai.State=dsedit) then
t_op_seai.post;
end;
if t_op_aire.Active then begin
if (t_op_aire.State=dsinsert)or(t_op_aire.State=dsedit) then
t_op_aire.post;
end;
if t_op_airi.Active then begin
if (t_op_airi.State=dsinsert)or(t_op_airi.State=dsedit) then
t_op_airi.post;
end;
if not t_op_aire.active then begin
t_op_aire.close;
t_op_aire.SQL.Text:='select * from t_op_aire where <20><><EFBFBD><EFBFBD>='''+v_op_apply.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
t_op_aire.Open;
end;
if not frm_op_apply.bsSkinTabSheet1.Showing then
frm_op_apply.bsSkinTabSheet1.Show;
Notebook1.PageIndex:=1;
DBEdit1.DataSource:=t_op_aire1;
DBEdit2.DataSource:=t_op_aire1;
DBEdit3.DataSource:=t_op_aire1;
DBEdit4.DataSource:=t_op_aire1;
DBEdit18.DataSource:=t_op_aire1;
RxDBLookupCombo1.DataSource:=t_op_aire1;
Notebook2.PageIndex:=2;
{
try
frm_op_aire_apply_add:=tfrm_op_aire_apply_add.Create (self);
frm_op_aire_apply_add.data1.Enabled:=false;
frm_op_aire_apply_add.data1.DataSet:=t_op_aire;
frm_op_aire_apply_add.data1.Enabled:=true;
frm_op_aire_apply_add.ShowModal;
finally
frm_op_aire_apply_add.Free;
frm_op_aire_apply_add:=nil;
end;
}
end;
procedure Tfrm_op_apply.N8Click(Sender: TObject);
begin
if t_op_seae.Active then begin
if (t_op_seae.State=dsinsert)or(t_op_seae.State=dsedit) then
t_op_seae.post;
end;
if t_op_seai.Active then begin
if (t_op_seai.State=dsinsert)or(t_op_seai.State=dsedit) then
t_op_seai.post;
end;
if t_op_aire.Active then begin
if (t_op_aire.State=dsinsert)or(t_op_aire.State=dsedit) then
t_op_aire.post;
end;
if t_op_airi.Active then begin
if (t_op_airi.State=dsinsert)or(t_op_airi.State=dsedit) then
t_op_airi.post;
end;
if not t_op_airi.active then begin
t_op_airi.close;
t_op_airi.SQL.Text:='select * from t_op_airi where <20><><EFBFBD><EFBFBD>='''+v_op_apply.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
t_op_airi.Open;
end;
if not frm_op_apply.bsSkinTabSheet1.Showing then
frm_op_apply.bsSkinTabSheet1.Show;
Notebook1.PageIndex:=1;
DBEdit1.DataSource:=t_op_airi1;
DBEdit2.DataSource:=t_op_airi1;
DBEdit3.DataSource:=t_op_airi1;
DBEdit4.DataSource:=t_op_airi1;
DBEdit18.DataSource:=t_op_airi1;
RxDBLookupCombo1.DataSource:=t_op_airi1;
Notebook2.PageIndex:=3;
try
frm_op_airi_apply_add:=tfrm_op_airi_apply_add.Create (self);
frm_op_airi_apply_add.data1.Enabled:=false;
frm_op_airi_apply_add.data1.DataSet:=t_op_airi;
frm_op_airi_apply_add.data1.Enabled:=true;
frm_op_airi_apply_add.ShowModal;
finally
frm_op_airi_apply_add.Free;
frm_op_airi_apply_add:=nil;
end;
end;
procedure Tfrm_op_apply.bsSkinPageControl1Change(Sender: TObject);
begin
if frm_op_apply_create=false then
exit;
if bsSkinPageControl1.ActivePageIndex<>0 then begin
if t_op_seae.Active then
table_post(t_op_seae);
if t_op_seai.Active then
table_post(t_op_seai);
if t_op_aire.Active then
table_post(t_op_aire);
if t_op_airi.Active then
table_post(t_op_airi);
end;
if bsSkinPageControl1.ActivePage=bsSkinTabSheet5 then
begin
t_op_file.Close;
t_op_file.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=v_op_apply.FieldByName('<27><><EFBFBD><EFBFBD>').asstring;
if not t_op_file.Active then
t_op_file.open;
end
else
begin
if t_op_file.State in [dsedit,dsinsert] then t_op_file.Post;
t_op_file.close;
end;
if bsSkinPageControl1.ActivePage=bsSkinTabSheet6 then
begin
if not t_op_seaeop.Active then
t_op_seaeop.open;
end
else
begin
t_op_seaeop.close;
end;
end;
procedure Tfrm_op_apply.RxDBLookupCombo36KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit6);
end;
procedure Tfrm_op_apply.RxDBLookupCombo36Enter(Sender: TObject);
begin
// RxLookupComboEnter(RxDBLookupCombo36);
end;
procedure Tfrm_op_apply.RxDBLookupCombo36Exit(Sender: TObject);
begin
// RxLookupComboExit(RxDBLookupCombo36);
end;
procedure Tfrm_op_apply.RxDBLookupCombo37Enter(Sender: TObject);
begin
// RxLookupComboEnter(RxDBLookupCombo37);
end;
procedure Tfrm_op_apply.RxDBLookupCombo37Exit(Sender: TObject);
begin
// RxLookupComboExit(RxDBLookupCombo37);
end;
procedure Tfrm_op_apply.RxDBLookupCombo37KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit27);
end;
procedure Tfrm_op_apply.RxDBLookupCombo38Enter(Sender: TObject);
begin
// RxLookupComboEnter(RxDBLookupCombo38);
end;
procedure Tfrm_op_apply.RxDBLookupCombo38Exit(Sender: TObject);
begin
// RxLookupComboExit(RxDBLookupCombo38);
end;
procedure Tfrm_op_apply.RxDBLookupCombo38KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit46);
end;
procedure Tfrm_op_apply.RxDBLookupCombo39Enter(Sender: TObject);
begin
// RxLookupComboEnter(RxDBLookupCombo39);
end;
procedure Tfrm_op_apply.RxDBLookupCombo39Exit(Sender: TObject);
begin
// RxLookupComboExit(RxDBLookupCombo39);
end;
procedure Tfrm_op_apply.RxDBLookupCombo39KeyPress(Sender: TObject;
var Key: Char);
begin
key_dbedit(Key,DBEdit65);
end;
procedure Tfrm_op_apply.RxDBLookupCombo36Change(Sender: TObject);
var
aQuery:TAdoQuery;
begin
{
if (t_op_seae.State in [dsedit,dsinsert]) then begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD>ر<EFBFBD><D8B1><EFBFBD> from t_crm_client where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+RxDBLookupCombo36.DisplayValue+'''');
Open;
if not IsEmpty then begin
if t_op_seae.FieldByName('<27><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>').AsString='' then
t_op_seae.FieldByName('<27><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>').AsString:=fieldbyname('<27><><EFBFBD>ر<EFBFBD><D8B1><EFBFBD>').AsString
end;
end;
finally
FreeAndNil(aQuery);
end;
end;
}
end;
procedure Tfrm_op_apply.dxDBGrid1Column2CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
begin
AColor:=dxgrid_color('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>',ANode.Strings[dxDBGrid1Column2.Index]);
AFont.Color:=clblack;
end;
procedure Tfrm_op_apply.dxDBGrid1Column3CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
begin
AColor:=dxgrid_color_fee(ANode.strings[dxDBGrid1Column3.Index]);
AFont.Color:=clblack;
end;
procedure Tfrm_op_apply.t_op_seaiAfterPost(DataSet: TDataSet);
begin
v_op_apply.Requery;
v_op_apply.Locate('<27><><EFBFBD><EFBFBD>',t_op_seai.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString,[]);
Notebook1PageChanged(nil);
end;
procedure Tfrm_op_apply.t_op_aireAfterPost(DataSet: TDataSet);
begin
v_op_apply.Requery;
v_op_apply.Locate('<27><><EFBFBD><EFBFBD>',t_op_aire.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString,[]);
Notebook1PageChanged(nil);
end;
procedure Tfrm_op_apply.t_op_airiAfterPost(DataSet: TDataSet);
begin
v_op_apply.Requery;
v_op_apply.Locate('<27><><EFBFBD><EFBFBD>',t_op_airi.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString,[]);
Notebook1PageChanged(nil);
end;
procedure Tfrm_op_apply.t_op_file_itemsAfterInsert(DataSet: TDataSet);
begin
t_op_file_items.FieldByName('PID').AsInteger:=t_op_file.FieldByName('fID').AsInteger;
t_op_file_items.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_file.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
end;
procedure Tfrm_op_apply.t_op_file_itemsAfterPost(DataSet: TDataSet);
begin
t_op_file.Edit;
t_op_file.FieldByName('<27><>С').AsInteger:=t_op_file_items.RecordCount;
t_op_file.Post;
end;
procedure Tfrm_op_apply.bsSkinButton66Click(Sender: TObject);
begin
if t_op_file.RecordCount<=0 then
begin
t_op_file.Append;
t_op_file.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><><EFBFBD><EFBFBD>';
t_op_file.FieldByName('<27><>ע').AsString:='<27><>';
t_op_file.Post;
t_op_file.Append;
t_op_file.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><><EFBFBD><EFBFBD>֪ͨ';
t_op_file.FieldByName('<27><>ע').AsString:='<27><>';
t_op_file.Post;
t_op_file.Append;
t_op_file.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27>ᵥOK<4F><4B>';
t_op_file.FieldByName('<27><>ע').AsString:='<27><>';
t_op_file.Post;
t_op_file.Append;
t_op_file.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>';
t_op_file.FieldByName('<27><>ע').AsString:='<27><>';
t_op_file.Post;
t_op_file.Append;
t_op_file.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><EFBFBD><E1B5A5><EFBFBD><EFBFBD>';
t_op_file.FieldByName('<27><>ע').AsString:='<27><>';
t_op_file.Post;
t_op_file.Append;
t_op_file.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27>ᵥȷ<E1B5A5><C8B7>';
t_op_file.FieldByName('<27><>ע').AsString:='<27><>';
t_op_file.Post;
t_op_file.Append;
t_op_file.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27>յ<EFBFBD>';
t_op_file.FieldByName('<27><>ע').AsString:='<27><>';
t_op_file.Post;
t_op_file.Append;
t_op_file.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_op_file.FieldByName('<27><>ע').AsString:='<27><>';
t_op_file.Post;
t_op_file.Append;
t_op_file.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27>ᵥCOPY';
t_op_file.FieldByName('<27><>ע').AsString:='<27><>';
t_op_file.Post;
t_op_file.Append;
t_op_file.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><><EFBFBD><EFBFBD>˾<EFBFBD>˵<EFBFBD>';
t_op_file.FieldByName('<27><>ע').AsString:='<27><>';
t_op_file.Post;
t_op_file.Append;
t_op_file.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><><EFBFBD><EFBFBD>';
t_op_file.FieldByName('<27><>ע').AsString:='<27><>';
t_op_file.Post;
t_op_file.First;
end;
end;
procedure Tfrm_op_apply.bsSkinButton48Click(Sender: TObject);
var
FileStream:TFileStream;
fsize:double;
numunzipped:integer;
begin
if t_op_file.RecordCount<=0 then
begin
t_op_file.Append;
t_op_file.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><><EFBFBD><EFBFBD>';
t_op_file.FieldByName('<27><>ע').AsString:='<27><>';
t_op_file.Post;
t_op_file.Append;
t_op_file.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><><EFBFBD><EFBFBD>֪ͨ';
t_op_file.FieldByName('<27><>ע').AsString:='<27><>';
t_op_file.Post;
t_op_file.Append;
t_op_file.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27>ᵥOK<4F><4B>';
t_op_file.FieldByName('<27><>ע').AsString:='<27><>';
t_op_file.Post;
t_op_file.Append;
t_op_file.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>';
t_op_file.FieldByName('<27><>ע').AsString:='<27><>';
t_op_file.Post;
t_op_file.Append;
t_op_file.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><EFBFBD><E1B5A5><EFBFBD><EFBFBD>';
t_op_file.FieldByName('<27><>ע').AsString:='<27><>';
t_op_file.Post;
t_op_file.Append;
t_op_file.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27>ᵥȷ<E1B5A5><C8B7>';
t_op_file.FieldByName('<27><>ע').AsString:='<27><>';
t_op_file.Post;
t_op_file.Append;
t_op_file.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27>յ<EFBFBD>';
t_op_file.FieldByName('<27><>ע').AsString:='<27><>';
t_op_file.Post;
t_op_file.Append;
t_op_file.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
t_op_file.FieldByName('<27><>ע').AsString:='<27><>';
t_op_file.Post;
t_op_file.Append;
t_op_file.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27>ᵥCOPY';
t_op_file.FieldByName('<27><>ע').AsString:='<27><>';
t_op_file.Post;
t_op_file.Append;
t_op_file.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><><EFBFBD><EFBFBD>˾<EFBFBD>˵<EFBFBD>';
t_op_file.FieldByName('<27><>ע').AsString:='<27><>';
t_op_file.Post;
t_op_file.Append;
t_op_file.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><><EFBFBD><EFBFBD>';
t_op_file.FieldByName('<27><>ע').AsString:='<27><>';
t_op_file.Post;
t_op_file.First;
end;
//<2F>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD>
if OpenDialog1.Execute then begin
if Length(Opendialog1.FileName)<=95 then
begin
FileStream:=TFileStream.Create(Opendialog1.FileName,fmopenRead); //<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
try
fsize:=FileStream.size;
finally
freeandnil(FileStream);
end;
if fsize>5000000 then
begin
MessageDlg('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>ܳ<EFBFBD><DCB3><EFBFBD>5M<35><4D><EFBFBD><EFBFBD>',mtWarning,[mbyes],0);
end
else
begin
frm_main.db.BeginTrans;
try
UpLoadProFile(Opendialog1.FileName,naspath,'user','user',frm_op_apply.t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString,frm_op_apply.v_op_apply.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString,frm_op_apply.t_op_file.fieldbyname('FID').AsInteger);
{
if trim(t_op_file.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString)='<27><EFBFBD><E1B5A5><EFBFBD><EFBFBD>' then
begin
InsertSeaeStatus(t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'<27>ᵥǩ<E1B5A5><C7A9>',employee,FormatDateTime('YYYY-MM-DD',Now));
if (not GetStatus_notice(t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'֪ͨ<CDA8>ŵ<EFBFBD>'))
and (not GetStatus_notice(t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'<27>ᵥǩ<E1B5A5><C7A9>'))
and (not GetStatus_notice(t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'<27>ᵥǩ<E1B5A5><C7A9>'))
and (not GetStatus_notice(t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'<27>ᵥǩ<E1B5A5><C7A9>'))
then
UpdateMblStatus(t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'<27>ᵥǩ<E1B5A5><C7A9>');
end;
}
frm_main.db.CommitTrans;
finally
if frm_main.db.InTransaction then
begin
MessageDlg('<27>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ر<EFBFBD><D8B1><EFBFBD><EFBFBD>ԣ<EFBFBD>',mterror,[mbok],0);
frm_main.db.RollbackTrans;
end;
end;
end;
end
else
begin
MessageDlg('<27>ļ<EFBFBD><C4BC><EFBFBD>̫<EFBFBD><CCAB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܳ<EFBFBD><DCB3><EFBFBD>95<39><35><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD>',mtWarning,[mbyes],0);
exit ;
end;
end else exit ;
end;
procedure Tfrm_op_apply.bsSkinButton49Click(Sender: TObject);
begin
if t_op_file.IsEmpty then exit;
//<2F><><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD>
if t_op_file_items.fieldbyname('<27>ļ<EFBFBD><C4BC>洢').AsBoolean then
begin
DownLoadProFils(naspath,'user','user',t_op_file_items.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
end
else
begin
if SaveDialog1.Execute then
begin
DownLoadPro(Savedialog1.FileName+t_op_file.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
end
else exit ;
end;
end;
procedure Tfrm_op_apply.bsSkinButton51Click(Sender: TObject);
begin
if t_op_file.IsEmpty then exit;
//ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// op_befor_post(t_op_seae,'0001');
if t_op_file_items.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString=employee then
begin
if application.MessageBox('<27><>ȷ<EFBFBD><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?','<27><><EFBFBD><EFBFBD>:',MB_OKCANCEL)=IDOK then
t_op_file_items.delete ;
{
if t_op_file.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString='<27><EFBFBD><E1B5A5><EFBFBD><EFBFBD>' then
begin
if (not GetStatus_notice(t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'֪ͨ<CDA8>ŵ<EFBFBD>'))
and (not GetStatus_notice(t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'<27>ᵥǩ<E1B5A5><C7A9>'))
and (not GetStatus_notice(t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'<27>ᵥǩ<E1B5A5><C7A9>'))
and (not GetStatus_notice(t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'<27>ᵥǩ<E1B5A5><C7A9>'))
then
begin
UpdateMblStatus(t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'');
DelteSeaeStatus(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString,'<27>ᵥǩ<E1B5A5><C7A9>');
end;
end;
}
end;
end;
procedure Tfrm_op_apply.bsSkinButton50Click(Sender: TObject);
var
arr: array[0..MAX_PATH] of Char;
num: DWORD;
tmpfile:string ;
begin
if t_op_file.IsEmpty then exit;
//<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
if t_op_file_items.fieldbyname('<27>ļ<EFBFBD><C4BC>洢').AsBoolean then
begin
try
tmpfile:=t_op_file_items.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring ;
ShellExecute(Handle, nil, pchar(tmpfile), nil, nil, SW_NORMAL);
except
showmessage('<27><><EFBFBD>ܴ<EFBFBD><DCB4><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>飡');
end ;
end
else
begin
try
GetTempPath(MAX_PATH, arr);
tmpfile:=arr+t_op_file_items.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring ;
DownLoadPro(tmpfile) ;
ShellExecute(Handle, nil, pchar(tmpfile), nil, nil, SW_NORMAL);
except
showmessage('<27><><EFBFBD>ܴ<EFBFBD><DCB4><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>飡');
end ;
end;
end;
procedure Tfrm_op_apply.bsSkinButton67Click(Sender: TObject);
var RL,alistfiletype: TStringList;
i,j,ordno: Integer;
filename: string;
temp_qry,aAdoQuerySelect: TADOQuery;
ADOList: TList;
begin //<2F><><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6>ע<EFBFBD><D7A2><EFBFBD>ļ<EFBFBD>
ordno:=0;
alistfiletype:=TStringList.Create;
alistfiletype.Clear;
alistfiletype.Add('<27><><EFBFBD><EFBFBD>');
alistfiletype.Add('<27><><EFBFBD><EFBFBD>֪ͨ');
alistfiletype.Add('<27>ᵥOK<4F><4B>');
alistfiletype.Add('<27><><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>');
alistfiletype.Add('<27><EFBFBD><E1B5A5><EFBFBD><EFBFBD>');
alistfiletype.Add('<27>ᵥȷ<E1B5A5><C8B7>');
alistfiletype.Add('<27>յ<EFBFBD>');
alistfiletype.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
alistfiletype.Add('<27>ᵥCOPY');
alistfiletype.Add('<27><><EFBFBD><EFBFBD>˾<EFBFBD>˵<EFBFBD>');
alistfiletype.Add('<27><><EFBFBD><EFBFBD>');
temp_qry:=CreateADOQuery;
aAdoQuerySelect:=CreateADOQuery;
with temp_qry do
begin
Close;sql.Clear;
sql.Add('select <20><><EFBFBD><EFBFBD> from t_op_seae where ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><>ͨ<EFBFBD><CDA8>'' and <20><><EFBFBD><EFBFBD><E1B5A5>=:<3A><><EFBFBD><EFBFBD><E1B5A5> and װ<>˷<EFBFBD>ʽ<>''<27><><EFBFBD><EFBFBD>'' and װ<>˷<EFBFBD>ʽ<>''½<><C2BD>'' ');
end;
with aAdoQuerySelect do
begin
Close;sql.Clear;
sql.Add('select * from t_op_file where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>=:<3A>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>');
end;
if OpenDialog2.Execute then
begin
RL := TStringList.Create;
RL := TStringList(OpenDialog2.Files);
frm_input_reg := Tfrm_input_reg.Create(self);
with frm_input_reg.memtbl do
begin
EmptyTable;
Open;
end;
for i := 0 to RL.Count - 1 do
begin
filename := RL.Strings[i];
ordno:=ordno+1;
with frm_input_reg.memtbl do
begin
Append;
FieldByName('ordno').AsInteger:=ordno;
FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString:=filename;
FieldByName('ѡ<><D1A1>').AsBoolean:=true;
FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString:=ChangeFileExt(ExtractFileName(filename),'');
temp_qry.Close;
if pos('-',FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString)>0 then
temp_qry.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><E1B5A5>').Value:=copy(FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString,1,pos('-',FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString)-1)
else
temp_qry.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><E1B5A5>').Value:=FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString;
temp_qry.Open;
FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=temp_qry.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
Post;
if FieldByName('<27><><EFBFBD><EFBFBD>').AsString<>'' then
for j:= 0 to alistfiletype.count-1 do
begin
aAdoQuerySelect.Close;
aAdoQuerySelect.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
aAdoQuerySelect.Parameters.ParamByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').Value:=alistfiletype[j];
aAdoQuerySelect.Open;
if aAdoQuerySelect.IsEmpty then
begin
aAdoQuerySelect.Append;
aAdoQuerySelect.FieldByName('<27><><EFBFBD><EFBFBD>').Value:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
aAdoQuerySelect.FieldByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').Value:=alistfiletype[j];
if (trim(alistfiletype[j])='<27><><EFBFBD><EFBFBD>')
or (trim(alistfiletype[j])='<27><><EFBFBD><EFBFBD>֪ͨ')
or (trim(alistfiletype[j])='<27>ᵥOK<4F><4B>')
or (trim(alistfiletype[j])='<27><><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>')
or (trim(alistfiletype[j])='<27><EFBFBD><E1B5A5><EFBFBD><EFBFBD>')
then
aAdoQuerySelect.FieldByName('<27><>ע').Value:='<27><>'
else aAdoQuerySelect.FieldByName('<27><>ע').Value:='<27><>';
aAdoQuerySelect.Post;
end;
end;
end;
end;
try
if frm_input_reg.ShowModal = mrYes then
begin
if frm_input_reg.memtbl.IsEmpty then exit;
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(self);
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4>ļ<EFBFBD>';
frm_sys_progress.Show;
frm_sys_progress.Update;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
with frm_input_reg.memtbl do
begin
frm_sys_progress.bsSkinGauge1.MaxValue:=frm_input_reg.memtbl.RecordCount;
First;
while not eof do
begin
if (FieldByName('ѡ<><D1A1>').AsBoolean) and (FieldByName('<27><><EFBFBD><EFBFBD>').AsString<>'') then
begin
frm_main.db.BeginTrans;
try
aAdoQuerySelect.Close;
aAdoQuerySelect.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
aAdoQuerySelect.Parameters.ParamByName('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').Value:=trim(frm_input_reg.ComboBox1.Text);
aAdoQuerySelect.Open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
UpLoadProFile_pl(fieldbyname('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString,naspath,'user','user',fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString,FieldByName('<27><><EFBFBD><EFBFBD>').AsString,aAdoQuerySelect.FieldByName('Fid').Asinteger);
{
if trim(frm_input_reg.ComboBox1.Text)='<27><EFBFBD><E1B5A5><EFBFBD><EFBFBD>' then
begin
InsertSeaeStatus(FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'<27>ᵥǩ<E1B5A5><C7A9>',employee,FormatDateTime('YYYY-MM-DD',Now));
if (not GetStatus_notice(FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'֪ͨ<CDA8>ŵ<EFBFBD>'))
and (not GetStatus_notice(FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'<27>ᵥǩ<E1B5A5><C7A9>'))
and (not GetStatus_notice(FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'<27>ᵥǩ<E1B5A5><C7A9>'))
and (not GetStatus_notice(FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'<27>ᵥǩ<E1B5A5><C7A9>'))
then
UpdateMblStatus(FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'<27>ᵥǩ<E1B5A5><C7A9>');
end;
}
frm_main.db.CommitTrans;
finally
if frm_main.db.InTransaction then
begin
// MessageDlg('<27>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ر<EFBFBD><D8B1><EFBFBD><EFBFBD>ԣ<EFBFBD>',mterror,[mbok],0);
frm_main.db.RollbackTrans;
end
else
begin
end;
end;
end;
Next;
end;
end;
end;
finally
frm_sys_progress.close;
frm_sys_progress:=nil;
FreeAndNil(frm_input_reg);
FreeAndNil(temp_qry);
alistfiletype.Free;
aAdoQuerySelect.Free;
end;
end;
end;
procedure Tfrm_op_apply.DownLoadPro(fname: string);
const
MaxBufSize=$F000;
var
myfilename:string;//<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
myfileStream,exeBlobStream:TStream;
Count,BufSize,N: Integer;
Buffer:PChar;
begin
//<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(self);
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ򡣡<C8BA><F2A1A3A1><EFBFBD>';
frm_sys_progress.Show;
frm_sys_progress.Update;
myfilename:=FName ;
with t_op_file_items do
begin
myfilename:=myfilename ; //+fieldbyname('<27><><EFBFBD><EFBFBD>').asstring ;
myfileStream :=TFileStream.Create(myfilename,fmCreate);//<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
try //SaveToStream(Stream);
ExeBlobStream:=CreateBlobStream(FieldByName('<27><><EFBFBD><EFBFBD>'),bmRead); //<2F><><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD>ȡ<EFBFBD>ü<EFBFBD>¼
Count:=0;
try
if Count=0 then
begin
ExeBlobStream.Position:=0;
Count:=ExeBlobStream.Size;//showmessage(inttostr(count));
end;
if Count>MaxBufSize then BufSize:=MaxBufSize else BufSize:=Count;
GetMem(Buffer,BufSize);
frm_sys_progress.bsSkinGauge1.MaxValue:=(Count div BufSize)+2;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
try
while Count<>0 do
begin
if Count>BufSize then N:=BufSize else N:=Count;
ExeBlobStream.ReadBuffer(Buffer^,N);//<2F><><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
MyFileStream.WriteBuffer(Buffer^,N);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD>ļ<EFBFBD>
Dec(Count,N);
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
end;
finally
FreeMem(Buffer,BufSize);
end;
finally
ExeBlobStream.Free;
end;
finally
myfileStream.Free;
// frm_sys_progress.close;
//frm_sys_progress:=nil;
//frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_sys_progress.close;
frm_sys_progress:=nil;
end;
end;
end;
procedure Tfrm_op_apply.UpLoadPro(fname: string);
const
BufSize=$F000;
var
Counter, N: Integer;
Buffer: PAnsiChar;
FieldStrm: TStream;
ExeFileStream:TFileStream;
//ExeFileStream:TMemoryStream;
size_tmp: Double;
filename,fileExt:string ;
begin
//<2F>ϴ<EFBFBD><CFB4>ļ<EFBFBD>
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(self);
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ򡣡<C8BA><F2A1A3A1><EFBFBD>';
frm_sys_progress.Show;
frm_sys_progress.Update;
filename:=ExtractFileName(fname) ;
fileExt:=ExtractFileExt(filename) ;
ExeFileStream:=TFileStream.Create(fname,fmopenRead); //<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
// ExeFileStream:=TCompressionStream.Create(clMax,TStream(ExeFileStream));
with t_op_file_items do
begin
Open;
append;
try
FieldStrm := CreateBlobStream(FieldByName('<27><><EFBFBD><EFBFBD>'),bmWrite);
GetMem(Buffer,BufSize);
try
Counter := ExeFileStream.Size;
size_tmp :=ExeFileStream.Size;
frm_sys_progress.bsSkinGauge1.MaxValue:=(Counter div BufSize)+2;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
while Counter<>0 do
begin
if Counter>BufSize then N :=BufSize else N:=Counter;
ExeFileStream.ReadBuffer(Buffer^,N);
FieldStrm.WriteBuffer(Buffer^, N);
Dec(Counter, N);
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
// Application.ProcessMessages;
end;
finally
FreeMem(Buffer,BufSize);
FieldStrm.Free;
end;
FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=filename;
FieldByName('<27><>С').AsFloat:=size_tmp;
FieldByName('<27>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=now();
FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asstring:=employee;
FieldByName('<27><><EFBFBD><EFBFBD>').Asstring:=fileExt;
Post;
Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>!','<27><>ʾ',MB_OK+MB_IconInformation);
finally
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_sys_progress.close;
frm_sys_progress:=nil;
ExeFileStream.Free;
end;
end;
end;
procedure Tfrm_op_apply.DownLoadProFils(RemotePathName,Users,pw,fname: string);
var path,newpath,Filters:string;
NetSource :TNetResource;
begin
with NetSource do
begin
dwType := RESOURCETYPE_ANY;
lpLocalName :=''; // <20><>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>Դӳ<D4B4><EFBFBD><E4B5BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
lpRemoteName:=pChar(RemotePathName); // Զ<><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ
lpProvider :='';
end;
WnetAddConnection2(NetSource, pChar(Users),pChar(pw),CONNECT_UPDATE_PROFILE);
with SaveDialog1 do
begin
FileName:=ExtractFileName(fname);
Filters:=ExtractFileExt(fname);
Filter:='*'+ExtractFileExt(fname);
if Execute then
begin
path:=fname;
newpath:=SaveDialog1.FileName+Filters;
if CopyFile(pChar(path),pChar(newpath),false) then
//showmessage('<27><><EFBFBD>سɹ<D8B3>')
else showmessage('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>');
end;
end;
try
finally
WNetCancelConnection2(pChar(RemotePathName),CONNECT_UPDATE_PROFILE,True);
end;
end;
procedure Tfrm_op_apply.UpLoadProFile(fname,RemotePathName,Users,pw,mblNo,bsno:string;fid:integer);
var path,newpath:string;
NetSource :TNetResource;
filePath,filename,fileExt:string;
begin
//<2F>ϴ<EFBFBD><CFB4>ļ<EFBFBD>
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(self);
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ򡣡<C8BA><F2A1A3A1><EFBFBD>';
frm_sys_progress.Show;
frm_sys_progress.Update;
filename:=ExtractFileName(fname) ;
fileExt:=ExtractFileExt(filename) ;
with NetSource do
begin
dwType := RESOURCETYPE_ANY;
lpLocalName :=''; // <20><>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>Դӳ<D4B4><EFBFBD><E4B5BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
lpRemoteName:=pChar(RemotePathName); // Զ<><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ
lpProvider :='';
end;
WnetAddConnection2(NetSource, pChar(Users),pChar(pw),CONNECT_UPDATE_PROFILE);
filePath:=FormatDateTime('YYYYMM',DatabaseDateTime);
if not DirectoryExists(RemotePathName+'\'+filePath) then
MkDir(RemotePathName+'\'+filePath);
if not DirectoryExists(RemotePathName+'\'+filePath+'\'+mblNo) then
MkDir(RemotePathName+'\'+filePath+'\'+mblNo);
newpath:=RemotePathName+'\'+filePath+'\'+mblNo+'\'+filename;
if CopyFile(pChar(fname),pChar(newpath),false) then
else ;
try
finally
WNetCancelConnection2(pChar(RemotePathName),CONNECT_UPDATE_PROFILE,True);
end;
with t_op_file_items do
begin
Close;SQL.Clear;
sql.Add('select * from t_op_file_items');
sql.Add('where PID=:PID and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
Parameters.ParamByName('PID').Value:=fid;
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=bsno;
Open;
try
append;
FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=newpath;
FieldByName('<27>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=now();
FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asstring:=employee;
FieldByName('<27><><EFBFBD><EFBFBD>').Asstring:=fileExt;
FieldByName('<27>ļ<EFBFBD><C4BC>洢').AsBoolean:=true;
FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=bsno;
FieldByName('pid').AsInteger:=fid;
Post;
// Application.MessageBox('<27><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>!','<27><>ʾ',MB_OK+MB_IconInformation);
finally
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_sys_progress.close;
frm_sys_progress:=nil;
end;
end;
end;
procedure Tfrm_op_apply.UpLoadProFile_pl(fname,RemotePathName,Users,pw,mblNo,bsno:string;fid:integer);
var path,newpath:string;
NetSource :TNetResource;
filePath,filename,fileExt:string;
t_op_file_items_pl,t_op_file_items_Update:TAdoQuery;
c:integer;
begin
//<2F>ϴ<EFBFBD><CFB4>ļ<EFBFBD>
filename:=ExtractFileName(fname) ;
fileExt:=ExtractFileExt(filename) ;
with NetSource do
begin
dwType := RESOURCETYPE_ANY;
lpLocalName :=''; // <20><>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>Դӳ<D4B4><EFBFBD><E4B5BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
lpRemoteName:=pChar(RemotePathName); // Զ<><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ
lpProvider :='';
end;
WnetAddConnection2(NetSource, pChar(Users),pChar(pw),CONNECT_UPDATE_PROFILE);
filePath:=FormatDateTime('YYYYMM',DatabaseDateTime);
if not DirectoryExists(RemotePathName+'\'+filePath) then
MkDir(RemotePathName+'\'+filePath);
if not DirectoryExists(RemotePathName+'\'+filePath+'\'+mblNo) then
MkDir(RemotePathName+'\'+filePath+'\'+mblNo);
newpath:=RemotePathName+'\'+filePath+'\'+mblNo+'\'+filename;
if CopyFile(pChar(fname),pChar(newpath),false) then
else ;
RenameFile(filename,filename+'.bak');
try
finally
WNetCancelConnection2(pChar(RemotePathName),CONNECT_UPDATE_PROFILE,True);
end;
t_op_file_items_pl:=CreateAdoQuery_file;
t_op_file_items_Update:=CreateAdoQuery;
with t_op_file_items_pl do
try
Close;SQL.Clear;
sql.Add('select * from t_op_file_items');
sql.Add('where PID=:PID and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
Parameters.ParamByName('PID').Value:=fid;
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=bsno;
Open;
append;
FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=newpath;
FieldByName('<27>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=now();
FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asstring:=employee;
FieldByName('<27><><EFBFBD><EFBFBD>').Asstring:=fileExt;
FieldByName('<27>ļ<EFBFBD><C4BC>洢').AsBoolean:=true;
FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=bsno;
FieldByName('pid').AsInteger:=fid;
Post;
c:=Recordcount;
with t_op_file_items_Update do
begin
Close;SQL.Clear;
sql.Add('Update t_op_file set <20><>С=:c');
sql.Add('where FID=:FID');
Parameters.ParamByName('FID').Value:=fid;
Parameters.ParamByName('c').Value:=c;
Execsql;
end;
finally
Free;
t_op_file_items_Update.Free;
end;
end;
procedure Tfrm_op_apply.WMDROPFILES(var Msg: TMessage);
var
FilesCount: Integer; // <20>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
i: Integer;
FileName: array[0..255] of Char;
begin
// <20><>ȡ<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
FilesCount := DragQueryFile(Msg.WParam, $FFFFFFFF, nil, 0);
// <20><>ȡ<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
for i := 0 to FilesCount - 1 do
begin
DragQueryFile(Msg.WParam, i, FileName, 256);
ShowMessage(FileName);
end;
// <20>ͷ<EFBFBD>
DragFinish(Msg.WParam);
end;
procedure Tfrm_op_apply.N19Click(Sender: TObject);
var
aQuery:TADOQuery;
bsno:string;
begin
{
v_op_apply.Edit;
v_op_apply.FieldByName('ҵ<><D2B5>״̬').AsString:='<27><><EFBFBD><EFBFBD>ί<EFBFBD><CEAF>';
v_op_apply.Post;
}
if t_op_seae.Active then begin
t_op_seae.Edit;
t_op_seae.FieldByName('ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><><EFBFBD>ܱ<EFBFBD><DCB1><EFBFBD>';
t_op_seae.Post;
end else begin
aQuery:=CreateAdoQuery();
try
with aQuery do begin
Close;sql.text:='update t_op_seae set ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD>ܱ<EFBFBD><DCB1><EFBFBD>'' where <20><><EFBFBD><EFBFBD>='''+v_op_apply.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
ExecSQL;
end;
finally
freeandnil(aQuery);
end;
end;
InsertSeaeStatus(v_op_apply.FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'<27><><EFBFBD>ܱ<EFBFBD><DCB1><EFBFBD>',employee,FormatDateTime('YYYY-MM-DD',Now));
bsno:= v_op_apply.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
v_op_apply.Requery();
v_op_apply.Locate('<27><><EFBFBD><EFBFBD>',bsno,[]);
end;
procedure Tfrm_op_apply.dxDBGrid4Click(Sender: TObject);
begin
with t_op_file_items do
begin
Close;SQL.Clear;
sql.Add('select * from t_op_file_items');
sql.Add('where PID=:PID and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
Parameters.ParamByName('PID').Value:=t_op_file.FieldByName('fid').AsInteger;
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_file.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
Open;
end;
end;
procedure Tfrm_op_apply.dxDBGrid4CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
begin
if trim(ANode.Strings[dxDBGrid4Column3.Index])='<27><>' then begin
AColor:=clMoneyGreen;
exit;
end;
end;
procedure Tfrm_op_apply.N21Click(Sender: TObject);
var
aQuery:TADOQuery;
begin
if t_op_seae.Active then begin
t_op_seae.Edit;
t_op_seae.FieldByName('ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27><><EFBFBD>ر<EFBFBD><D8B1><EFBFBD>';
t_op_seae['<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD>']:=0;
t_op_seae.Post;
end else begin
aQuery:=CreateAdoQuery();
try
with aQuery do begin
Close;sql.text:='update t_op_seae set ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD>ر<EFBFBD><D8B1><EFBFBD>'',<2C><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD>=0 where <20><><EFBFBD><EFBFBD>='''+v_op_apply.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
ExecSQL;
end;
finally
freeandnil(aQuery);
end;
end;
InsertSeaeStatus(v_op_apply.FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'<27><><EFBFBD>ر<EFBFBD><D8B1><EFBFBD>',employee,FormatDateTime('YYYY-MM-DD',Now));
// bsno:= v_op_apply.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
v_op_apply.Requery();
// v_op_apply.Locate('<27><><EFBFBD><EFBFBD>',bsno,[]);
end;
end.