w_rp_mustpay_balc_other.srw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446
  1. $PBExportHeader$w_rp_mustpay_balc_other.srw
  2. forward
  3. global type w_rp_mustpay_balc_other from w_publ_easyq
  4. end type
  5. type cbx_1 from checkbox within w_rp_mustpay_balc_other
  6. end type
  7. type ddlb_2 from uo_ddlb_scid within w_rp_mustpay_balc_other
  8. end type
  9. type st_2 from statictext within w_rp_mustpay_balc_other
  10. end type
  11. type dw_spttype from u_dw_rbtnfilter within w_rp_mustpay_balc_other
  12. end type
  13. type ddlb_1 from dropdownlistbox within w_rp_mustpay_balc_other
  14. end type
  15. type st_1 from statictext within w_rp_mustpay_balc_other
  16. end type
  17. type ddlb_3 from dropdownlistbox within w_rp_mustpay_balc_other
  18. end type
  19. type cbx_show from checkbox within w_rp_mustpay_balc_other
  20. end type
  21. end forward
  22. global type w_rp_mustpay_balc_other from w_publ_easyq
  23. integer x = 9
  24. integer y = 12
  25. string title = "其他应付汇总表"
  26. cbx_1 cbx_1
  27. ddlb_2 ddlb_2
  28. st_2 st_2
  29. dw_spttype dw_spttype
  30. ddlb_1 ddlb_1
  31. st_1 st_1
  32. ddlb_3 ddlb_3
  33. cbx_show cbx_show
  34. end type
  35. global w_rp_mustpay_balc_other w_rp_mustpay_balc_other
  36. type variables
  37. long cur_scid
  38. long cur_scid_arr[]
  39. long ins_spttypeid
  40. long ins_moneyid = -1
  41. end variables
  42. on w_rp_mustpay_balc_other.create
  43. int iCurrent
  44. call super::create
  45. this.cbx_1=create cbx_1
  46. this.ddlb_2=create ddlb_2
  47. this.st_2=create st_2
  48. this.dw_spttype=create dw_spttype
  49. this.ddlb_1=create ddlb_1
  50. this.st_1=create st_1
  51. this.ddlb_3=create ddlb_3
  52. this.cbx_show=create cbx_show
  53. iCurrent=UpperBound(this.Control)
  54. this.Control[iCurrent+1]=this.cbx_1
  55. this.Control[iCurrent+2]=this.ddlb_2
  56. this.Control[iCurrent+3]=this.st_2
  57. this.Control[iCurrent+4]=this.dw_spttype
  58. this.Control[iCurrent+5]=this.ddlb_1
  59. this.Control[iCurrent+6]=this.st_1
  60. this.Control[iCurrent+7]=this.ddlb_3
  61. this.Control[iCurrent+8]=this.cbx_show
  62. end on
  63. on w_rp_mustpay_balc_other.destroy
  64. call super::destroy
  65. destroy(this.cbx_1)
  66. destroy(this.ddlb_2)
  67. destroy(this.st_2)
  68. destroy(this.dw_spttype)
  69. destroy(this.ddlb_1)
  70. destroy(this.st_1)
  71. destroy(this.ddlb_3)
  72. destroy(this.cbx_show)
  73. end on
  74. event resize;call super::resize;dw_spttype.height = dw_1.height
  75. end event
  76. event ue_before_openretrieve;call super::ue_before_openretrieve;dw_spttype.SetTransObject (sqlca)
  77. dw_spttype.Retrieve()
  78. end event
  79. event open;call super::open;ddlb_3.Text = '明细表'
  80. end event
  81. type cb_func from w_publ_easyq`cb_func within w_rp_mustpay_balc_other
  82. end type
  83. type cb_exit from w_publ_easyq`cb_exit within w_rp_mustpay_balc_other
  84. end type
  85. type cb_2 from w_publ_easyq`cb_2 within w_rp_mustpay_balc_other
  86. boolean bringtotop = true
  87. end type
  88. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_mustpay_balc_other
  89. boolean bringtotop = true
  90. end type
  91. type cb_1 from w_publ_easyq`cb_1 within w_rp_mustpay_balc_other
  92. boolean bringtotop = true
  93. end type
  94. event cb_1::clicked;call super::clicked;DateTime firstdate,enddate
  95. firstdate = DateTime(Date(em_1.Text),Time(0))
  96. enddate = DateTime(Date(em_2.Text),Time('23:59:59'))
  97. Delete From u_parm_pay Where id = 1 ;
  98. If sqlca.SQLCode <> 0 Then
  99. MessageBox('错误','数据库操作失败!',stopsign!,ok!)
  100. Rollback;
  101. Return
  102. End If
  103. Insert Into u_parm_pay (firstdate,enddate,id) Values (:firstdate,:enddate,1);
  104. If sqlca.SQLCode <> 0 Then
  105. MessageBox('错误','数据库操作失败!',stopsign!,ok!)
  106. Rollback;
  107. Return
  108. End If
  109. Commit;
  110. Int arg_ifshow
  111. IF cbx_show.Checked THEN
  112. arg_ifshow = 1
  113. ELSE
  114. arg_ifshow = 0
  115. END IF
  116. If dw_1.DataObject = 'dw_rp_mustpay_balc_other_hz_1' Then
  117. dw_1.Retrieve(firstdate,enddate,cur_scid,ins_moneyid)
  118. Else
  119. dw_1.Retrieve(firstdate,enddate,cur_scid,ins_moneyid,sys_user_spttype,ins_spttypeid,arg_ifshow)
  120. End If
  121. dw_1.Object.dt_ar.Text = "日期范围: "+em_1.Text+" 到 "+em_2.Text
  122. end event
  123. type st_3 from w_publ_easyq`st_3 within w_rp_mustpay_balc_other
  124. integer x = 5
  125. integer y = 324
  126. integer width = 206
  127. end type
  128. type st_4 from w_publ_easyq`st_4 within w_rp_mustpay_balc_other
  129. integer x = 722
  130. integer y = 324
  131. end type
  132. type em_1 from w_publ_easyq`em_1 within w_rp_mustpay_balc_other
  133. integer x = 210
  134. integer y = 308
  135. integer width = 393
  136. alignment alignment = center!
  137. end type
  138. type em_2 from w_publ_easyq`em_2 within w_rp_mustpay_balc_other
  139. integer x = 827
  140. integer y = 308
  141. integer width = 393
  142. alignment alignment = center!
  143. end type
  144. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_mustpay_balc_other
  145. integer y = 8
  146. end type
  147. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_mustpay_balc_other
  148. integer y = 12
  149. end type
  150. type dw_1 from w_publ_easyq`dw_1 within w_rp_mustpay_balc_other
  151. integer x = 800
  152. integer y = 416
  153. integer width = 2345
  154. integer height = 1712
  155. string dataobject = "dw_rp_mustpay_balc_other"
  156. end type
  157. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_mustpay_balc_other
  158. end type
  159. type sle_cust from w_publ_easyq`sle_cust within w_rp_mustpay_balc_other
  160. end type
  161. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_mustpay_balc_other
  162. end type
  163. type st_cust from w_publ_easyq`st_cust within w_rp_mustpay_balc_other
  164. end type
  165. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_mustpay_balc_other
  166. boolean visible = true
  167. end type
  168. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_mustpay_balc_other
  169. integer x = 617
  170. integer y = 308
  171. end type
  172. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_mustpay_balc_other
  173. integer x = 1230
  174. integer y = 308
  175. end type
  176. type pb_2 from w_publ_easyq`pb_2 within w_rp_mustpay_balc_other
  177. integer x = 1344
  178. integer y = 308
  179. end type
  180. type cb_help from w_publ_easyq`cb_help within w_rp_mustpay_balc_other
  181. end type
  182. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_mustpay_balc_other
  183. end type
  184. type gb_1 from w_publ_easyq`gb_1 within w_rp_mustpay_balc_other
  185. end type
  186. type ln_bar from w_publ_easyq`ln_bar within w_rp_mustpay_balc_other
  187. end type
  188. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_mustpay_balc_other
  189. end type
  190. type r_bar from w_publ_easyq`r_bar within w_rp_mustpay_balc_other
  191. end type
  192. type ln_1 from w_publ_easyq`ln_1 within w_rp_mustpay_balc_other
  193. end type
  194. type ln_2 from w_publ_easyq`ln_2 within w_rp_mustpay_balc_other
  195. end type
  196. type ln_3 from w_publ_easyq`ln_3 within w_rp_mustpay_balc_other
  197. end type
  198. type ln_4 from w_publ_easyq`ln_4 within w_rp_mustpay_balc_other
  199. end type
  200. type cbx_1 from checkbox within w_rp_mustpay_balc_other
  201. boolean visible = false
  202. integer x = 1371
  203. integer y = 196
  204. integer width = 631
  205. integer height = 76
  206. boolean bringtotop = true
  207. integer textsize = -9
  208. integer weight = 400
  209. fontcharset fontcharset = gb2312charset!
  210. fontpitch fontpitch = variable!
  211. string facename = "宋体"
  212. long textcolor = 16711680
  213. long backcolor = 134217739
  214. string text = "不显示无交易的供应商"
  215. boolean checked = true
  216. end type
  217. type ddlb_2 from uo_ddlb_scid within w_rp_mustpay_balc_other
  218. integer x = 137
  219. integer y = 200
  220. integer width = 526
  221. integer height = 768
  222. integer taborder = 60
  223. boolean bringtotop = true
  224. end type
  225. event constructor;call super::constructor;THIS.Enabled = (sys_option_scid_msttake_mstpay = 1)
  226. cur_scid_arr = THIS.uo_scid_arr
  227. end event
  228. event selectionchanged;call super::selectionchanged;cur_scid_arr = THIS.uo_scid_arr
  229. cb_1.TriggerEvent(Clicked!)
  230. end event
  231. type st_2 from statictext within w_rp_mustpay_balc_other
  232. integer x = 5
  233. integer y = 204
  234. integer width = 133
  235. integer height = 48
  236. boolean bringtotop = true
  237. integer textsize = -9
  238. integer weight = 400
  239. fontcharset fontcharset = gb2312charset!
  240. fontpitch fontpitch = variable!
  241. string facename = "宋体"
  242. long textcolor = 33554432
  243. long backcolor = 134217739
  244. string text = "分部"
  245. boolean focusrectangle = false
  246. end type
  247. type dw_spttype from u_dw_rbtnfilter within w_rp_mustpay_balc_other
  248. integer y = 416
  249. integer width = 791
  250. integer height = 1656
  251. integer taborder = 30
  252. boolean bringtotop = true
  253. string dataobject = "dw_spttype_index"
  254. end type
  255. event rowfocuschanged;call super::rowfocuschanged;IF currentrow <=0 THEN RETURN
  256. this.selectrow(0,false)
  257. this.selectrow(currentrow,true)
  258. IF dw_spttype.GetRow() <= 0 THEN
  259. ins_spttypeid = 0
  260. ELSE
  261. ins_spttypeid = dw_spttype.Object.spttypeid[dw_spttype.GetRow()]
  262. END IF
  263. cb_1.triggerevent(clicked!)
  264. end event
  265. type ddlb_1 from dropdownlistbox within w_rp_mustpay_balc_other
  266. integer x = 887
  267. integer y = 192
  268. integer width = 462
  269. integer height = 1592
  270. integer taborder = 40
  271. boolean bringtotop = true
  272. integer textsize = -9
  273. integer weight = 400
  274. fontcharset fontcharset = gb2312charset!
  275. fontpitch fontpitch = variable!
  276. string facename = "宋体"
  277. long textcolor = 33554432
  278. boolean sorted = false
  279. borderstyle borderstyle = stylelowered!
  280. end type
  281. event constructor;Long ll_moneyid,i
  282. String ls_name
  283. DECLARE getmx CURSOR FOR
  284. SELECT moneyid,Name FROM cw_currency Order By moneyid ;
  285. OPEN getmx;
  286. DO WHILE sqlca.SQLCode = 0
  287. FETCH getmx INTO :ll_moneyid,:ls_name ;
  288. IF sqlca.SQLCode <> 0 THEN EXIT
  289. THIS.AddItem(ls_name+Fill(' ',50)+'['+String(ll_moneyid)+']')
  290. i++
  291. if i=1 then
  292. this.text=ls_name+Fill(' ',50)+'['+String(ll_moneyid)+']'
  293. ins_moneyid=ll_moneyid
  294. end if
  295. LOOP
  296. CLOSE getmx;
  297. THIS.AddItem('全部'+Fill(' ',50)+'['+String(-1)+']')
  298. end event
  299. event selectionchanged; ins_moneyid=Long(Mid ( THIS.Text,Pos(THIS.Text,'[') + 1,Len(THIS.Text) - Pos(THIS.Text,'[') - 1 ))
  300. cb_1.triggerevent(clicked!)
  301. end event
  302. type st_1 from statictext within w_rp_mustpay_balc_other
  303. integer x = 741
  304. integer y = 204
  305. integer width = 128
  306. integer height = 48
  307. boolean bringtotop = true
  308. integer textsize = -9
  309. integer weight = 400
  310. fontcharset fontcharset = gb2312charset!
  311. fontpitch fontpitch = variable!
  312. string facename = "宋体"
  313. long textcolor = 33554432
  314. long backcolor = 134217739
  315. string text = "币种"
  316. boolean focusrectangle = false
  317. end type
  318. type ddlb_3 from dropdownlistbox within w_rp_mustpay_balc_other
  319. integer x = 1888
  320. integer y = 72
  321. integer width = 699
  322. integer height = 368
  323. integer taborder = 90
  324. boolean bringtotop = true
  325. integer textsize = -8
  326. integer weight = 400
  327. fontcharset fontcharset = ansi!
  328. fontpitch fontpitch = variable!
  329. fontfamily fontfamily = swiss!
  330. string facename = "Arial"
  331. long textcolor = 33554432
  332. boolean sorted = false
  333. boolean vscrollbar = true
  334. string item[] = {"明细表","汇总表[按供应商项目]","汇总表[按项目]"}
  335. borderstyle borderstyle = stylelowered!
  336. end type
  337. event selectionchanged;dw_1.uf_save_profile_layout()
  338. IF ddlb_3.Text = '明细表' THEN
  339. dw_1.DataObject = 'dw_rp_mustpay_balc_other'
  340. ELSEIF ddlb_3.Text = '汇总表[按供应商项目]' THEN
  341. dw_1.DataObject = 'dw_rp_mustpay_balc_other_hz'
  342. ELSEIF ddlb_3.Text = '汇总表[按项目]' THEN
  343. dw_1.DataObject = 'dw_rp_mustpay_balc_other_hz_1'
  344. END IF
  345. wf_replacedw()
  346. cb_1.TriggerEvent(Clicked!)
  347. end event
  348. type cbx_show from checkbox within w_rp_mustpay_balc_other
  349. integer x = 1371
  350. integer y = 196
  351. integer width = 631
  352. integer height = 76
  353. boolean bringtotop = true
  354. integer textsize = -9
  355. integer weight = 400
  356. fontcharset fontcharset = gb2312charset!
  357. fontpitch fontpitch = variable!
  358. string facename = "宋体"
  359. long textcolor = 16711680
  360. long backcolor = 134217739
  361. string text = "不显示无交易的供应商"
  362. boolean checked = true
  363. end type
  364. event clicked;cb_1.triggerevent(clicked!)
  365. end event