w_rp_mustpay_paycodehz.srw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738
  1. $PBExportHeader$w_rp_mustpay_paycodehz.srw
  2. forward
  3. global type w_rp_mustpay_paycodehz from w_publ_easyq
  4. end type
  5. type sle_cuscode from singlelineedit within w_rp_mustpay_paycodehz
  6. end type
  7. type st_2 from statictext within w_rp_mustpay_paycodehz
  8. end type
  9. type sle_cusname from singlelineedit within w_rp_mustpay_paycodehz
  10. end type
  11. type st_1 from statictext within w_rp_mustpay_paycodehz
  12. end type
  13. type cb_3 from uo_imflatbutton within w_rp_mustpay_paycodehz
  14. end type
  15. type ddlb_2 from dropdownlistbox within w_rp_mustpay_paycodehz
  16. end type
  17. type st_5 from statictext within w_rp_mustpay_paycodehz
  18. end type
  19. type ddlb_1 from dropdownlistbox within w_rp_mustpay_paycodehz
  20. end type
  21. type cb_xls from uo_imflatbutton within w_rp_mustpay_paycodehz
  22. end type
  23. type st_6 from statictext within w_rp_mustpay_paycodehz
  24. end type
  25. type ddlb_scid from uo_ddlb_scid within w_rp_mustpay_paycodehz
  26. end type
  27. type st_7 from statictext within w_rp_mustpay_paycodehz
  28. end type
  29. end forward
  30. global type w_rp_mustpay_paycodehz from w_publ_easyq
  31. integer x = 9
  32. integer y = 12
  33. integer width = 5230
  34. string title = "供应商对帐表"
  35. event ue_xls ( )
  36. sle_cuscode sle_cuscode
  37. st_2 st_2
  38. sle_cusname sle_cusname
  39. st_1 st_1
  40. cb_3 cb_3
  41. ddlb_2 ddlb_2
  42. st_5 st_5
  43. ddlb_1 ddlb_1
  44. cb_xls cb_xls
  45. st_6 st_6
  46. ddlb_scid ddlb_scid
  47. st_7 st_7
  48. end type
  49. global w_rp_mustpay_paycodehz w_rp_mustpay_paycodehz
  50. type variables
  51. long cur_scid = -1
  52. long ins_moneyid
  53. string printname1
  54. string printname2
  55. Long ll_xls_billid,ll_xls_Templatesid
  56. String ls_xls_DefaultDataWindow
  57. end variables
  58. forward prototypes
  59. public function integer wf_xls_retrievedata (long arg_ationid, ref s_xls_billlist arg_str_billlist, ref uo_sendtoexcel arg_obj_st, ref string arg_msg)
  60. end prototypes
  61. event ue_xls();
  62. string arg_msg
  63. Long ll_Templatesid,ll_ationid
  64. ll_Templatesid = Message.LongParm
  65. ll_ationid = long(Message.wordparm )
  66. if isnull(ll_Templatesid) then ll_Templatesid = 0
  67. if isnull(ll_ationid) then ll_ationid = 0
  68. if ll_Templatesid = 0 then return
  69. ll_xls_Templatesid = ll_Templatesid
  70. uo_xls_constant uo_constant //Excel全局设置对象
  71. uo_constant = create uo_xls_constant
  72. uo_sendtoexcel obj_st //实例化数据处理对象
  73. obj_st = create uo_sendtoexcel
  74. obj_st.commit_transaction = sqlca //事务对象 建议显示设置 默认等于sqlca
  75. obj_st.uo_const = uo_constant //全局配置对象
  76. s_xls_billlist str_billlist
  77. str_billlist = obj_st.of_getbillinfo(ll_Templatesid,arg_msg) //根据模版获取相应的单据信息
  78. if str_billlist.count <=0 then
  79. MessageBox('错误1',arg_msg)
  80. return
  81. end if
  82. if wf_xls_retrievedata(ll_ationid,str_billlist,obj_st,arg_msg) <> 1 then
  83. MessageBox('错误2',arg_msg)
  84. return
  85. end if
  86. //发送数据
  87. obj_st.event oe_sendtoexcel(str_billlist)
  88. end event
  89. public function integer wf_xls_retrievedata (long arg_ationid, ref s_xls_billlist arg_str_billlist, ref uo_sendtoexcel arg_obj_st, ref string arg_msg);//==============================================================================
  90. // 函数: w_publ_1ton_share_detail::wf_xls_retrievedata()
  91. //------------------------------------------------------------------------------
  92. // 描述: 此函数需要 重载,复制祖先范例代码,然后修改retrieve参数部分两处即可
  93. //------------------------------------------------------------------------------
  94. Long LS_ROW,ll_id,i,ll_scid
  95. //LS_ROW = dw_spt.GetRow()
  96. //IF LS_ROW <= 0 THEN
  97. // arg_msg = '没有目标单据!'
  98. // RETURN 0
  99. //END IF
  100. IF arg_ationid = 1 Or arg_ationid = 2 THEN //打印
  101. // IF Not f_power_ind(18,sys_msg_pow) THEN
  102. // arg_msg = sys_msg_pow
  103. // RETURN 0
  104. // END IF
  105. ELSE //发送
  106. // IF Not f_power_ind(888,sys_msg_pow) THEN
  107. // arg_msg = sys_msg_pow
  108. // RETURN 0
  109. // END IF
  110. END IF
  111. //修改点:获取 指定retriev参数
  112. //long ll_cusid
  113. DateTime firstdate,enddate
  114. firstdate = DateTime(Date(em_1.Text),Time(0))
  115. enddate = DateTime(RelativeDate(Date(em_2.Text),1),Time(0))
  116. //ll_cusid = dw_spt.Object.sptid[LS_ROW]
  117. string ls_code=''
  118. if pos(sle_cuscode.text,'%')>0 then
  119. ls_code=sle_cuscode.text
  120. else
  121. ls_code='%'+sle_cuscode.text+'%'
  122. end if
  123. ////可选设置///
  124. arg_obj_st.uo_const.create_new_pwd( ) //创建随机密码
  125. if sys_option_xls_ifuse_passwd = 1 then arg_obj_st.uo_const.pwd = trim(sys_option_xls_user_passwd) //默认加密密码 默认为随即密码
  126. boolean xls_locked
  127. xls_locked = not (sys_option_xls_lock = 1)
  128. /// Excel 的可选设置
  129. if arg_obj_st.of_setoption(arg_ationid, xls_locked,true,arg_msg) <> 1 then
  130. return 0
  131. end if
  132. for i = 1 to arg_str_billlist.count
  133. ////可选操作///
  134. arg_str_billlist.bill[i].ds_data = create datastore //
  135. arg_str_billlist.bill[i].ds_data.dataobject = arg_str_billlist.bill[i].datawindow //
  136. arg_str_billlist.bill[i].ds_data.settransobject(sqlca)
  137. //修改点:注意retrieve 参数与上文对应
  138. arg_str_billlist.bill[i].ds_data.retrieve(ins_moneyid,ls_code,firstdate,enddate,sys_user_spttype)
  139. next
  140. return 1
  141. end function
  142. on w_rp_mustpay_paycodehz.create
  143. int iCurrent
  144. call super::create
  145. this.sle_cuscode=create sle_cuscode
  146. this.st_2=create st_2
  147. this.sle_cusname=create sle_cusname
  148. this.st_1=create st_1
  149. this.cb_3=create cb_3
  150. this.ddlb_2=create ddlb_2
  151. this.st_5=create st_5
  152. this.ddlb_1=create ddlb_1
  153. this.cb_xls=create cb_xls
  154. this.st_6=create st_6
  155. this.ddlb_scid=create ddlb_scid
  156. this.st_7=create st_7
  157. iCurrent=UpperBound(this.Control)
  158. this.Control[iCurrent+1]=this.sle_cuscode
  159. this.Control[iCurrent+2]=this.st_2
  160. this.Control[iCurrent+3]=this.sle_cusname
  161. this.Control[iCurrent+4]=this.st_1
  162. this.Control[iCurrent+5]=this.cb_3
  163. this.Control[iCurrent+6]=this.ddlb_2
  164. this.Control[iCurrent+7]=this.st_5
  165. this.Control[iCurrent+8]=this.ddlb_1
  166. this.Control[iCurrent+9]=this.cb_xls
  167. this.Control[iCurrent+10]=this.st_6
  168. this.Control[iCurrent+11]=this.ddlb_scid
  169. this.Control[iCurrent+12]=this.st_7
  170. end on
  171. on w_rp_mustpay_paycodehz.destroy
  172. call super::destroy
  173. destroy(this.sle_cuscode)
  174. destroy(this.st_2)
  175. destroy(this.sle_cusname)
  176. destroy(this.st_1)
  177. destroy(this.cb_3)
  178. destroy(this.ddlb_2)
  179. destroy(this.st_5)
  180. destroy(this.ddlb_1)
  181. destroy(this.cb_xls)
  182. destroy(this.st_6)
  183. destroy(this.ddlb_scid)
  184. destroy(this.st_7)
  185. end on
  186. event open;call super::open;//String ls_printname1, ls_printname2
  187. //ls_printname1 = 'dw_rp_mstpay_paycodehz'
  188. //ls_printname2 = 'dw_rp_mstpay_paycodehz'
  189. //
  190. //String ls_windowname
  191. //ls_windowname = This.ClassName ()
  192. //
  193. //printname1 = f_get_dwprint_dynamic_chname(ls_printname1,ls_windowname)
  194. //IF printname1 = '' THEN
  195. // printname1 = ls_printname1
  196. //ELSE
  197. // dw_1.DataObject = printname1
  198. //END IF
  199. //
  200. //printname2 = f_get_dwprint_dynamic_chname(ls_printname2,ls_windowname)
  201. //IF printname2 = '' THEN
  202. // printname2 = ls_printname2
  203. //END IF
  204. //
  205. //dw_1.SetTransObject (sqlca)
  206. //IF dw_1.DataObject = "" THEN
  207. // MessageBox('错误','未定义格式或格式不存在',stopsign!,ok!)
  208. // RETURN
  209. //END IF
  210. //dw_1.Object.DataWindow.Print.Preview.Rulers = "yes"
  211. //
  212. //IF cbx_loginretr.Checked THEN
  213. // cb_1.TriggerEvent(Clicked!)
  214. //END IF
  215. //
  216. //
  217. //
  218. end event
  219. event ue_before_open;call super::ue_before_open;if_ue_retr=true
  220. if_ue_filter=true
  221. if_ue_sort=true
  222. if_ue_sentdataout=true
  223. end event
  224. event ue_before_openretrieve;call super::ue_before_openretrieve;dw_1.Object.DataWindow.Print.Preview.Rulers = "yes"
  225. end event
  226. type cb_func from w_publ_easyq`cb_func within w_rp_mustpay_paycodehz
  227. end type
  228. type cb_exit from w_publ_easyq`cb_exit within w_rp_mustpay_paycodehz
  229. integer x = 1417
  230. end type
  231. type cb_2 from w_publ_easyq`cb_2 within w_rp_mustpay_paycodehz
  232. integer taborder = 100
  233. boolean bringtotop = true
  234. end type
  235. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_mustpay_paycodehz
  236. boolean bringtotop = true
  237. end type
  238. type cb_1 from w_publ_easyq`cb_1 within w_rp_mustpay_paycodehz
  239. boolean bringtotop = true
  240. end type
  241. event cb_1::clicked;call super::clicked;if dw_1.dataobject = "" then
  242. messagebox('错误','未定义格式或格式不存在',stopsign!,ok!)
  243. return
  244. end if
  245. datetime firstdate,enddate
  246. firstdate=datetime(date(em_1.text),time(0))
  247. enddate =DateTime(Date(em_2.Text),Time('23:59:59'))
  248. string ls_code=''
  249. if pos(sle_cuscode.text,'%')>0 then
  250. ls_code=sle_cuscode.text
  251. else
  252. ls_code='%'+sle_cuscode.text+'%'
  253. end if
  254. DELETE FROM u_parm_pay where id=1 ;
  255. if sqlca.sqlcode<>0 then
  256. messagebox('错误','数据库操作失败!',stopsign!,ok!)
  257. rollback;
  258. return
  259. end if
  260. insert into u_parm_pay (firstdate,enddate,id)
  261. values (:firstdate,:enddate,1);
  262. if sqlca.sqlcode<>0 then
  263. messagebox('错误','数据库操作失败!',stopsign!,ok!)
  264. rollback;
  265. return
  266. end if
  267. commit;
  268. dw_1.retrieve(ins_moneyid,ls_code,firstdate,enddate,sys_user_spttype,cur_scid)
  269. dw_1.object.txt_dzrq.text=em_1.text+" 到 "+em_2.text
  270. end event
  271. type st_3 from w_publ_easyq`st_3 within w_rp_mustpay_paycodehz
  272. integer x = 1518
  273. integer y = 204
  274. integer width = 215
  275. end type
  276. type st_4 from w_publ_easyq`st_4 within w_rp_mustpay_paycodehz
  277. integer x = 2245
  278. integer y = 204
  279. end type
  280. type em_1 from w_publ_easyq`em_1 within w_rp_mustpay_paycodehz
  281. integer x = 1728
  282. integer y = 188
  283. integer taborder = 110
  284. end type
  285. type em_2 from w_publ_easyq`em_2 within w_rp_mustpay_paycodehz
  286. integer x = 2354
  287. integer y = 188
  288. integer taborder = 120
  289. long textcolor = 0
  290. end type
  291. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_mustpay_paycodehz
  292. integer x = 1874
  293. integer y = 8
  294. boolean enabled = true
  295. end type
  296. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_mustpay_paycodehz
  297. integer x = 1655
  298. integer y = 12
  299. boolean enabled = false
  300. end type
  301. type dw_1 from w_publ_easyq`dw_1 within w_rp_mustpay_paycodehz
  302. integer y = 300
  303. integer width = 3397
  304. integer height = 1544
  305. string dataobject = "dw_rp_mstpay_paycodehz"
  306. boolean setcolumn_visible_use = false
  307. boolean autosave_filter_use = false
  308. boolean autosave_sort_use = false
  309. boolean autosave_setlayout_use = false
  310. boolean autosave_columnvisible_use = false
  311. end type
  312. event dw_1::constructor; //titleclick_sort_use=true //单击标题排序功能开关
  313. // RBUTTON_FILTER_USE=true //右键查询功能开关
  314. end event
  315. event dw_1::destructor; //titleclick_sort_use=true //单击标题排序功能开关
  316. // RBUTTON_FILTER_USE=true //右键查询功能开关
  317. end event
  318. event dw_1::ue_setlayout;int i = 0
  319. end event
  320. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_mustpay_paycodehz
  321. end type
  322. type sle_cust from w_publ_easyq`sle_cust within w_rp_mustpay_paycodehz
  323. end type
  324. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_mustpay_paycodehz
  325. end type
  326. type st_cust from w_publ_easyq`st_cust within w_rp_mustpay_paycodehz
  327. end type
  328. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_mustpay_paycodehz
  329. boolean visible = true
  330. integer x = 1655
  331. integer y = 96
  332. end type
  333. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_mustpay_paycodehz
  334. integer x = 2135
  335. integer y = 188
  336. end type
  337. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_mustpay_paycodehz
  338. integer x = 2770
  339. integer y = 188
  340. end type
  341. type pb_2 from w_publ_easyq`pb_2 within w_rp_mustpay_paycodehz
  342. integer x = 2880
  343. integer y = 188
  344. end type
  345. type cb_help from w_publ_easyq`cb_help within w_rp_mustpay_paycodehz
  346. integer x = 1266
  347. end type
  348. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_mustpay_paycodehz
  349. end type
  350. type gb_1 from w_publ_easyq`gb_1 within w_rp_mustpay_paycodehz
  351. end type
  352. type ln_bar from w_publ_easyq`ln_bar within w_rp_mustpay_paycodehz
  353. end type
  354. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_mustpay_paycodehz
  355. end type
  356. type r_bar from w_publ_easyq`r_bar within w_rp_mustpay_paycodehz
  357. end type
  358. type ln_1 from w_publ_easyq`ln_1 within w_rp_mustpay_paycodehz
  359. end type
  360. type ln_2 from w_publ_easyq`ln_2 within w_rp_mustpay_paycodehz
  361. end type
  362. type ln_3 from w_publ_easyq`ln_3 within w_rp_mustpay_paycodehz
  363. end type
  364. type ln_4 from w_publ_easyq`ln_4 within w_rp_mustpay_paycodehz
  365. end type
  366. type sle_cuscode from singlelineedit within w_rp_mustpay_paycodehz
  367. integer x = 3387
  368. integer y = 192
  369. integer width = 512
  370. integer height = 88
  371. integer taborder = 80
  372. boolean bringtotop = true
  373. integer textsize = -9
  374. integer weight = 400
  375. fontcharset fontcharset = gb2312charset!
  376. fontpitch fontpitch = variable!
  377. string facename = "宋体"
  378. long textcolor = 33554432
  379. boolean autohscroll = false
  380. borderstyle borderstyle = stylelowered!
  381. end type
  382. type st_2 from statictext within w_rp_mustpay_paycodehz
  383. integer x = 3017
  384. integer y = 204
  385. integer width = 361
  386. integer height = 60
  387. boolean bringtotop = true
  388. integer textsize = -9
  389. integer weight = 400
  390. fontcharset fontcharset = gb2312charset!
  391. fontpitch fontpitch = variable!
  392. string facename = "宋体"
  393. long textcolor = 33554432
  394. long backcolor = 134217739
  395. boolean enabled = false
  396. string text = "供应商编号含:"
  397. boolean focusrectangle = false
  398. end type
  399. type sle_cusname from singlelineedit within w_rp_mustpay_paycodehz
  400. integer x = 4082
  401. integer y = 192
  402. integer width = 841
  403. integer height = 88
  404. integer taborder = 90
  405. boolean bringtotop = true
  406. integer textsize = -9
  407. integer weight = 400
  408. fontcharset fontcharset = gb2312charset!
  409. fontpitch fontpitch = variable!
  410. string facename = "宋体"
  411. long textcolor = 33554432
  412. long backcolor = 134217739
  413. boolean displayonly = true
  414. borderstyle borderstyle = stylelowered!
  415. end type
  416. type st_1 from statictext within w_rp_mustpay_paycodehz
  417. integer x = 3922
  418. integer y = 204
  419. integer width = 151
  420. integer height = 60
  421. boolean bringtotop = true
  422. integer textsize = -9
  423. integer weight = 400
  424. fontcharset fontcharset = gb2312charset!
  425. fontpitch fontpitch = variable!
  426. string facename = "宋体"
  427. long textcolor = 33554432
  428. long backcolor = 134217739
  429. string text = "名称:"
  430. alignment alignment = right!
  431. boolean focusrectangle = false
  432. end type
  433. type cb_3 from uo_imflatbutton within w_rp_mustpay_paycodehz
  434. integer x = 4933
  435. integer y = 192
  436. integer width = 110
  437. integer height = 88
  438. integer taborder = 100
  439. boolean bringtotop = true
  440. string text = "..."
  441. end type
  442. event clicked;call super::clicked;if not isvalid(w_spt_edit) then
  443. s_edit_index_tran s_ch_tran
  444. s_ch_tran.if_retrieve_all = local_retrieve_all
  445. s_ch_tran.work_mode = 1
  446. s_ch_tran.arg_pkid = 0
  447. s_ch_tran.arg_string_code = sle_cuscode.text
  448. openwithparm(w_spt_edit,s_ch_tran)
  449. s_spt s_inscust
  450. s_inscust=message.powerobjectparm
  451. if s_inscust.sptid > 0 then
  452. sle_cusname.text=s_inscust.name
  453. sle_cuscode.text=s_inscust.sptcode
  454. end if
  455. end if
  456. end event
  457. type ddlb_2 from dropdownlistbox within w_rp_mustpay_paycodehz
  458. integer x = 1093
  459. integer y = 192
  460. integer width = 430
  461. integer height = 1296
  462. integer taborder = 90
  463. boolean bringtotop = true
  464. integer textsize = -9
  465. integer weight = 400
  466. fontcharset fontcharset = gb2312charset!
  467. fontpitch fontpitch = variable!
  468. string facename = "宋体"
  469. long textcolor = 33554432
  470. boolean sorted = false
  471. boolean vscrollbar = true
  472. borderstyle borderstyle = stylelowered!
  473. end type
  474. event constructor;Long ll_moneyid,i
  475. String ls_name
  476. DECLARE getmx CURSOR FOR
  477. SELECT moneyid,Name FROM cw_currency Order By moneyid ;
  478. OPEN getmx;
  479. DO WHILE sqlca.SQLCode = 0
  480. FETCH getmx INTO :ll_moneyid,:ls_name ;
  481. IF sqlca.SQLCode <> 0 THEN EXIT
  482. THIS.AddItem(ls_name+Fill(' ',50)+'['+String(ll_moneyid)+']')
  483. i++
  484. if i=1 then
  485. this.text=ls_name+Fill(' ',50)+'['+String(ll_moneyid)+']'
  486. ins_moneyid=ll_moneyid
  487. end if
  488. LOOP
  489. CLOSE getmx;
  490. end event
  491. event selectionchanged; ins_moneyid=Long(Mid ( THIS.Text,Pos(THIS.Text,'[') + 1,Len(THIS.Text) - Pos(THIS.Text,'[') - 1 ))
  492. cb_1.triggerevent(clicked!)
  493. end event
  494. type st_5 from statictext within w_rp_mustpay_paycodehz
  495. integer x = 955
  496. integer y = 212
  497. integer width = 133
  498. integer height = 48
  499. boolean bringtotop = true
  500. integer textsize = -9
  501. integer weight = 400
  502. fontcharset fontcharset = gb2312charset!
  503. fontpitch fontpitch = variable!
  504. string facename = "宋体"
  505. long textcolor = 33554432
  506. long backcolor = 134217739
  507. string text = "币种"
  508. alignment alignment = right!
  509. boolean focusrectangle = false
  510. end type
  511. type ddlb_1 from dropdownlistbox within w_rp_mustpay_paycodehz
  512. integer x = 2400
  513. integer y = 28
  514. integer width = 384
  515. integer height = 984
  516. integer taborder = 80
  517. boolean bringtotop = true
  518. integer textsize = -9
  519. integer weight = 400
  520. fontcharset fontcharset = gb2312charset!
  521. fontpitch fontpitch = variable!
  522. string facename = "宋体"
  523. long textcolor = 33554432
  524. string text = "格式一"
  525. boolean sorted = false
  526. string item[] = {"格式一","格式二"}
  527. borderstyle borderstyle = stylelowered!
  528. end type
  529. event selectionchanged;
  530. IF THIS.Text = '格式一' THEN
  531. dw_1.DataObject = 'dw_rp_mstpay_paycodehz'
  532. ELSEIF THIS.Text = '格式二' THEN
  533. dw_1.DataObject = 'dw_rp_mstpay_paycodehz_2'
  534. END IF
  535. wf_replacedw()
  536. dw_1.Object.DataWindow.Print.Preview.Rulers = "yes"
  537. cb_1.TriggerEvent(Clicked!)
  538. st_7.text=string(dw_1.dataobject)
  539. end event
  540. type cb_xls from uo_imflatbutton within w_rp_mustpay_paycodehz
  541. integer x = 965
  542. integer y = 4
  543. integer height = 164
  544. integer taborder = 250
  545. boolean bringtotop = true
  546. string text = "Excel打印"
  547. string normalpicname = "excel.bmp"
  548. integer picsize = 16
  549. toolbaralignment pic_align = alignattop!
  550. boolean border = false
  551. end type
  552. event clicked;call super::clicked;// 约定 用 parent.Classname ( ) 即状况名称 作为打印模板的分类
  553. uo_sendtoexcel obj_st
  554. obj_st = create uo_sendtoexcel
  555. obj_st.commit_transaction = sqlca
  556. obj_st.TriggerEventObject = this.getparent()
  557. obj_st.TriggerEventname = 'ue_xls'
  558. string arg_msg
  559. menu m1
  560. m1 = obj_st.of_createmenu( parent.Classname ( ),sys_user_xls_print_str,sys_user_xls_send_str)
  561. if upperbound( m1.item)=2 then
  562. messagebox('错误','当前单据还没有设置Excel打印模板.')
  563. else
  564. m1.PopMenu(this.x ,this.y+THIS.height)
  565. end if
  566. end event
  567. type st_6 from statictext within w_rp_mustpay_paycodehz
  568. integer x = 87
  569. integer y = 208
  570. integer width = 128
  571. integer height = 48
  572. boolean bringtotop = true
  573. integer textsize = -9
  574. integer weight = 400
  575. fontcharset fontcharset = gb2312charset!
  576. fontpitch fontpitch = variable!
  577. string facename = "宋体"
  578. long textcolor = 33554432
  579. long backcolor = 134217739
  580. string text = "分部"
  581. boolean focusrectangle = false
  582. end type
  583. type ddlb_scid from uo_ddlb_scid within w_rp_mustpay_paycodehz
  584. integer x = 233
  585. integer y = 192
  586. integer width = 549
  587. integer height = 1120
  588. integer taborder = 40
  589. boolean bringtotop = true
  590. end type
  591. event constructor;call super::constructor;cur_scid = This.uo_scid
  592. end event
  593. event selectionchanged;call super::selectionchanged;cur_scid = This.uo_scid
  594. cb_1.TriggerEvent(Clicked!)
  595. end event
  596. type st_7 from statictext within w_rp_mustpay_paycodehz
  597. integer x = 2903
  598. integer y = 52
  599. integer width = 1198
  600. integer height = 48
  601. boolean bringtotop = true
  602. integer textsize = -9
  603. integer weight = 400
  604. fontcharset fontcharset = gb2312charset!
  605. fontpitch fontpitch = variable!
  606. string facename = "宋体"
  607. long textcolor = 33554432
  608. long backcolor = 67108864
  609. boolean focusrectangle = false
  610. end type
  611. event constructor;THIS.BackColor = 14215660
  612. end event