w_rp_subid_mx.srw 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820
  1. $PBExportHeader$w_rp_subid_mx.srw
  2. forward
  3. global type w_rp_subid_mx from w_publ_easyq
  4. end type
  5. type st_2 from statictext within w_rp_subid_mx
  6. end type
  7. type ddlb_1 from dropdownlistbox within w_rp_subid_mx
  8. end type
  9. type dw_2 from u_dw_rbtnfilter within w_rp_subid_mx
  10. end type
  11. type cbx_1 from checkbox within w_rp_subid_mx
  12. end type
  13. type cb_3 from uo_imflatbutton within w_rp_subid_mx
  14. end type
  15. type cb_4 from uo_imflatbutton within w_rp_subid_mx
  16. end type
  17. type cb_5 from uo_imflatbutton within w_rp_subid_mx
  18. end type
  19. type cb_9 from uo_imflatbutton within w_rp_subid_mx
  20. end type
  21. type cb_addzy from uo_imflatbutton within w_rp_subid_mx
  22. end type
  23. type st_1 from statictext within w_rp_subid_mx
  24. end type
  25. end forward
  26. global type w_rp_subid_mx from w_publ_easyq
  27. integer width = 3502
  28. integer height = 2200
  29. string title = "明细帐"
  30. long backcolor = 82501359
  31. boolean if_ue_sentdataout = true
  32. event dw_retrieve ( )
  33. st_2 st_2
  34. ddlb_1 ddlb_1
  35. dw_2 dw_2
  36. cbx_1 cbx_1
  37. cb_3 cb_3
  38. cb_4 cb_4
  39. cb_5 cb_5
  40. cb_9 cb_9
  41. cb_addzy cb_addzy
  42. st_1 st_1
  43. end type
  44. global w_rp_subid_mx w_rp_subid_mx
  45. type variables
  46. s_rp_type s_rp_type_hz
  47. boolean is_display=false
  48. end variables
  49. forward prototypes
  50. public function string wf_get_titlename (integer arg_gettype, string arg_subid)
  51. end prototypes
  52. event dw_retrieve;Long firstmon,lastmon,subgrade,cur_year,ls_firstmon,ls_lastmon
  53. String firstsubid,lastsubid
  54. String ls_subid,ls_subname
  55. Int ls_subid_len
  56. Int no_post
  57. Int li_hswb
  58. Decimal ld_debit_notpost,ld_credit_notpost
  59. cur_year = s_rp_type_hz.Year
  60. firstmon = s_rp_type_hz.firstmon
  61. lastmon = s_rp_type_hz.lastmon
  62. firstsubid = s_rp_type_hz.firstsubid
  63. lastsubid = s_rp_type_hz.lastsubid
  64. no_post = s_rp_type_hz.no_post
  65. ls_firstmon = cur_year * 100 + firstmon
  66. ls_lastmon = cur_year * 100 + lastmon
  67. IF dw_2.GetRow() <= 0 THEN RETURN
  68. ls_subid = dw_2.Object.subid[dw_2.GetRow()]
  69. ls_subname = dw_2.Object.Name[dw_2.GetRow()]
  70. ls_subid_len = Len(ls_subid)
  71. SELECT hswb INTO :li_hswb
  72. FROM cw_subject
  73. WHERE accsetid = :sys_accsetid
  74. AND subid = :ls_subid;
  75. IF sqlca.SQLCode <> 0 THEN li_hswb = 0
  76. dw_1.Retrieve(sys_accsetid,sys_subaccsetid,ls_subid,ls_subid_len,no_post,ls_firstmon,ls_lastmon,sys_option_cred_rel )
  77. dw_1.Object.Month.Text = "会计期间:"+String(ls_firstmon)+" 至 "+String(ls_lastmon)
  78. dw_1.Object.Title.Text = wf_get_titlename(0,ls_subid)+'明细帐'
  79. dw_1.Object.subname.Text = "明细科目:("+ls_subid+")"+wf_get_titlename(1,ls_subid)
  80. IF dw_1.RowCount() <= 0 THEN RETURN
  81. w_sys_wait.Show()
  82. Dec m_balc,m_rawbalc,null_amt
  83. Dec tmp_debit,tmp_credit,tmp_rawdebit,tmp_rawcredit
  84. Long i
  85. Long cur_month
  86. Decimal ls_debit,ls_credit,ls_balc
  87. dw_1.SetRedraw(FALSE)
  88. SetNull(null_amt)
  89. FOR i = 1 TO dw_1.RowCount()
  90. IF dw_1.Object.dw_sort[i] = 0 THEN //期初
  91. m_balc = dw_1.Object.balc[i]
  92. IF IsNull(m_balc) THEN m_balc = 0
  93. IF ddlb_1.Text = '外币金额式' AND li_hswb = 1 THEN
  94. m_rawbalc = dw_1.Object.rawbalc[i]
  95. IF IsNull(m_rawbalc) THEN m_rawbalc = 0
  96. END IF
  97. ELSEIF dw_1.Object.dw_sort[i] = 1 THEN //期间
  98. //去null
  99. tmp_debit = dw_1.Object.debit[i]
  100. tmp_credit = dw_1.Object.credit[i]
  101. IF IsNull(tmp_debit) THEN tmp_debit = 0
  102. IF IsNull(tmp_credit) THEN tmp_credit = 0
  103. dw_1.Object.balc[i] = tmp_debit - tmp_credit + m_balc
  104. m_balc = dw_1.Object.balc[i]
  105. IF dw_1.Object.balc[i] = 0 THEN dw_1.Object.balc[i] = null_amt
  106. IF ddlb_1.Text = '外币金额式' THEN
  107. tmp_rawdebit = dw_1.Object.rawdebit[i]
  108. tmp_rawcredit = dw_1.Object.rawcredit[i]
  109. IF IsNull(tmp_rawdebit) THEN tmp_rawdebit = 0
  110. IF IsNull(tmp_rawcredit) THEN tmp_rawcredit = 0
  111. IF li_hswb = 1 THEN dw_1.Object.rawbalc[i] = tmp_rawdebit - tmp_rawcredit + m_rawbalc
  112. m_rawbalc = dw_1.Object.rawbalc[i]
  113. IF dw_1.Object.rawbalc[i] = 0 THEN dw_1.Object.rawbalc[i] = null_amt
  114. END IF
  115. ELSEIF dw_1.Object.dw_sort[i] = 2 THEN //本期合计
  116. dw_1.Object.balc[i] = dw_1.Object.balc[i - 1]
  117. IF ddlb_1.Text = '外币金额式' AND li_hswb = 1 THEN
  118. dw_1.Object.rawbalc[i] = dw_1.Object.rawbalc[i - 1]
  119. END IF
  120. ELSEIF dw_1.Object.dw_sort[i] = 3 THEN //本年合计
  121. IF ls_lastmon = sys_curyearmon AND i = dw_1.RowCount() AND no_post = -1 THEN
  122. ld_debit_notpost = 0
  123. ld_credit_notpost = 0
  124. SELECT isnull(sum(cw_credencemx.debit),0),isnull(sum(cw_credencemx.credit),0)
  125. INTO :ld_debit_notpost,:ld_credit_notpost
  126. FROM cw_credence,
  127. cw_credencemx
  128. WHERE ( cw_credence.accsetid = cw_credencemx.accsetid ) AND
  129. ( cw_credence.subaccsetid = cw_credencemx.subaccsetid ) AND
  130. ( cw_credence.credid = cw_credencemx.credid ) AND
  131. ( cw_credence.accsetid = :sys_accsetid ) AND
  132. ( cw_credence.cmonth >= :ls_firstmon ) AND
  133. ( cw_credence.cmonth <= :ls_lastmon ) AND
  134. ( cw_credence.postflag = 0 ) AND
  135. ( Left(cw_credencemx.subid,:ls_subid_len) = :ls_subid );
  136. IF sqlca.SQLCode <> 0 THEN
  137. ld_debit_notpost = 0
  138. ld_credit_notpost = 0
  139. END IF
  140. dw_1.Object.debit[i] = dw_1.Object.debit[i] + ld_debit_notpost
  141. dw_1.Object.credit[i] = dw_1.Object.credit[i] + ld_credit_notpost
  142. dw_1.Object.balc[i] = dw_1.Object.balc[i - 1]
  143. IF ddlb_1.Text = '外币金额式' AND li_hswb = 1 THEN
  144. dw_1.Object.rawbalc[i] = dw_1.Object.rawbalc[i - 1]
  145. END IF
  146. END IF
  147. END IF
  148. NEXT
  149. dw_1.SetRedraw(TRUE)
  150. w_sys_wait.Hide()
  151. end event
  152. public function string wf_get_titlename (integer arg_gettype, string arg_subid);string rst_titlename,p_subidname,tmp_subidname
  153. string p_subid,tmp_subid
  154. uo_subject uo_sub
  155. uo_sub = create uo_subject
  156. if arg_gettype = 0 then
  157. // p_subid = uo_sub.p_parent_subid(arg_subid)
  158. p_subid = left(arg_subid,3)
  159. if p_subid = '' then p_subid = arg_subid
  160. select name into :p_subidname from cw_subject
  161. where accsetid = :sys_accsetid
  162. and subid = :p_subid;
  163. if sqlca.sqlcode <> 0 then p_subidname = ''
  164. rst_titlename = p_subidname
  165. else
  166. tmp_subid = arg_subid
  167. do while len(tmp_subid) >= s_sys_accset.step1
  168. select name into :tmp_subidname from cw_subject
  169. where accsetid = :sys_accsetid
  170. and subid = :tmp_subid;
  171. if sqlca.sqlcode <> 0 then tmp_subidname = ''
  172. rst_titlename = '-' + tmp_subidname + rst_titlename
  173. choose case len(tmp_subid)
  174. case s_sys_accset.step1+s_sys_accset.step2+s_sys_accset.step3+s_sys_accset.step4+s_sys_accset.step5+s_sys_accset.step6
  175. tmp_subid = left(tmp_subid,len(tmp_subid) - s_sys_accset.step6)
  176. case s_sys_accset.step1+s_sys_accset.step2+s_sys_accset.step3+s_sys_accset.step4+s_sys_accset.step5
  177. tmp_subid = left(tmp_subid,len(tmp_subid) - s_sys_accset.step5)
  178. case s_sys_accset.step1+s_sys_accset.step2+s_sys_accset.step3+s_sys_accset.step4
  179. tmp_subid = left(tmp_subid,len(tmp_subid) - s_sys_accset.step4)
  180. case s_sys_accset.step1+s_sys_accset.step2+s_sys_accset.step3
  181. tmp_subid = left(tmp_subid,len(tmp_subid) - s_sys_accset.step3)
  182. case s_sys_accset.step1+s_sys_accset.step2
  183. tmp_subid = left(tmp_subid,len(tmp_subid) - s_sys_accset.step2)
  184. case s_sys_accset.step1
  185. tmp_subid = left(tmp_subid,len(tmp_subid) - s_sys_accset.step1)
  186. end choose
  187. loop
  188. rst_titlename = mid(rst_titlename,2)
  189. end if
  190. destroy uo_sub
  191. return rst_titlename
  192. end function
  193. on w_rp_subid_mx.create
  194. int iCurrent
  195. call super::create
  196. this.st_2=create st_2
  197. this.ddlb_1=create ddlb_1
  198. this.dw_2=create dw_2
  199. this.cbx_1=create cbx_1
  200. this.cb_3=create cb_3
  201. this.cb_4=create cb_4
  202. this.cb_5=create cb_5
  203. this.cb_9=create cb_9
  204. this.cb_addzy=create cb_addzy
  205. this.st_1=create st_1
  206. iCurrent=UpperBound(this.Control)
  207. this.Control[iCurrent+1]=this.st_2
  208. this.Control[iCurrent+2]=this.ddlb_1
  209. this.Control[iCurrent+3]=this.dw_2
  210. this.Control[iCurrent+4]=this.cbx_1
  211. this.Control[iCurrent+5]=this.cb_3
  212. this.Control[iCurrent+6]=this.cb_4
  213. this.Control[iCurrent+7]=this.cb_5
  214. this.Control[iCurrent+8]=this.cb_9
  215. this.Control[iCurrent+9]=this.cb_addzy
  216. this.Control[iCurrent+10]=this.st_1
  217. end on
  218. on w_rp_subid_mx.destroy
  219. call super::destroy
  220. destroy(this.st_2)
  221. destroy(this.ddlb_1)
  222. destroy(this.dw_2)
  223. destroy(this.cbx_1)
  224. destroy(this.cb_3)
  225. destroy(this.cb_4)
  226. destroy(this.cb_5)
  227. destroy(this.cb_9)
  228. destroy(this.cb_addzy)
  229. destroy(this.st_1)
  230. end on
  231. event open;THIS.TriggerEvent('ue_before_open')
  232. wf_movetocenter()
  233. dw_2.SetTransObject(sqlca)
  234. dw_1.SetTransObject (sqlca)
  235. IF sys_option_mx_if_mxdscrp = 0 THEN
  236. dw_1.Modify('destroy mxdscrp')
  237. END IF
  238. dw_1.titleclick_sort_use = FALSE
  239. IF Trim(dw_1.DataObject) <> '' THEN
  240. dw_1.Object.DataWindow.Print.MARGIN.Top = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_TOP", "110"))
  241. dw_1.Object.DataWindow.Print.MARGIN.Left = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_LEFT", "96" ))
  242. dw_1.Object.DataWindow.Print.MARGIN.bottom = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_BOTTOM", "110"))
  243. dw_1.Object.DataWindow.Print.MARGIN.Right = Integer(ProfileString(sys_inifilename,dw_1.DataObject, "MARGIN_RIGHT", "96" ))
  244. END IF
  245. cb_1.TriggerEvent(Clicked!)
  246. end event
  247. event resize;call super::resize;dw_2.Height = dw_1.Height
  248. end event
  249. event ue_before_open;call super::ue_before_open;if_ue_sentdataout = TRUE
  250. end event
  251. type cb_func from w_publ_easyq`cb_func within w_rp_subid_mx
  252. end type
  253. type cb_exit from w_publ_easyq`cb_exit within w_rp_subid_mx
  254. integer x = 1989
  255. integer taborder = 40
  256. end type
  257. type cb_2 from w_publ_easyq`cb_2 within w_rp_subid_mx
  258. integer x = 1426
  259. integer width = 274
  260. integer taborder = 170
  261. boolean bringtotop = true
  262. string text = "选择打印"
  263. end type
  264. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_subid_mx
  265. integer x = 1006
  266. integer taborder = 140
  267. boolean bringtotop = true
  268. end type
  269. type cb_1 from w_publ_easyq`cb_1 within w_rp_subid_mx
  270. integer taborder = 50
  271. boolean bringtotop = true
  272. string text = "过滤"
  273. end type
  274. event cb_1::clicked;open(w_rp_type_mx)
  275. s_rp_type_hz=message.powerobjectparm
  276. if s_rp_type_hz.year=0 then
  277. if is_display then
  278. return
  279. else
  280. close(parent)
  281. return
  282. end if
  283. end if
  284. is_display=true
  285. dw_2.retrieve(s_rp_type_hz.firstsubid,s_rp_type_hz.lastsubid,sys_accsetid)
  286. parent.triggerevent("dw_retrieve")
  287. end event
  288. type st_3 from w_publ_easyq`st_3 within w_rp_subid_mx
  289. boolean visible = false
  290. integer x = 279
  291. integer y = 752
  292. integer width = 448
  293. integer weight = 700
  294. long backcolor = 16776960
  295. string text = "会计年度:2002"
  296. alignment alignment = left!
  297. boolean border = true
  298. end type
  299. type st_4 from w_publ_easyq`st_4 within w_rp_subid_mx
  300. integer x = 969
  301. integer y = 212
  302. integer width = 462
  303. integer height = 64
  304. integer weight = 700
  305. long backcolor = 16776960
  306. string text = ""
  307. alignment alignment = left!
  308. boolean border = true
  309. end type
  310. type em_1 from w_publ_easyq`em_1 within w_rp_subid_mx
  311. boolean visible = false
  312. integer x = 1413
  313. integer y = 756
  314. integer taborder = 180
  315. end type
  316. type em_2 from w_publ_easyq`em_2 within w_rp_subid_mx
  317. boolean visible = false
  318. integer x = 1792
  319. integer y = 756
  320. integer taborder = 190
  321. end type
  322. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_subid_mx
  323. integer x = 2395
  324. integer y = 40
  325. integer taborder = 100
  326. end type
  327. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_subid_mx
  328. integer x = 2181
  329. integer y = 44
  330. integer taborder = 120
  331. end type
  332. type dw_1 from w_publ_easyq`dw_1 within w_rp_subid_mx
  333. integer x = 1280
  334. integer y = 304
  335. integer width = 2126
  336. integer height = 924
  337. string dataobject = "dw_rp_subid_mx"
  338. end type
  339. event dw_1::doubleclicked;Long ll_row
  340. Long ll_credid
  341. ll_row = THIS.GetRow()
  342. IF ll_row <= 0 THEN RETURN
  343. ll_credid = THIS.Object.credid[ll_row]
  344. IF ll_credid <= 0 THEN RETURN
  345. s_edit_index_tran s_tran //翻页功能窗口 传递参数使用
  346. s_tran.if_retrieve_all = TRUE //是否一次RETRIEVE所有行
  347. s_tran.work_mode = 0 //0-单纯编辑模式, 1-选择模式
  348. s_tran.arg_pkid = 0 //目标定位PKID (备用)
  349. s_tran.arg_string_code = '' //查询列部分内容,用于初步筛选
  350. s_tran.e_long = ll_credid
  351. OpenWithParm(w_credence_edit,s_tran)
  352. end event
  353. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_subid_mx
  354. integer x = 1664
  355. integer y = 764
  356. end type
  357. type sle_cust from w_publ_easyq`sle_cust within w_rp_subid_mx
  358. integer x = 503
  359. integer y = 764
  360. end type
  361. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_subid_mx
  362. integer x = 1207
  363. integer y = 780
  364. end type
  365. type st_cust from w_publ_easyq`st_cust within w_rp_subid_mx
  366. integer x = 41
  367. integer y = 780
  368. end type
  369. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_subid_mx
  370. integer x = 1902
  371. integer y = 672
  372. end type
  373. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_subid_mx
  374. boolean visible = false
  375. integer x = 1975
  376. integer y = 524
  377. end type
  378. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_subid_mx
  379. boolean visible = false
  380. integer x = 1527
  381. integer y = 532
  382. end type
  383. type pb_2 from w_publ_easyq`pb_2 within w_rp_subid_mx
  384. boolean visible = false
  385. integer x = 1637
  386. integer y = 532
  387. end type
  388. type cb_help from w_publ_easyq`cb_help within w_rp_subid_mx
  389. boolean visible = false
  390. integer x = 2459
  391. integer y = 516
  392. end type
  393. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_subid_mx
  394. integer x = 750
  395. end type
  396. type gb_1 from w_publ_easyq`gb_1 within w_rp_subid_mx
  397. end type
  398. type ln_bar from w_publ_easyq`ln_bar within w_rp_subid_mx
  399. end type
  400. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_subid_mx
  401. end type
  402. type r_bar from w_publ_easyq`r_bar within w_rp_subid_mx
  403. end type
  404. type ln_1 from w_publ_easyq`ln_1 within w_rp_subid_mx
  405. end type
  406. type ln_2 from w_publ_easyq`ln_2 within w_rp_subid_mx
  407. end type
  408. type ln_3 from w_publ_easyq`ln_3 within w_rp_subid_mx
  409. boolean visible = false
  410. end type
  411. type ln_4 from w_publ_easyq`ln_4 within w_rp_subid_mx
  412. boolean visible = false
  413. end type
  414. type st_2 from statictext within w_rp_subid_mx
  415. integer x = 14
  416. integer y = 216
  417. integer width = 183
  418. integer height = 60
  419. boolean bringtotop = true
  420. integer textsize = -9
  421. integer weight = 400
  422. fontcharset fontcharset = gb2312charset!
  423. fontpitch fontpitch = variable!
  424. string facename = "宋体"
  425. long textcolor = 33554432
  426. long backcolor = 67108864
  427. boolean enabled = false
  428. string text = "格式:"
  429. boolean focusrectangle = false
  430. end type
  431. type ddlb_1 from dropdownlistbox within w_rp_subid_mx
  432. integer x = 201
  433. integer y = 204
  434. integer width = 416
  435. integer height = 268
  436. integer taborder = 20
  437. boolean bringtotop = true
  438. integer textsize = -9
  439. integer weight = 400
  440. fontcharset fontcharset = gb2312charset!
  441. fontpitch fontpitch = variable!
  442. string facename = "宋体"
  443. long textcolor = 33554432
  444. string text = "金额式"
  445. boolean sorted = false
  446. boolean vscrollbar = true
  447. string item[] = {"金额式","外币金额式"}
  448. borderstyle borderstyle = stylelowered!
  449. end type
  450. event selectionchanged;if index=1 then
  451. dw_1.dataobject='dw_rp_subid_mx'
  452. dw_1.settransobject(sqlca)
  453. else
  454. dw_1.dataobject='dw_rp_subid_mx_wb'
  455. dw_1.settransobject(sqlca)
  456. end if
  457. parent.triggerevent("dw_retrieve")
  458. end event
  459. type dw_2 from u_dw_rbtnfilter within w_rp_subid_mx
  460. integer y = 304
  461. integer width = 1280
  462. integer height = 924
  463. integer taborder = 30
  464. boolean bringtotop = true
  465. string dataobject = "dw_rp_subid_mx_subidlist"
  466. boolean hscrollbar = true
  467. boolean vscrollbar = true
  468. end type
  469. event rowfocuschanged;if currentrow<=0 then return
  470. if this.getrow()<=0 then return
  471. this.selectrow(0,false)
  472. this.selectrow(currentrow,true)
  473. string ls_subid,moneyname
  474. long ls_moneyid=0
  475. ls_subid=this.object.subid[this.getrow()]
  476. select moneyid into :ls_moneyid from cw_subject
  477. where cw_subject.subid=:ls_subid
  478. and cw_subject.accsetid=:sys_accsetid;
  479. if sqlca.sqlcode<>0 then
  480. ls_moneyid=0
  481. end if
  482. if ls_moneyid=0 then
  483. select name into :moneyname from cw_currency
  484. where cw_currency.accsetid =:sys_accsetid
  485. and cw_currency.native=1;
  486. else
  487. select name into :moneyname from cw_currency
  488. where cw_currency.accsetid =:sys_accsetid
  489. and cw_currency.native=0
  490. and cw_currency.moneyid=:ls_moneyid;
  491. end if
  492. st_4.text='币种:'+moneyname
  493. parent.triggerevent("dw_retrieve")
  494. end event
  495. event constructor;call super::constructor; titleclick_sort_use=true //单击标题排序功能开关
  496. rbutton_filter_use=true //右键查询功能开关
  497. end event
  498. type cbx_1 from checkbox within w_rp_subid_mx
  499. integer x = 640
  500. integer y = 212
  501. integer width = 320
  502. integer height = 64
  503. boolean bringtotop = true
  504. integer textsize = -9
  505. integer weight = 400
  506. fontcharset fontcharset = gb2312charset!
  507. fontpitch fontpitch = variable!
  508. string facename = "宋体"
  509. long textcolor = 33554432
  510. long backcolor = 67108864
  511. string text = "全选打印"
  512. end type
  513. event clicked;long i
  514. int k=0
  515. if this.checked then k=1
  516. for i= 1 to dw_2.rowcount()
  517. dw_2.object.selectflag[i]=k
  518. next
  519. end event
  520. type cb_3 from uo_imflatbutton within w_rp_subid_mx
  521. integer x = 1262
  522. integer width = 165
  523. integer height = 164
  524. integer taborder = 130
  525. boolean bringtotop = true
  526. string text = "打印"
  527. string normalpicname = "print.bmp"
  528. integer picsize = 16
  529. toolbaralignment pic_align = alignattop!
  530. boolean border = false
  531. end type
  532. event clicked;IF NOT f_power_ind(153,sys_msg_pow) THEN
  533. MessageBox(publ_operator,'你没有使用权限!')
  534. RETURN
  535. END IF
  536. dw_1.object.datawindow.print.page.range=''
  537. dw_1.object.datawindow.print.copies=1
  538. long i
  539. boolean printflag=false
  540. for i= 1 to dw_2.rowcount()
  541. if dw_2.object.selectflag[i]=1 then
  542. dw_2.scrolltorow(i)
  543. printflag=true
  544. dw_1.PRINT()
  545. end if
  546. next
  547. if printflag=false then
  548. MEssagebox('系统提示','没有可打印的产品,请选择产品!')
  549. return
  550. end if
  551. end event
  552. type cb_4 from uo_imflatbutton within w_rp_subid_mx
  553. integer x = 302
  554. integer width = 224
  555. integer height = 164
  556. integer taborder = 70
  557. boolean bringtotop = true
  558. string text = "上一个"
  559. string normalpicname = "p5.bmp"
  560. integer picsize = 16
  561. toolbaralignment pic_align = alignattop!
  562. boolean border = false
  563. end type
  564. event clicked;dw_2.ScrollPriorRow()
  565. end event
  566. type cb_5 from uo_imflatbutton within w_rp_subid_mx
  567. integer x = 526
  568. integer width = 224
  569. integer height = 164
  570. integer taborder = 110
  571. boolean bringtotop = true
  572. string text = "下一个"
  573. string normalpicname = "p6.bmp"
  574. integer picsize = 16
  575. toolbaralignment pic_align = alignattop!
  576. boolean border = false
  577. end type
  578. event clicked;dw_2.ScrollNextRow()
  579. end event
  580. type cb_9 from uo_imflatbutton within w_rp_subid_mx
  581. integer x = 1701
  582. integer width = 288
  583. integer height = 164
  584. integer taborder = 150
  585. boolean bringtotop = true
  586. string text = "打印封面"
  587. string normalpicname = "print.bmp"
  588. integer picsize = 16
  589. toolbaralignment pic_align = alignattop!
  590. boolean border = false
  591. end type
  592. event clicked;S_print_MSG LS_PRMSG
  593. LS_PRMSG.obj_dwNAME = 'dw_rp_fm_subid_mx'
  594. LS_PRMSG.TAG_TEXT = '封面'
  595. LS_PRMSG.FILTER_STRING = ''
  596. LS_PRMSG.retr_pram_falg = -1
  597. LS_PRMSG.PAGECH_FLAG = 0
  598. OpenWithParm(w_publ_preview,LS_PRMSG)
  599. end event
  600. type cb_addzy from uo_imflatbutton within w_rp_subid_mx
  601. integer x = 1504
  602. integer y = 200
  603. integer width = 343
  604. integer height = 80
  605. integer taborder = 30
  606. boolean bringtotop = true
  607. string text = "补充备注"
  608. end type
  609. event constructor;this.visible = (sys_option_mx_if_mxdscrp = 1)
  610. end event
  611. event clicked;Long ll_row
  612. Long ll_credid,ll_fuluno
  613. String arg_msg
  614. s_mxdscrp s_view,s_return
  615. dw_1.AcceptText()
  616. ll_row = dw_1.GetRow()
  617. IF ll_row <= 0 THEN
  618. MessageBox('提示','请选择分录')
  619. RETURN
  620. END IF
  621. IF dw_1.Object.dw_sort[ll_row] <> 1 THEN
  622. MessageBox('提示',' 不是会计分录,不能操作,请检查')
  623. RETURN
  624. END IF
  625. ll_credid = dw_1.Object.credid[ll_row]
  626. ll_fuluno = dw_1.Object.fuluno[ll_row]
  627. s_view.mxdscrp = dw_1.Object.mxdscrp[ll_row]
  628. OpenWithParm(w_credence_mxdscrp,s_view)
  629. s_return = Message.PowerObjectParm
  630. IF s_return.returnflag = 0 THEN RETURN
  631. uo_credence uo_cred
  632. uo_cred = CREATE uo_credence
  633. IF uo_cred.uof_mod_mxdscrp(sys_accsetid,ll_credid,ll_fuluno,s_return.mxdscrp,arg_msg) = 0 THEN
  634. MessageBox('提示','补充备注失败,'+arg_msg)
  635. ELSE
  636. MessageBox('提示','补充备注成功')
  637. dw_1.Object.mxdscrp[ll_row] = s_return.mxdscrp
  638. END IF
  639. DESTROY uo_cred
  640. end event
  641. type st_1 from statictext within w_rp_subid_mx
  642. integer x = 617
  643. integer y = 196
  644. integer width = 841
  645. integer height = 92
  646. integer textsize = -9
  647. integer weight = 400
  648. fontcharset fontcharset = gb2312charset!
  649. fontpitch fontpitch = variable!
  650. string facename = "宋体"
  651. long textcolor = 33554432
  652. long backcolor = 67108864
  653. boolean border = true
  654. boolean focusrectangle = false
  655. end type