w_rp_mustpay_balc.srw 10 KB

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