q6_main_demo.srw 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353
  1. $PBExportHeader$q6_main_demo.srw
  2. forward
  3. global type q6_main_demo from w_publ_base
  4. end type
  5. type p_left from picture within q6_main_demo
  6. end type
  7. type p_right from picture within q6_main_demo
  8. end type
  9. type p_middle from picture within q6_main_demo
  10. end type
  11. type tv_func from treeview within q6_main_demo
  12. end type
  13. type tab_1 from tab within q6_main_demo
  14. end type
  15. type tabpage_1 from userobject within tab_1
  16. end type
  17. type dw_1 from datawindow within tabpage_1
  18. end type
  19. type st_3 from statictext within tabpage_1
  20. end type
  21. type st_2 from statictext within tabpage_1
  22. end type
  23. type st_1 from statictext within tabpage_1
  24. end type
  25. type lv_shortcut from listview within tabpage_1
  26. end type
  27. type tabpage_1 from userobject within tab_1
  28. dw_1 dw_1
  29. st_3 st_3
  30. st_2 st_2
  31. st_1 st_1
  32. lv_shortcut lv_shortcut
  33. end type
  34. type tabpage_2 from userobject within tab_1
  35. end type
  36. type tabpage_2 from userobject within tab_1
  37. end type
  38. type tabpage_3 from userobject within tab_1
  39. end type
  40. type tabpage_3 from userobject within tab_1
  41. end type
  42. type tab_1 from tab within q6_main_demo
  43. tabpage_1 tabpage_1
  44. tabpage_2 tabpage_2
  45. tabpage_3 tabpage_3
  46. end type
  47. end forward
  48. global type q6_main_demo from w_publ_base
  49. integer width = 5152
  50. integer height = 2972
  51. string menuname = "m_x_genapp_frame_sp1"
  52. boolean maxbox = true
  53. boolean resizable = true
  54. windowtype windowtype = main!
  55. windowstate windowstate = maximized!
  56. long backcolor = 16777215
  57. event ue_main_menu_commnd ( long arg_funcid )
  58. event ue_main_meun_plugins ( long arg_mainid )
  59. event ue_del_shortcut ( )
  60. p_left p_left
  61. p_right p_right
  62. p_middle p_middle
  63. tv_func tv_func
  64. tab_1 tab_1
  65. end type
  66. global q6_main_demo q6_main_demo
  67. type variables
  68. Long deep = 0
  69. Int retrieve_mm = 10
  70. s_main_menu ins_s_menu_rp[],ins_s_menu_fz[]
  71. m_sale_rp_biz om_biz_rp
  72. m_buy_rp om_buy_rp
  73. m_ware_rp om_ware_rp
  74. m_cw_rp om_cw_rp
  75. m_jg_rp om_jg_rp
  76. m_rsgz_rp om_rsgz_rp
  77. m_sale_rp om_sale_rp
  78. m_buy_fz om_buy_fz
  79. m_ware_fz om_ware_fz
  80. m_cw_fz om_cw_fz
  81. m_jg_fz om_jg_fz
  82. m_sale_fz om_sale_fz
  83. datawindow dw_guide
  84. end variables
  85. forward prototypes
  86. public function integer wf_refresh_shortcut ()
  87. public function integer pf_menutreegrowth_plugins (ref s_sys_func arg_s_func[], long arg_parentid)
  88. public function integer pf_menutreegrowth (long arg_handl, menu arg_prn_menu, long arg_funcid)
  89. public subroutine wf_build_menutree ()
  90. public subroutine wf_init_menu ()
  91. public subroutine wf_handle_click_guide (long arg_mainid, string arg_dwname, long arg_x, long arg_y)
  92. public function string wf_retr_guide (long arg_funcid, long arg_parentid)
  93. end prototypes
  94. event ue_main_menu_commnd(long arg_funcid);arg_funcid = Message.LongParm
  95. IF arg_funcid > 0 THEN
  96. f_sys_main(arg_funcid)
  97. END IF
  98. end event
  99. event ue_main_meun_plugins(long arg_mainid);arg_mainid = Message.LongParm
  100. String ls_filepath
  101. String ls_psw
  102. Long ll_dftWinState
  103. Long ll_fileid
  104. ll_fileid = arg_mainid - 41000
  105. SELECT filepath,
  106. psw,
  107. dftWinState
  108. INTO :ls_filepath,
  109. :ls_psw,
  110. :ll_dftWinState
  111. FROM u_plugins
  112. Where fileid = :ll_fileid;
  113. IF sqlca.SQLCode <> 0 THEN
  114. MessageBox('Error','打开外挂程序失败')
  115. RETURN
  116. END IF
  117. IF Pos(lower(ls_filepath), '.exe') > 0 THEN
  118. WindowState lwstmp
  119. IF ll_dftWinState = -1 THEN
  120. lwstmp = Minimized!
  121. ELSEIF ll_dftWinState = 0 THEN
  122. lwstmp = Normal!
  123. ELSE
  124. lwstmp = Maximized!
  125. END IF
  126. String ls_run
  127. ls_run = ls_psw + '&'
  128. ls_run += publ_userid + '&'
  129. ls_run += sqlca.Database + '&'
  130. ls_run += sqlca.UserID + '&'
  131. ls_run += f_psw_bczh(sqlca.DBPass,0,sys_power_key) + '&'
  132. ls_run += sqlca.LogID + '&'
  133. ls_run += sqlca.LogPass + '&'
  134. ls_run += sqlca.ServerName + '&'
  135. IF Run(sys_cur_path + ls_filepath + ' - ' +ls_run) = -1 THEN
  136. MessageBox('错误','运行程序失败!',stopsign!,ok!)
  137. RETURN
  138. END IF
  139. ELSE
  140. window lw_win
  141. s_edit_index_tran s_tran //翻页功能窗口 传递参数使用
  142. s_tran.if_retrieve_all = True //是否一次RETRIEVE所有行
  143. s_tran.work_mode = 0 //0-单纯编辑模式, 1-选择模式
  144. s_tran.arg_pkid = 0 //目标定位PKID (备用)
  145. s_tran.arg_string_code = '' //查询列部分内容,用于初步筛选
  146. s_tran.mainid = arg_mainid
  147. TRY
  148. s_sys_win_open[arg_mainid].Name = ls_filepath
  149. IF IsValid(s_sys_win_open[arg_mainid].win) THEN
  150. s_sys_win_open[arg_mainid].win.WindowState = Normal!
  151. s_sys_win_open[arg_mainid].win.BringToTop = True
  152. ELSE
  153. IF s_sys_win_open[arg_mainid].ifarg THEN
  154. s_tran.if_retrieve_all = local_retrieve_all //True
  155. OpenWithParm(lw_win,s_tran,s_sys_win_open[arg_mainid].Name)
  156. ELSE
  157. Open(lw_win,s_sys_win_open[arg_mainid].Name)
  158. END IF
  159. s_sys_win_open[arg_mainid].win = lw_win
  160. s_sys_win_open[arg_mainid].mainid = arg_mainid
  161. s_sys_win_open[arg_mainid].Title = lw_win.Title
  162. s_sys_win_open[arg_mainid].Handle = Handle(lw_win)
  163. END IF
  164. Catch(runtimeerror e)
  165. //Unknown object type: w_dismantle_install_tl3 at line 64 in ue_main_meun_plugins event of object w_main_scware.
  166. String ls_msg
  167. ls_msg = "Unknown object type: "+s_sys_win_open[arg_mainid].Name //+" at line 64 in ue_main_meun_plugins event of object w_main_scware."
  168. IF Pos(e.Text, ls_msg ) > 0 THEN
  169. MessageBox('外挂运行错误', '窗口:'+s_sys_win_open[arg_mainid].Title+'不存在')
  170. ELSE
  171. MessageBox('', e.Text)
  172. END IF
  173. END TRY
  174. END IF
  175. RETURN
  176. end event
  177. event ue_del_shortcut();Long ll_hand,funcid
  178. listviewitem l_lvi
  179. String ls_tv_label,arg_msg
  180. s_sys_func s_lss
  181. IF tab_1.tabpage_1.lv_shortcut.SelectedIndex() <= 0 THEN RETURN
  182. uo_userpwr uo_user
  183. uo_user = CREATE uo_userpwr
  184. tab_1.tabpage_1.lv_shortcut.GetItem(tab_1.tabpage_1.lv_shortcut.SelectedIndex(),l_lvi)
  185. s_lss = l_lvi.Data
  186. funcid = s_lss.funcid
  187. IF funcid > 0 THEN
  188. IF uo_user.del_shortcut(sys_scid,sys_empid,funcid,arg_msg,TRUE) = 0 THEN
  189. MessageBox('错误',arg_msg, StopSign!, OK! )
  190. ELSE
  191. wf_refresh_shortcut()
  192. END IF
  193. END IF
  194. DESTROY uo_userpwr
  195. end event
  196. public function integer wf_refresh_shortcut ();String str_shortcutstr,str_tmp
  197. Int rslt = 1
  198. s_sys_func ls_s_func[]
  199. Long count = 0,ls_i
  200. Long handl
  201. String ls_power_str
  202. Long ll_hand,ll_funcid
  203. treeviewitem tvi
  204. SELECT shortcutstr
  205. INTO :str_shortcutstr
  206. FROM u_user
  207. WHERE scid = :sys_scid
  208. And empid = :sys_empid;
  209. IF sqlca.SQLCode <> 0 THEN
  210. RETURN 0
  211. END IF
  212. sys_ds_maininfo.SetFilter('')
  213. sys_ds_maininfo.Filter()
  214. Long ll_fileid, ll_parentid
  215. String ls_filename
  216. IF str_shortcutstr <> '' THEN
  217. DO WHILE Pos(str_shortcutstr,',') <> 0
  218. str_tmp = Trim(Left(str_shortcutstr,Pos(str_shortcutstr,',') - 1 ))
  219. str_shortcutstr = Right(str_shortcutstr,Len(str_shortcutstr) - Pos(str_shortcutstr,','))
  220. ll_funcid = Long(str_tmp)
  221. IF ll_funcid < 40000 THEN
  222. ls_i = sys_ds_maininfo.Find('funcid = ' + String(ll_funcid), 1, sys_ds_maininfo.RowCount())
  223. IF ls_i > 0 THEN
  224. count++
  225. ls_s_func[count].funcid = sys_ds_maininfo.Object.funcid[ls_i]
  226. ls_s_func[count].treename = sys_ds_maininfo.Object.treename[ls_i]
  227. ls_s_func[count].MenuName = sys_ds_maininfo.Object.MenuName[ls_i]
  228. ls_s_func[count].parentid = sys_ds_maininfo.Object.parentid[ls_i]
  229. ls_s_func[count].sortflag = sys_ds_maininfo.Object.sortflag[ls_i]
  230. ls_s_func[count].functype = sys_ds_maininfo.Object.functype[ls_i]
  231. ls_s_func[count].mainid = sys_ds_maininfo.Object.mainid[ls_i]
  232. END IF
  233. ELSE
  234. ll_fileid = ll_funcid - 41000
  235. SELECT filename, parentid
  236. INTO :ls_filename, :ll_parentid
  237. FROM u_plugins
  238. Where fileid = :ll_fileid;
  239. IF sqlca.SQLCode <> 0 THEN
  240. ls_filename = ''
  241. END IF
  242. IF ls_filename <> '' THEN
  243. count++
  244. ls_s_func[count].funcid = ll_funcid
  245. ls_s_func[count].treename = ls_filename+'(外挂)'
  246. ls_s_func[count].MenuName = ls_filename+'(外挂)'
  247. ls_s_func[count].parentid = ll_parentid
  248. ls_s_func[count].sortflag = count
  249. ls_s_func[count].functype = 8
  250. ls_s_func[count].mainid = ll_funcid
  251. ls_s_func[count].if_use = 1
  252. END IF
  253. END IF
  254. LOOP
  255. END IF
  256. tab_1.tabpage_1.lv_shortcut.setredraw(false)
  257. tab_1.tabpage_1.lv_shortcut.DeleteItems()
  258. listviewitem l_lvi
  259. FOR ls_i = 1 To count
  260. l_lvi.Label = ls_s_func[ls_i].treename
  261. l_lvi.Data = ls_s_func[ls_i]
  262. IF pos(ls_s_func[ls_i].treename, "(外挂)") > 0 THEN
  263. l_lvi.PictureIndex = 2
  264. ELSEIF right(ls_s_func[ls_i].treename,1) = "表" THEN
  265. l_lvi.PictureIndex = 3
  266. ELSEIF pos(ls_s_func[ls_i].treename,"销售") > 0 THEN
  267. l_lvi.PictureIndex = 4
  268. ELSEIF pos(ls_s_func[ls_i].treename,"采购") > 0 THEN
  269. l_lvi.PictureIndex = 5
  270. ELSE
  271. l_lvi.PictureIndex = 1
  272. END IF
  273. tab_1.tabpage_1.lv_shortcut.AddItem(l_lvi)
  274. NEXT
  275. tab_1.tabpage_1.lv_shortcut.setredraw(true)
  276. RETURN 1
  277. end function
  278. public function integer pf_menutreegrowth_plugins (ref s_sys_func arg_s_func[], long arg_parentid);String str_shortcutstr,str_tmp
  279. Int rslt = 1
  280. s_sys_func ls_s_func[]
  281. Long count = 0,ls_i
  282. Long handl
  283. String ls_power_str
  284. Long ll_hand,ll_funcid
  285. String ls_filepath, ls_filename
  286. count = UpperBound(arg_s_func)
  287. //加入插件
  288. Long ll_pluginscnt
  289. datastore ds
  290. ds = Create datastore
  291. ds.DataObject = 'u_plugins_index'
  292. ds.SetTransObject(sqlca)
  293. ll_pluginscnt = ds.Retrieve(sys_user_plugins, arg_parentid)
  294. //if arg_parentid = 0 then arg_parentid = 40000
  295. FOR ls_i = 1 To ll_pluginscnt
  296. ls_filename = Trim(ds.Object.Filename[ls_i])
  297. ls_filepath = Trim(ds.Object.FilePath[ls_i])
  298. ll_funcid = 41000 + ds.Object.fileid[ls_i]
  299. count++
  300. ls_s_func[count].funcid = ll_funcid
  301. ls_s_func[count].treename = ls_filename+'(外挂)'
  302. ls_s_func[count].MenuName = ls_filename+'(外挂)'
  303. ls_s_func[count].parentid = arg_parentid
  304. ls_s_func[count].sortflag = ls_i
  305. ls_s_func[count].functype = 8
  306. ls_s_func[count].mainid = ll_funcid
  307. ls_s_func[count].if_use = 1
  308. IF Not Pos(lower(ls_filepath),'.exe') > 0 THEN
  309. s_sys_win_open[ll_funcid].funcid = String(ll_funcid)
  310. s_sys_win_open[ll_funcid].Name = ls_filepath
  311. s_sys_win_open[ll_funcid].Title = ls_filename
  312. s_sys_win_open[ll_funcid].ifarg = True
  313. s_sys_win_open[ll_funcid].if_retrieve_all = True
  314. END IF
  315. NEXT
  316. arg_s_func = ls_s_func
  317. Destroy ds
  318. RETURN 1
  319. end function
  320. public function integer pf_menutreegrowth (long arg_handl, menu arg_prn_menu, long arg_funcid);Int rslt = 1
  321. s_sys_func ls_s_func[]
  322. Long count = 0,ls_i
  323. Long handl
  324. String ls_power_str
  325. Long ll_hand
  326. String ls_filter
  327. If sys_if_network = 1 Then
  328. ls_filter = 'parentid='+String(arg_funcid)+ ' and worktype <> 1 and if_use <> 0 and functype < 9 '
  329. Else
  330. ls_filter = 'parentid='+String(arg_funcid)+ ' and worktype <> 2 and if_use <> 0 and functype < 9 '
  331. End If
  332. If sys_version_type = 0 Then
  333. ls_filter = ls_filter + 'and ( Versiontype = 0 or Versiontype = -1 )'
  334. ElseIf sys_version_type = 1 Then
  335. ls_filter = ls_filter + 'and ( Versiontype = 1 or Versiontype = -1 )'
  336. ElseIf sys_version_type = 2 Then
  337. ls_filter = ls_filter + 'and ( Versiontype = 0 or Versiontype = -1 or Versiontype = 2 )'
  338. End If
  339. sys_ds_maininfo.SetFilter(ls_filter)
  340. sys_ds_maininfo.Filter()
  341. sys_ds_maininfo.SetSort('sortflag')
  342. sys_ds_maininfo.Sort()
  343. deep++
  344. If deep > 3000 Then //防止死递归
  345. Return 0
  346. End If
  347. For ls_i = 1 To sys_ds_maininfo.RowCount( )
  348. // IF sys_ds_maininfo.Object.funcid[ls_i] = 1766 THEN
  349. // ls_i = ls_i
  350. // END IF
  351. // IF sys_ds_maininfo.Object.if_use[ls_i] = 0 THEN CONTINUE
  352. // IF sys_ds_maininfo.Object.functype[ls_i] < 9 THEN
  353. // IF sys_ds_maininfo.Object.parentid[ls_i] = arg_funcid THEN
  354. If sys_option_hide_cw = 0 Then
  355. If sys_accsetbegin Then
  356. //账务初始化
  357. If sys_ds_maininfo.Object.funcid[ls_i] = 1950 Then Continue
  358. Else
  359. //账务
  360. If sys_ds_maininfo.Object.funcid[ls_i] = 1964 Then Continue
  361. End If
  362. Else
  363. //隐藏总帐菜单
  364. If sys_ds_maininfo.Object.funcid[ls_i] = 1932 Then Continue
  365. If sys_ds_maininfo.Object.funcid[ls_i] = 1950 Then Continue
  366. If sys_ds_maininfo.Object.funcid[ls_i] = 1964 Then Continue
  367. End If
  368. If sys_ds_maininfo.Object.treename[ls_i] <> '系统解决方案' &
  369. And sys_ds_maininfo.Object.treename[ls_i] <> '解决方案' &
  370. And sys_ds_maininfo.Object.treename[ls_i] <> '系统' Then
  371. If Mid(sys_pwrstr,sys_ds_maininfo.Object.funcid[ls_i],1) <> '1' Then Continue
  372. End If
  373. If Mid(sys_right,sys_ds_maininfo.Object.funcid[ls_i],1) = '1' Then
  374. If sys_ds_maininfo.Object.treename[ls_i] = '仓库' And &
  375. sys_option_hide_ware = 1 Then
  376. Continue
  377. End If
  378. If sys_ds_maininfo.Object.treename[ls_i] = '生产' And &
  379. sys_version = 802001 Then Continue
  380. If sys_ds_maininfo.Object.treename[ls_i] = '外协' And &
  381. sys_version = 802001 Then Continue
  382. If sys_ds_maininfo.Object.treename[ls_i] = '生产' And &
  383. sys_option_hide_sc = 1 Then
  384. Continue
  385. End If
  386. If sys_ds_maininfo.Object.treename[ls_i] = '外协' And &
  387. sys_option_hide_wfjg = 1 Then
  388. Continue
  389. End If
  390. If sys_ds_maininfo.Object.treename[ls_i] = '财务' And &
  391. sys_option_hide_money = 1 Then
  392. Continue
  393. End If
  394. If sys_ds_maininfo.Object.treename[ls_i] = '人事工资' And &
  395. sys_option_hide_gz = 1 Then
  396. Continue
  397. End If
  398. count++
  399. ls_s_func[count].funcid = sys_ds_maininfo.Object.funcid[ls_i]
  400. ls_s_func[count].treename = sys_ds_maininfo.Object.treename[ls_i]
  401. ls_s_func[count].MenuName = sys_ds_maininfo.Object.MenuName[ls_i]
  402. ls_s_func[count].parentid = sys_ds_maininfo.Object.parentid[ls_i]
  403. ls_s_func[count].sortflag = sys_ds_maininfo.Object.sortflag[ls_i]
  404. ls_s_func[count].functype = sys_ds_maininfo.Object.functype[ls_i]
  405. ls_s_func[count].mainid = sys_ds_maininfo.Object.mainid[ls_i]
  406. ls_s_func[count].if_use = sys_ds_maininfo.Object.if_use[ls_i]
  407. End If
  408. // END IF
  409. // END IF
  410. Next
  411. //IF arg_funcid = 0 THEN
  412. // //加入插件
  413. // Long ll_pluginscnt
  414. // datastore ds
  415. // ds = Create datastore
  416. // ds.DataObject = 'u_plugins_index'
  417. // ds.SetTransObject(sqlca)
  418. // ll_pluginscnt = ds.Retrieve(sys_user_plugins, 0)
  419. // IF ll_pluginscnt > 0 THEN
  420. // count++
  421. // ls_s_func[count].funcid = 40000
  422. // ls_s_func[count].MenuName = "外挂"
  423. // ls_s_func[count].treename = "外挂"
  424. // ls_s_func[count].parentid = 0
  425. // ls_s_func[count].functype = 0
  426. // ls_s_func[count].sortflag = count
  427. // END IF
  428. // Destroy ds
  429. //END IF
  430. //IF arg_funcid = 40000 THEN
  431. // //pf_menutreegrowth_plugins(ls_s_func)
  432. // count = UpperBound(ls_s_func)
  433. //END IF
  434. Long ll_parentid_plugins[] = {40000,40001,40002,40003,40004,40005,40006,40007,40008,40009,40010,40011}
  435. Long ll_funcid_plugins[] = {0, 256,258,259,349,1047,260,1541,1542,1543,1046,1557}
  436. Boolean lb_plugins = False
  437. Long ll_plugins_parentid
  438. //检查是否有插件
  439. For ls_i = 1 To UpperBound(ll_funcid_plugins)
  440. If ll_funcid_plugins[ls_i] = arg_funcid Then
  441. ll_plugins_parentid = ll_parentid_plugins[ls_i]
  442. lb_plugins = True
  443. Exit
  444. End If
  445. Next
  446. If lb_plugins Then
  447. //加入插件
  448. Long ll_pluginscnt
  449. datastore ds
  450. ds = Create datastore
  451. ds.DataObject = 'u_plugins_index'
  452. ds.SetTransObject(sqlca)
  453. ll_pluginscnt = ds.Retrieve(sys_user_plugins, ll_plugins_parentid)
  454. // if ll_plugins_parentid = 0 then ll_plugins_parentid = 40000
  455. If ll_pluginscnt > 0 Then
  456. count++
  457. ls_s_func[count].funcid = ll_plugins_parentid
  458. ls_s_func[count].MenuName = "外挂"
  459. ls_s_func[count].treename = "外挂"
  460. ls_s_func[count].parentid = arg_funcid
  461. ls_s_func[count].functype = 0
  462. ls_s_func[count].sortflag = count
  463. End If
  464. Destroy ds
  465. End If
  466. If arg_funcid >= 40000 Then
  467. pf_menutreegrowth_plugins(ls_s_func, arg_funcid)
  468. count = UpperBound(ls_s_func)
  469. End If
  470. // //按模块增加插件
  471. //long ll_parentid_plugins
  472. //choose case arg_funcid
  473. // case 0 //全部
  474. // case 256 //销售
  475. // case 258 //仓库
  476. // case 259 //采购
  477. // case 349 //外协
  478. // case 1047 //生产
  479. // case 260 //人事工资
  480. // //case 261 //财务
  481. // case 1541 //应收
  482. // case 1542 //应付
  483. // case 1543 //出纳
  484. // case 1046 //零售
  485. // case 1557 //电子商务
  486. //end choose
  487. //if arg_funcid = 0 then
  488. // count++
  489. // ls_s_func[count].funcid = -1
  490. // ls_s_func[count].MenuName = "收藏"
  491. // ls_s_func[count].treename = "收藏"
  492. // ls_s_func[count].parentid = 0
  493. // ls_s_func[count].functype = 0
  494. // ls_s_func[count].sortflag = count
  495. //end if
  496. //
  497. //if arg_funcid = -1 then
  498. // wf_build_menu_shortcut(ls_s_func)
  499. // count = UpperBound(ls_s_func)
  500. //end if
  501. String ls_menuname,ls_treename
  502. long ll_lp
  503. treeviewitem tvi
  504. For ls_i = 1 To count
  505. ls_menuname = Trim(ls_s_func[ls_i].MenuName)
  506. ls_treename = ls_s_func[ls_i].treename
  507. if ls_s_func[ls_i].functype = 0 then
  508. ll_lp = 2
  509. elseif ls_s_func[ls_i].functype = 8 then
  510. ll_lp = 5
  511. ELSEIF ls_s_func[ls_i].functype = 9 THEN
  512. ll_lp = 4
  513. else
  514. ll_lp = 6
  515. END IF
  516. handl = tv_func.InsertItemLast(arg_handl,ls_treename,ll_lp) //生成树
  517. tv_func.GetItem(handl,tvi)
  518. tvi.Data = ls_s_func[ls_i]
  519. tv_func.SetItem(handl,tvi)
  520. f_add_menuItem(arg_prn_menu,ls_i,ls_menuname,String(ls_s_func[ls_i].mainid))
  521. // if arg_funcid <> -1 then
  522. pf_menutreegrowth(handl,arg_prn_menu.Item[UpperBound(arg_prn_menu.Item)],ls_s_func[ls_i].funcid)
  523. // end if
  524. Next
  525. Return rslt
  526. end function
  527. public subroutine wf_build_menutree ();Long hand,ll_getitem
  528. If sys_if_network = 1 Then
  529. Long i
  530. For i = 1 To UpperBound(MenuID.Item[1].Item)
  531. If MenuID.Item[1].Item[i].Text = '帐套管理' Then
  532. MenuID.Item[1].Item[i].Visible = False
  533. Exit
  534. End If
  535. Next
  536. //MenuID.Item[1].Item[5].enabled = false //帐套管理
  537. //This.ChangeMenu(m_x_genapp_frame_sp1_net)
  538. Else
  539. //This.ChangeMenu(m_x_genapp_frame_sp1)
  540. End If
  541. s_sys_func s_sf_ls
  542. treeviewitem ltvi_item
  543. Long tvi_hdl = 0
  544. Do Until tv_func.FindItem(roottreeitem!, 0) = -1
  545. tv_func.DeleteItem(tvi_hdl)
  546. Loop
  547. hand = tv_func.InsertItemLast(0,sys_message_title,1)
  548. ll_getitem = tv_func.GetItem(hand, ltvi_item)
  549. If ll_getitem > 0 Then
  550. ltvi_item.Data = s_sf_ls
  551. tv_func.SetItem( hand, ltvi_item)
  552. End If
  553. pf_menutreegrowth(hand,This.MenuID,0)
  554. tv_func.ExpandItem(hand)
  555. MenuID.Item[1].Hide() //should be item[1], whatever the base menuitem is.
  556. MenuID.Item[1].Show()
  557. sys_ds_maininfo.RowsMove(1, sys_ds_maininfo.DeletedCount(), Delete!, sys_ds_maininfo, 1, Primary!)
  558. end subroutine
  559. public subroutine wf_init_menu ();om_biz_rp = Create m_sale_rp_biz
  560. om_buy_rp = Create m_buy_rp
  561. om_ware_rp = Create m_ware_rp
  562. om_cw_rp = Create m_cw_rp
  563. om_jg_rp = Create m_jg_rp
  564. om_rsgz_rp = Create m_rsgz_rp
  565. om_sale_rp = Create m_sale_rp
  566. om_buy_fz = create m_buy_fz
  567. om_ware_fz = create m_ware_fz
  568. om_cw_fz = create m_cw_fz
  569. om_jg_fz = create m_jg_fz
  570. om_sale_fz = create m_sale_fz
  571. Long i
  572. ////更多报表
  573. i++
  574. ins_s_menu_rp[i].dwname = 'dw_main_child_biz'
  575. ins_s_menu_rp[i].menu = om_biz_rp
  576. i++
  577. ins_s_menu_rp[i].dwname = 'dw_main_child_cg'
  578. ins_s_menu_rp[i].menu = om_buy_rp
  579. i++
  580. ins_s_menu_rp[i].dwname = 'dw_main_child_ck'
  581. ins_s_menu_rp[i].menu = om_ware_rp
  582. i++
  583. ins_s_menu_rp[i].dwname = 'dw_main_child_cw'
  584. ins_s_menu_rp[i].menu = om_cw_rp
  585. i++
  586. ins_s_menu_rp[i].dwname = 'dw_main_child_jg'
  587. ins_s_menu_rp[i].menu = om_jg_rp
  588. i++
  589. ins_s_menu_rp[i].dwname = 'dw_main_child_rsgz'
  590. ins_s_menu_rp[i].menu = om_rsgz_rp
  591. i++
  592. ins_s_menu_rp[i].dwname = 'dw_main_child_xs'
  593. ins_s_menu_rp[i].menu = om_sale_rp
  594. long j
  595. ////辅助功能
  596. j++
  597. ins_s_menu_fz[j].dwname = 'dw_main_child_cg'
  598. ins_s_menu_fz[j].menu = om_buy_fz
  599. j++
  600. ins_s_menu_fz[j].dwname = 'dw_main_child_ck'
  601. ins_s_menu_fz[j].menu = om_ware_fz
  602. j++
  603. ins_s_menu_fz[j].dwname = 'dw_main_child_cw'
  604. ins_s_menu_fz[j].menu = om_cw_fz
  605. j++
  606. ins_s_menu_fz[j].dwname = 'dw_main_child_jg'
  607. ins_s_menu_fz[j].menu = om_jg_fz
  608. j++
  609. ins_s_menu_fz[j].dwname = 'dw_main_child_xs'
  610. ins_s_menu_fz[j].menu = om_sale_fz
  611. end subroutine
  612. public subroutine wf_handle_click_guide (long arg_mainid, string arg_dwname, long arg_x, long arg_y);menu arg_m
  613. Long i
  614. If arg_mainid = 99999 Then
  615. For i = 1 To UpperBound(ins_s_menu_rp)
  616. If arg_dwname = ins_s_menu_rp[i].dwname Then
  617. ins_s_menu_rp[i].menu.PopMenu(arg_x,arg_y)
  618. Return
  619. End If
  620. Next
  621. ElseIf arg_mainid = 88888 Then
  622. For i = 1 To UpperBound(ins_s_menu_fz)
  623. If arg_dwname = ins_s_menu_fz[i].dwname Then
  624. ins_s_menu_fz[i].menu.PopMenu(arg_x,arg_y)
  625. Return
  626. End If
  627. Next
  628. ElseIf arg_mainid = 77777 and arg_dwname = 'dw_main_child_ck' Then
  629. m_ware_buy om_ware_buy
  630. om_ware_buy = CREATE m_ware_buy
  631. om_ware_buy.PopMenu(arg_x,arg_y)
  632. DESTROY om_ware_buy
  633. ElseIf arg_mainid = 66666 and arg_dwname = 'dw_main_child_ck' Then
  634. m_ware_sale om_ware_sale
  635. om_ware_sale = CREATE m_ware_sale
  636. om_ware_sale.PopMenu(arg_x,arg_y)
  637. DESTROY om_ware_sale
  638. End If
  639. end subroutine
  640. public function string wf_retr_guide (long arg_funcid, long arg_parentid);String arg_dwname
  641. If arg_funcid = 1046 Or arg_parentid = 1046 Then
  642. //零售
  643. arg_dwname = 'dw_main_child_biz'
  644. ElseIf arg_funcid = 256 Or arg_parentid = 256 Then
  645. //销售
  646. arg_dwname = 'dw_main_child_xs'
  647. ElseIf arg_funcid = 258 Or arg_parentid = 258 Then
  648. //仓库
  649. arg_dwname = 'dw_main_child_ck'
  650. ElseIf arg_funcid = 259 Or arg_parentid = 259 Then
  651. //采购
  652. arg_dwname = 'dw_main_child_cg'
  653. ElseIf arg_funcid = 349 Or arg_parentid = 349 Then
  654. //外协
  655. arg_dwname = 'dw_main_child_jg'
  656. ElseIf arg_funcid = 1047 Or arg_parentid = 1047 Then
  657. //生产
  658. arg_dwname = 'dw_main_child_sc'
  659. ElseIf arg_funcid = 260 Or arg_parentid = 260 Then
  660. //人事工资
  661. arg_dwname = 'dw_main_child_rsgz'
  662. ElseIf arg_funcid = 261 Or arg_parentid = 261 Then
  663. //财务
  664. arg_dwname = 'dw_main_child_cw'
  665. End If
  666. Return arg_dwname
  667. end function
  668. on q6_main_demo.create
  669. int iCurrent
  670. call super::create
  671. if this.MenuName = "m_x_genapp_frame_sp1" then this.MenuID = create m_x_genapp_frame_sp1
  672. this.p_left=create p_left
  673. this.p_right=create p_right
  674. this.p_middle=create p_middle
  675. this.tv_func=create tv_func
  676. this.tab_1=create tab_1
  677. iCurrent=UpperBound(this.Control)
  678. this.Control[iCurrent+1]=this.p_left
  679. this.Control[iCurrent+2]=this.p_right
  680. this.Control[iCurrent+3]=this.p_middle
  681. this.Control[iCurrent+4]=this.tv_func
  682. this.Control[iCurrent+5]=this.tab_1
  683. end on
  684. on q6_main_demo.destroy
  685. call super::destroy
  686. if IsValid(MenuID) then destroy(MenuID)
  687. destroy(this.p_left)
  688. destroy(this.p_right)
  689. destroy(this.p_middle)
  690. destroy(this.tv_func)
  691. destroy(this.tab_1)
  692. end on
  693. event resize;call super::resize;p_right.x = this.workspacewidth() - p_right.width
  694. p_middle.width = this.width - p_left.width - p_right.width
  695. tv_func.height = this.workspaceheight() - tv_func.y - 10
  696. tab_1.width = this.workspacewidth() - tab_1.x - 10
  697. tab_1.height = this.workspaceheight() - tab_1.y - 10
  698. tab_1.tabpage_1.lv_shortcut.width = tab_1.tabpage_1.width - 10
  699. end event
  700. event open;call super::open;dw_guide = tab_1.tabpage_1.dw_1
  701. tab_1.tabpage_1.dw_1.insertrow(0)
  702. wf_refresh_shortcut()
  703. wf_build_menutree()
  704. //初始化导航图用到的菜单
  705. wf_init_menu()
  706. end event
  707. event close;call super::close;destroy om_biz_rp
  708. destroy om_buy_rp
  709. destroy om_ware_rp
  710. destroy om_cw_rp
  711. destroy om_jg_rp
  712. destroy om_rsgz_rp
  713. destroy om_sale_rp
  714. destroy om_buy_fz
  715. destroy om_ware_fz
  716. destroy om_cw_fz
  717. destroy om_jg_fz
  718. destroy om_sale_fz
  719. end event
  720. type cb_func from w_publ_base`cb_func within q6_main_demo
  721. boolean visible = false
  722. end type
  723. type cb_exit from w_publ_base`cb_exit within q6_main_demo
  724. boolean visible = false
  725. end type
  726. type p_left from picture within q6_main_demo
  727. integer width = 1111
  728. integer height = 200
  729. boolean bringtotop = true
  730. string picturename = "q6bar_left.bmp"
  731. boolean focusrectangle = false
  732. end type
  733. type p_right from picture within q6_main_demo
  734. integer x = 2496
  735. integer width = 2619
  736. integer height = 200
  737. boolean bringtotop = true
  738. string picturename = "q6bar_right.bmp"
  739. boolean focusrectangle = false
  740. end type
  741. type p_middle from picture within q6_main_demo
  742. integer x = 1111
  743. integer width = 1385
  744. integer height = 200
  745. boolean bringtotop = true
  746. string picturename = "q6bar_middle.bmp"
  747. boolean focusrectangle = false
  748. end type
  749. type tv_func from treeview within q6_main_demo
  750. event ue_add_shortcut ( )
  751. integer x = 9
  752. integer y = 208
  753. integer width = 1106
  754. integer height = 2576
  755. integer taborder = 20
  756. boolean bringtotop = true
  757. integer textsize = -9
  758. integer weight = 400
  759. fontcharset fontcharset = gb2312charset!
  760. fontpitch fontpitch = variable!
  761. string facename = "宋体"
  762. long textcolor = 33554432
  763. boolean border = false
  764. boolean haslines = false
  765. boolean disabledragdrop = false
  766. string picturename[] = {"q6logo.ico","graphics\folder_v3.bmp","graphics\folder_g_v3.bmp","graphics\power_v3.bmp","graphics\icon_00.png","graphics\icon_01.png","graphics\icon_02.png","graphics\icon_03.png","graphics\icon_04.png","graphics\icon_05.png","graphics\icon_06.png","graphics\icon_07.png","graphics\icon_08.png","graphics\icon_09.png","graphics\icon_plug.png"}
  767. integer picturewidth = 16
  768. integer pictureheight = 16
  769. long picturemaskcolor = 536870912
  770. long statepicturemaskcolor = 536870912
  771. end type
  772. event ue_add_shortcut();Long ll_hand,funcid
  773. treeviewitem tvi
  774. String arg_msg
  775. s_sys_func s_lss
  776. listviewitem lv_li
  777. uo_userpwr uo_user
  778. uo_user = Create uo_userpwr
  779. ll_hand = This.FindItem(CurrentTreeItem!,0)
  780. This.GetItem(ll_hand,tvi)
  781. s_lss = tvi.Data
  782. funcid = s_lss.funcid
  783. IF funcid > 0 THEN
  784. IF s_lss.functype <> 8 THEN RETURN
  785. IF uo_user.add_shortcut(sys_scid,sys_empid,funcid,arg_msg,True) = 0 THEN
  786. MessageBox('提示',arg_msg, Information!, OK! )
  787. ELSE
  788. wf_refresh_shortcut()
  789. END IF
  790. END IF
  791. Destroy uo_userpwr
  792. end event
  793. event doubleclicked;Long ll_hand,mainid,wintype,functype
  794. string treename
  795. treeviewitem tvi
  796. s_sys_func s_lss
  797. ll_hand = THIS.FindItem(currenttreeitem!,0)
  798. THIS.GetItem(ll_hand,tvi)
  799. s_lss = tvi.Data
  800. mainid = s_lss.mainid
  801. treename = s_lss.treename
  802. functype = s_lss.functype
  803. IF mainid > 0 AND functype <> 2 and functype <> 3 THEN
  804. IF Pos(treename,'(嵌入式)') > 0 THEN
  805. PARENT.PostEvent('ue_main_meun_report',0,mainid)
  806. ELSEIF Pos(treename,'(外挂)') > 0 THEN
  807. PARENT.PostEvent('ue_main_meun_plugins',0,mainid)
  808. ELSE
  809. PARENT.PostEvent('ue_main_menu_commnd',0,mainid)
  810. RETURN 1
  811. END IF
  812. END IF
  813. end event
  814. event clicked;treeviewitem tvi
  815. s_sys_func s_lss
  816. Long funcid ,parentid
  817. String arg_dwname
  818. If This.GetItem(Handle,tvi) = -1 Then Return
  819. s_lss = tvi.Data
  820. funcid = s_lss.funcid
  821. parentid = s_lss.parentid
  822. arg_dwname = wf_retr_guide(funcid,parentid)
  823. If dw_guide.DataObject <> arg_dwname and arg_dwname <> '' Then
  824. dw_guide.DataObject = arg_dwname
  825. dw_guide.InsertRow(0)
  826. End If
  827. end event
  828. event rightclicked;//IF Handle <= 0 THEN RETURN
  829. //il_handle = Handle
  830. //THIS.SelectItem(il_handle)
  831. //m_popup_shortcut_add om_1
  832. //om_1 = CREATE m_popup_shortcut_add
  833. ////把菜单的anyobject指向被右击的对象(dw_1)
  834. //om_1.anyobject = THIS
  835. ////om_1.setmenuitem("添加子项|添加兄弟|编辑|-|删除")
  836. ////可在此调用om_1.setitemdisable(itemorder)函数disable某菜单项。
  837. //om_1.popupmenu(THIS.X+THIS.PointerX(),THIS.Y+THIS.PointerY())
  838. //
  839. //DESTROY om_1
  840. Long ll_hand,mainid,functype,if_navigation,funcid,parentid
  841. string arg_dwname
  842. treeviewitem tvi
  843. s_sys_func s_lss
  844. IF THIS.GetItem(Handle,tvi) = -1 THEN RETURN
  845. s_lss = tvi.Data
  846. mainid = s_lss.mainid
  847. functype = s_lss.functype
  848. funcid = s_lss.funcid
  849. parentid = s_lss.parentid
  850. arg_dwname = wf_retr_guide(funcid,parentid)
  851. If dw_guide.DataObject <> arg_dwname and arg_dwname <> '' Then
  852. dw_guide.DataObject = arg_dwname
  853. dw_guide.InsertRow(0)
  854. End If
  855. IF mainid > 0 AND functype <> 0 and functype <> 2 and functype <> 3 THEN
  856. IF Handle <= 0 THEN RETURN
  857. THIS.SelectItem(Handle)
  858. m_popup_shortcut_add om_1
  859. om_1 = CREATE m_popup_shortcut_add
  860. //把菜单的anyobject指向被右击的对象(dw_1)
  861. om_1.anyobject = THIS
  862. //om_1.setmenuitem("添加子项|添加兄弟|编辑|-|删除")
  863. //可在此调用om_1.setitemdisable(itemorder)函数disable某菜单项。
  864. om_1.popupmenu(THIS.X+THIS.PointerX(),THIS.Y+THIS.PointerY())
  865. DESTROY om_1
  866. // RETURN
  867. ELSE
  868. THIS.SelectItem(Handle)
  869. END IF
  870. end event
  871. type tab_1 from tab within q6_main_demo
  872. integer x = 1125
  873. integer y = 208
  874. integer width = 3680
  875. integer height = 2572
  876. integer taborder = 30
  877. boolean bringtotop = true
  878. integer textsize = -9
  879. integer weight = 400
  880. fontcharset fontcharset = gb2312charset!
  881. fontpitch fontpitch = variable!
  882. string facename = "宋体"
  883. long backcolor = 16777215
  884. boolean raggedright = true
  885. boolean boldselectedtext = true
  886. integer selectedtab = 1
  887. tabpage_1 tabpage_1
  888. tabpage_2 tabpage_2
  889. tabpage_3 tabpage_3
  890. end type
  891. on tab_1.create
  892. this.tabpage_1=create tabpage_1
  893. this.tabpage_2=create tabpage_2
  894. this.tabpage_3=create tabpage_3
  895. this.Control[]={this.tabpage_1,&
  896. this.tabpage_2,&
  897. this.tabpage_3}
  898. end on
  899. on tab_1.destroy
  900. destroy(this.tabpage_1)
  901. destroy(this.tabpage_2)
  902. destroy(this.tabpage_3)
  903. end on
  904. type tabpage_1 from userobject within tab_1
  905. integer x = 18
  906. integer y = 96
  907. integer width = 3643
  908. integer height = 2460
  909. long backcolor = 16777215
  910. string text = "日常办公"
  911. long tabtextcolor = 33554432
  912. long tabbackcolor = 16777215
  913. long picturemaskcolor = 536870912
  914. dw_1 dw_1
  915. st_3 st_3
  916. st_2 st_2
  917. st_1 st_1
  918. lv_shortcut lv_shortcut
  919. end type
  920. on tabpage_1.create
  921. this.dw_1=create dw_1
  922. this.st_3=create st_3
  923. this.st_2=create st_2
  924. this.st_1=create st_1
  925. this.lv_shortcut=create lv_shortcut
  926. this.Control[]={this.dw_1,&
  927. this.st_3,&
  928. this.st_2,&
  929. this.st_1,&
  930. this.lv_shortcut}
  931. end on
  932. on tabpage_1.destroy
  933. destroy(this.dw_1)
  934. destroy(this.st_3)
  935. destroy(this.st_2)
  936. destroy(this.st_1)
  937. destroy(this.lv_shortcut)
  938. end on
  939. type dw_1 from datawindow within tabpage_1
  940. integer x = 9
  941. integer y = 420
  942. integer width = 2734
  943. integer height = 1544
  944. integer taborder = 30
  945. string title = "none"
  946. string dataobject = "dw_main_child_ck"
  947. boolean border = false
  948. boolean livescroll = true
  949. end type
  950. event clicked;string ls_name
  951. ls_name = dwo.Name
  952. string ls_tag,ll_x,ll_y
  953. long ll_mainid
  954. ls_tag = this.Describe(ls_name+".Tag")
  955. ll_x = this.Describe(ls_name+".x")
  956. ll_y = this.Describe(ls_name+".y")
  957. if trim(ls_tag) <> '' then
  958. ll_mainid = long(ls_tag)
  959. end if
  960. if ll_mainid > 0 then
  961. // if ll_mainid = 99999 then
  962. // //更多报表
  963. // m_sale_rp om_1
  964. // om_1 = CREATE m_sale_rp
  965. // om_1.PopMenu(tab_1.X+this.x + long(ll_x),tab_1.Y+this.y+long(ll_y) + 150)
  966. // DESTROY om_1
  967. // elseif ll_mainid = 88888 then
  968. // //辅助功能
  969. // choose case this.dataobject
  970. // case 'dw_main_child_jg'
  971. // m_jg_fz om_jg_fz
  972. // om_jg_fz = CREATE m_jg_fz
  973. // om_jg_fz.PopMenu(tab_1.X+this.x + long(ll_x),tab_1.Y+this.y+long(ll_y) + 150)
  974. // DESTROY om_jg_fz
  975. // end choose
  976. if ll_mainid > 10000 then
  977. wf_handle_click_guide(ll_mainid,this.dataobject ,tab_1.X+this.x + long(ll_x),tab_1.Y+this.y+long(ll_y) + 150)
  978. else
  979. f_sys_main(ll_mainid)
  980. end if
  981. end if
  982. end event
  983. type st_3 from statictext within tabpage_1
  984. integer x = 2752
  985. integer y = 424
  986. integer width = 155
  987. integer height = 64
  988. integer textsize = -10
  989. integer weight = 700
  990. fontcharset fontcharset = gb2312charset!
  991. fontpitch fontpitch = variable!
  992. fontfamily fontfamily = swiss!
  993. string facename = "微软雅黑"
  994. long textcolor = 33554432
  995. long backcolor = 16777215
  996. string text = "消息"
  997. boolean focusrectangle = false
  998. end type
  999. type st_2 from statictext within tabpage_1
  1000. integer x = 46
  1001. integer y = 1984
  1002. integer width = 251
  1003. integer height = 64
  1004. integer textsize = -10
  1005. integer weight = 700
  1006. fontcharset fontcharset = gb2312charset!
  1007. fontpitch fontpitch = variable!
  1008. fontfamily fontfamily = swiss!
  1009. string facename = "微软雅黑"
  1010. long textcolor = 33554432
  1011. long backcolor = 16777215
  1012. string text = "龙嘉资讯"
  1013. boolean focusrectangle = false
  1014. end type
  1015. type st_1 from statictext within tabpage_1
  1016. integer x = 46
  1017. integer y = 8
  1018. integer width = 297
  1019. integer height = 80
  1020. integer textsize = -10
  1021. integer weight = 700
  1022. fontcharset fontcharset = gb2312charset!
  1023. fontpitch fontpitch = variable!
  1024. fontfamily fontfamily = swiss!
  1025. string facename = "微软雅黑"
  1026. long textcolor = 33554432
  1027. long backcolor = 16777215
  1028. string text = "快捷方式"
  1029. boolean focusrectangle = false
  1030. end type
  1031. type lv_shortcut from listview within tabpage_1
  1032. integer x = 5
  1033. integer y = 108
  1034. integer width = 3639
  1035. integer height = 312
  1036. integer taborder = 30
  1037. integer textsize = -9
  1038. integer weight = 400
  1039. fontcharset fontcharset = gb2312charset!
  1040. fontpitch fontpitch = variable!
  1041. string facename = "宋体"
  1042. long textcolor = 33554432
  1043. boolean border = false
  1044. boolean showheader = false
  1045. boolean trackselect = true
  1046. boolean oneclickactivate = true
  1047. boolean twoclickactivate = true
  1048. boolean headerdragdrop = true
  1049. string largepicturename[] = {"graphics\icon_big_00.png","graphics\icon_big_01.png","graphics\icon_big_02.png","graphics\icon_big_03.png","graphics\icon_big_04.png","graphics\icon_big_05.png","graphics\icon_big_06.png","graphics\icon_big_07.png","graphics\icon_big_08.png","graphics\icon_big_09.png","graphics\icon_big_plug.png"}
  1050. long largepicturemaskcolor = 536870912
  1051. long smallpicturemaskcolor = 536870912
  1052. long statepicturemaskcolor = 536870912
  1053. end type
  1054. event doubleclicked;Long mainid
  1055. listviewitem l_lvi
  1056. s_sys_func s_lss
  1057. string ls_text, dsEventName
  1058. IF THIS.SelectedIndex() > 0 THEN
  1059. THIS.GetItem(THIS.SelectedIndex(),l_lvi)
  1060. s_lss = l_lvi.Data
  1061. mainid = s_lss.mainid
  1062. ls_text = l_lvi.label
  1063. IF Pos(ls_text,'(嵌入式)') > 0 THEN
  1064. dsEventName = 'ue_main_meun_report'
  1065. ELSEIF Pos(ls_text,'(外挂)') > 0 THEN
  1066. dsEventName = 'ue_main_meun_plugins'
  1067. ELSE
  1068. dsEventName = 'ue_main_menu_commnd'
  1069. END IF
  1070. PARENT.getparent().getparent().postEvent(dsEventName,mainid,mainid)
  1071. END IF
  1072. end event
  1073. event rightclicked;
  1074. m_Dfc_Control_PopupMenu dmPopupMenu
  1075. String menustr
  1076. menustr = "Text=删除快捷方式~tEvent=ue_del_shortcut"
  1077. IF Len(Trim(menustr)) <> 0 THEN
  1078. dmPopupMenu = CREATE m_Dfc_Control_PopupMenu
  1079. dmPopupMenu.mf_BuildMenu(THIS, menustr)
  1080. dmPopupMenu.mf_PopMenu()
  1081. DESTROY dmPopupMenu
  1082. END IF
  1083. end event
  1084. type tabpage_2 from userobject within tab_1
  1085. integer x = 18
  1086. integer y = 96
  1087. integer width = 3643
  1088. integer height = 2460
  1089. long backcolor = 16777215
  1090. string text = "销售供应链"
  1091. long tabtextcolor = 33554432
  1092. long tabbackcolor = 16777215
  1093. long picturemaskcolor = 536870912
  1094. end type
  1095. type tabpage_3 from userobject within tab_1
  1096. integer x = 18
  1097. integer y = 96
  1098. integer width = 3643
  1099. integer height = 2460
  1100. long backcolor = 16777215
  1101. string text = "采购供应链"
  1102. long tabtextcolor = 33554432
  1103. long tabbackcolor = 16777215
  1104. long picturemaskcolor = 536870912
  1105. end type