非常感谢常德-ZEN的耐心帮助 --------------------------------------------------------------------------- int _check() { gui_trigger_click("SpeedButton_Check");//模拟鼠标点击审核按钮 }; int _copy_create() { menu_trigger_click("Popu_Copy_And_Create");//复制本单新增 }; int _delay() { }; int init_test() { return 1; }; int func_user_menu_1() { int i; string v; i=3; user_para_set(v,i); return 1; }; int func_user_menu_2() { string v; msg(user_para_get(v)); return 1; }; int func_user_menu_3() { string v; user_para_set(v,''); return 1; }; int func_user_menu_4() { return 1; }; int create_voucher() { v_show_user_menu(1,'TEST 1'); v_show_user_menu(2,'TEST 2'); v_show_user_menu(3,'TEST 3'); string v,i; i=3;//初始化需要新增的次数 if(user_para_get(v)=='') msg('yes'); user_para_set(v,i);//设置需要新增多少次的全局参数 msg(user_para_get(v)); return 1; }; int func_show() { string v,sql; sql="select state from ebs_v where voucher_no='"+ gui_get_val("Edit_Voucher_No") +"'"; db_run(sql); if(to_int(user_para_get(v))>0 && db_res(0)=='') { _check(); msg('amazing!'); }; return 1; }; int cell_change() { //change_col,change_col_id,change_row_id return 1; }; int obj_change() { //change_obj return 1; }; int init_row() { return 1; }; int adjust_row() { return 1; }; int func_before_print() { //can_print=1; return 1; }; int func_before_save() { //can_save=1; return 1; }; int func_before_check() { //can_check=1; return 1; }; int func_after_save() { return 1; }; int func_after_check() { string v,i; i=user_para_get(v);//获取全局变量的值 msg(i); if(to_int(i)>1) { user_para_set(v,i-1); _copy_create(); }; return 1; }; int func_after_print() { return 1; }; int func_before_oper() { //oper_type=save,check,check_r,finish,finish_r,delete,giveup,ask_check,ask_check_r; //can_oper=1; return 1; }; int func_after_oper() { //oper_type=save,check,check_r,finish,finish_r,delete,giveup,ask_check,ask_check_r; return 1; }; int main() { return 1; }; |