123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397 |
- $PBExportHeader$app_cust.sra
- $PBExportComments$Generated Application Object
- forward
- global type app_cust from application
- end type
- global transaction sqlca
- global dynamicdescriptionarea sqlda
- global dynamicstagingarea sqlsa
- global error error
- global message message
- end forward
- global variables
- String publ_operator = "super" //操作员名
- String publ_userid //操作员id
- String sys_right //权限串
- String sys_psw //用户密码
- String sys_cardno //卡号
- String sys_superpsw = '4646464646' //超级密码
- String sys_user_storagestr //仓库串
- Long sys_user_storageid[] //仓库数组
- Long sys_all_storageid[] //全部仓库数组
- String sys_shortcut //快捷方式串
- String sys_areastr //区域串
- Long sys_areaid[] //区域数组
- String sys_user_scstr //分部权限串
- Long sys_user_scid[] //分部数组
- Long sys_scid = 0 //分部ID -1 全部[历史]
- Long sys_empid = 0 //当前操作员ID
- Boolean if_hisdb = FALSE //是否历史数据库
- long sys_user_spttype[] // 供应商类别数组
- string sys_user_spttypestr //供应商类别串
- ////////注意
- int sys_mode = 0 //0全部 1旧版模式,安吉
- string Ajstr = ",1,30,60,70,53,41,221,222," //过滤权限
- long cc = 14215660
- String sys_computer_key
- Boolean sys_power_issuper = FALSE
- //超级用户标志
- String sys_super_name = '超级用户'
- String sys_super_id = 'super'
- //超级用户id
- String sys_inifilename = 'ljerp_pulg.ini'
- String sys_inifilename_other = 'Ecleverv25_other_wiz.ini'
- //指定系统ini文件
- String sys_power_key = '123457851239866'
- String sys_system_id = '800001ljsalerv2.5'
- //版本
- String sys_prg_id = '800001'
- String sys_cur_version = '2.5.020805'
- String sys_curDB_version=''
- String sys_Allow_version = '2.5.060601'
- int sys_version_type = 0 // 1,商业版;0,工业版;2,工业版+
- int sys_if_register = 1 //软件注册标记
- int sys_if_network = 1 // 网络版标记
- //419249027573405627908568719049
- //系统信息
- String sys_message_username = '有限公司'
- String sys_message_title = "龙嘉企精灵管理信息系统V3.0"
- String sys_message_report_title = "有限公司"
- String sys_message_customer_tel = ""
- String sys_message_customer_sit = ""
- String sys_message_customer_sitcode = ""
- String sys_message_customer_bank = ""
- String sys_message_customer_bankname = ""
- String sys_message_customer_fax = ""
- String sys_message_maker = "顺德区龙嘉软件有限公司"
- String sys_message_copyright_inc = "2001-04-10"
- String sys_message_copyright_ine = ""
- String sys_message_version = "v1"
- String sys_cur_path = ''
- String sys_message_copytime = "2001-04-10"
- String sys_message_timeoutdate = "2001.08.01"
- Date sys_begin_date = 2001-04-13
- Int sys_show_bsn = 0 //0-显示业务内容 1-只显示售价管理
- String sys_flashbmpname = 'flashwinpic.bmp' //开始窗口的图片名称
- DateTime sys_showsaledata_mindt
- //datetime sys_salershowdate_BG
- //datetime sys_salershowdate_ED
- Long sys_option_buyprice_type = 1 //库存批号类型 1:批号手动,2:批号单价
- String sys_option_winrar_path = 'c:\program files\winrar\' //winrar路径
- Int sys_option_timeout = 300 //系统注消时间
- Boolean local_retrieve_all = FALSE //分页显示-----true:不分页,false:分页
- Int sys_option_mustprint = 0 //单据逐张打印
- Int sys_option_autoyes = 0 //自动是订单或计划
- Int sys_option_auditprint = 0 //收货单先审核后打印
- Int sys_option_auditprint_saletask = 0 //销售订单先审核后打印
- Int sys_option_auditprint_sale = 0 //销售单审核认后打印
- Int sys_option_auditprint_buy = 0 //采购订单审核认后打印
- Int sys_option_ifovertask = 1 //用超订货收货
- Int sys_option_aloweditstatus = 0 //规格颜色先定义
- Int sys_option_cusarea = 0 //区域限制
- Int sys_option_input_days = 60 //单据录入天数限制
- Int sys_option_if_color = 0 //按颜色拆装
- String sys_option_change_pcode = '' //面料文本
- String sys_option_change_woodcode = '' //材质文本
- String sys_option_change_status = '' //颜色文本
- String sys_option_change_usermtrlmode = '' //自定义3
- String sys_option_change_mtrlsectype = '' //物料自定义文本1
- String sys_option_change_zxmtrlmode = '' //物料自定义文本2
- Int sys_option_price_if_status = 0 //销售价按颜色约束
- Int sys_option_price_if_list = 0 //销售价取价格表
- Int sys_option_unit_dec = 5 //单位转换小数点
- Int sys_option_confirmaudit_sale = 0 //销售单先确认后审核
- Decimal sys_option_cust_rate = 1 //客户最低返率
- Int sys_option_use_msttake = 1 //系统使用应收帐模块
- Int sys_option_use_mstpay = 1 //系统使用应付帐模块
- Int sys_option_autowaste = 0 //自动废弃销售单
- Int sys_option_saletask_addware = 0 //订单审核自动加0库存
- Int sys_option_saletask_addware_taskqty = 0 //订单审核自动加订单库存开关
- dec sys_option_saletask_addware_taskqty_qty = 0 //订单审核自动加订单库存数量
- int sys_option_confirmprint_sale=0 //销售单先确认后打印
- int sys_option_addqty=1 //辅数约束1:约束,0:不约束
- string sys_option_change_otheramt_buy = '' //采购收货单优惠金额文本
- boolean if_switchdb=false //是否使用切换数据库功能
- String sys_switchpsw = '' //切换密码
- String sys_option_switchpath = '' //切换程序路径
- int sys_option_switch_Chktime=2 //检查时隔
- string sys_option_switch_Sername='' //切换数据库服务名称
- string sys_option_switch_Dbname='' //切换数据库名称
- string sys_option_switch_LoginID='' //切换数据库登录用户
- string sys_option_switch_LoginPsw='' //切换数据库登录用户
- string sys_option_returnpsw='' //返回原数据连接密码
- int sys_option_buy_rateedit=0 //采购进仓单转换率是否可修改
- Transaction sys_remote_sqlca[] //远程事务对象数组
- Int sys_remote_sqlca_p = 0 //远程事务对象数组指针
- Transaction dataincept_sqlca //数据传递事务对象
- Transaction source_sqlca //原切换数据库事务对象
- int sys_option_mst_multimoney=0 //销售应收帐使用多币种结算
- decimal sys_option_dlsecends = 15 //刷卡等待时间(秒)
- int sys_dismantle_install_check=0 //拆装单检查拆装数量
- int sys_saleamt_round=2 //销售订单、销售单整正处理//0:元位,1:角位,:2:分位
- int sys_spt_hideinfo = 0 //隐藏供应商信息
- int sys_option_allow_edit_outrep = 0 //销售单可修改业务员
- int sys_option_buyprice_ifbj = 0 //收货按报价取价
- int sys_option_buylimit_ifbj = 0 //收货按报价限价
- int sys_option_cost_dec = 5 //库存成本价小数位
- int sys_option_buyprice_buytask_limit = 0 //采购订单限制价格
- int sys_option_inware_cp_assignqty = 0 //允许超排产数生产进仓
- int sys_option_taskwork_mod_price //计件单选工序不可改单价
- int sys_option_saletask_plan = 1 //销售订单默认安排 1无,2采购,3生产,4按产品属性
- int sys_option_inwarecp_saleprice = 0 //生产进仓选订单带订单单价,(计划价)
- int sys_option_planprice_configure = 0 //产品计划价按配置
- int sys_option_planprice_directinput = 1 //产品计划价允许直接录入
- int sys_option_inwarecp_planprice = 0 //生产进仓单允许录入单价
- int sys_option_abnormity_price = 0 //计件单加选项不能修改单价
- int sys_option_2unit = 0 //外协双单位核算
- int sys_option_2unit_ch = 1 //外协双单位使用物料定义辅助单位. 1 - 是. 0-选择单位定义资料
- string sys_option_cmpl_status_qty = '' //属性计算关键字
- String sys_option_change_otheramt = '' //销售发货单优惠金额文本
- int sys_option_packqty_sale = 0 //销售发货单允许手动录入包装数量
- //dw2xls变量
- String gs_path
- //日期控件
- Date id_date_selected
- datastore sys_ds_funcinfo
- datastore sys_ds_maininfo
- datastore sys_ds_shortcutinfo
- datastore sys_ds_userinfo
- window w_curwin
- String publ_logoico_name_normal = "ljprj_logo.ico" //托盘图标所用图标名
- //file
- Transaction sys_fileDB_sqlca //文件附件数据库连接
- String sys_user_class_edit_str //附件编辑权限串
- String sys_user_class_view_str //附件查看权限串
- String ins_fjtemppath = 'fjtemp' //附件下载路径
- //xls bill
- String sys_user_xls_print_str //xls单据打印 权限串 '0' 则全部允许
- String sys_user_xls_send_str //xls单据 发送 权限串 '0' 则全部允许
- Int sys_option_xls_ifuse_passwd = 1 //0,随机密码;1,用sys_option_xls_user_passwd设置的密码
- String sys_option_xls_user_passwd = '' //xls输出的加密密码
- Int sys_option_xls_lock = 0 //xls输出是否锁定,0-锁,1-不锁
-
-
- string sys_help_chm = '龙嘉企精灵帮助.chm'
- String sys_right_rpt = '0' //自定义单据打印格式权限串
- string sys_option_pos_jsbarcode =''
- string sys_user_pluginsstr //外挂串
- long sys_user_plugins[] //外挂数组
- string sys_user_reportstr // 模板式自定义报表串
- long sys_user_report[] // 模板式自定义报表数组
- datastore ds_bf_mtrltype
- datastore ds_bf_retr_mtrltype
- String sys_ServerNameFJ
- String sys_DataBaseFJ //附件数据库名称
- String sys_LoginIDFJ
- String sys_LoginPwdFJ
- oleobject AppCom, FXAppCom
- string app_token
- string app_token_fx // 分销系统的token
- int app_cusid
- string app_cuscode
- string app_cusname
- string app_username // 分销系统 与圣萝莎重用
- string app_custype
- string app_tele // 分销系统 与圣萝莎重用
- string app_address // 分销系统 与圣萝莎重用
- string app_freight // 分销系统 与圣萝莎重用
- string app_freight_tele // 分销系统 与圣萝莎重用
- string app_comname // 分销系统企业名
- string app_comtele // 分销系统企业电话
- long app_usertype // 分销系统用户类型 1-采购人员 2-销售人员 3-管理人员
- string app_fx_title_erp // 协同系统对应ERP企业名称
- long app_iferpuser // ERP用户
- // 停用
- string app_myrelcode // 分销系统ERP企业编号
- long app_relationtype // 分销系统 本企业类型(0-客户 1-供应商)
- // 停用
- boolean app_login = false
- // 协同系统当前已打开的窗口(以funcid为数组下标)
- s_fx_win s_win_open[]
- // 协同系统菜单
- //datastore ds_menu
- datastore sys_func_all // 协同系统全部权限的权限树,不要进行filter sort dertroy操作
- datastore sys_func_pwr // sys_func_pwr 存放当前用户的权限树
- // 协同系统龙嘉邮件邮箱(当前用户)
- datastore sys_ds_ljmailbox
- // 协同主界面默认自动刷新频率(秒)
- long app_retrieve_interval = 30
- // 协同系统配置文件
- string sys_fx_ini = 'fx_server.ini'
- string sys_fx_positon = 'fx_position.ini'
- // dw-F2功能显示窗体对象名用--相当于L1的clname
- string sys_dw_f2_win_name
- boolean runtimeLog = false // 是否记录日志标记,测试用
- string sys_kms_root = "http://kms.longjoe.com:82"
- end variables
- global type app_cust from application
- string appname = "app_cust"
- end type
- global app_cust app_cust
- type prototypes
- subroutine keybd_event(uint bvk,uint bscan,long dwflags,long dwextrainfo ) library 'user32.dll'
-
- Public Function Long LoadImage (Long hInst, String lpsz, Long un1, Long n1, Long n2, Long un2) Library "user32" Alias For "LoadImageA;Ansi"
- Public Function Integer Shell_NotifyIcon (Long dwMessage, Any lpData) Library "shell32" Alias For "Shell_NotifyIconA"
- Public Function Long DestroyIcon (Long hIcon) Library "user32" Alias For "DestroyIcon"
- function long ShellExecute32( long hWindow, string lpOperation, string lpFile, &
- string lpParameters, string lpDirectory, long nShowCmd ) Library "shell32" Alias For "ShellExecuteA;Ansi"
- Function Long HtmlHelpA (long hwnd ,string lpHelpFile , long wCommand, string dwData) Library "hhctrl.ocx" alias for "HtmlHelpA;Ansi"
- Function Long SetCapture(Long hwnd) library "user32"
- Function Long ReleaseCapture() library "user32"
- Function long GetTempPath (Long nBufferLength, ref string lpBuffer) Library "kernel32" Alias for "GetTempPathA;Ansi"
- end prototypes
- forward prototypes
- public function integer wf_create_fx_ini_file ()
- end prototypes
- public function integer wf_create_fx_ini_file ();int rslt = 1
- // 创建协同系统INI文件
- if (not FileExists(sys_fx_ini)) then
- FileOpen(sys_fx_ini, LineMode!, Write!, Shared!, Replace!)
- end if
- if (not FileExists(sys_fx_positon)) then
- FileOpen(sys_fx_positon, LineMode!, Write!, Shared!, Replace!)
- end if
- return rslt
- end function
- on app_cust.create
- appname="app_cust"
- message=create message
- sqlca=create transaction
- sqlda=create dynamicdescriptionarea
- sqlsa=create dynamicstagingarea
- error=create error
- end on
- on app_cust.destroy
- destroy(sqlca)
- destroy(sqlda)
- destroy(sqlsa)
- destroy(error)
- destroy(message)
- end on
- event open;//messagebox('', GetCurrentDirectory())
- //return
- Int rslt = 1
- String arg_msg
- Boolean lb_update
- // 编译之前进行修改,true为分销系统门店客户端,false为圣萝莎客户端
- boolean fxSvr = true
- if fxSvr then
- if (f_init_fxappcom() = 1) then
- //Open(w_fx_welcome)
- wf_create_fx_ini_file()
- Open(w_login_fx)
- end if
- return
- end if
- uo_reghelper ll_reghelper
- ll_reghelper = Create uo_reghelper
- AppCom = Create oleobject
- IF ll_reghelper.ConnectToNewObject("SanrossDll.AppCom", "SanrossDll.dll", AppCom, arg_msg) <> 1 THEN
- rslt = 0
- GOTO ext
- END IF
- String url
- url = ProfileString('sanross.ini', 'sanross', 'url', '')
- //url = 'http://127.0.0.1:8087/webapi.ashx'
- IF AppCom.SetUrl(url) <> True THEN
- rslt = 0
- arg_msg = '初始化控件失败'
- GOTO ext
- END IF
- lb_update = AppCom.AutoUpdate(Ref arg_msg)
- IF arg_msg <> '' THEN
- MessageBox('提示', '自动更新失败,' + arg_msg)
- ELSE
- IF lb_update THEN
- MessageBox('提示', '程序更新成功,程序即将关闭,请手动重新启动')
- rslt = 0
- GOTO ext
- END IF
- END IF
- ext:
- Destroy ll_reghelper
- IF rslt = 1 THEN
- app_token = ''
- Open(w_login)
- //rslt = Message.DoubleParm
- IF app_login THEN
- //MessageBox('', 'app_login')
- Open(w_main)
- ELSE
- //MessageBox('', 'not app_login')
- END IF
- ELSE
- IF arg_msg <> '' THEN
- MessageBox('Error', arg_msg)
- END IF
- END IF
- //MessageBox('', 'app_exit')
- end event
|