w_rp_mtrlware_warebalc.srw 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. $PBExportHeader$w_rp_mtrlware_warebalc.srw
  2. forward
  3. global type w_rp_mtrlware_warebalc from w_publ_easyq
  4. end type
  5. type ddlb_2 from uo_ddlb_storageid within w_rp_mtrlware_warebalc
  6. end type
  7. type ddlb_storageid from uo_ddlb_storageid within w_rp_mtrlware_warebalc
  8. end type
  9. type tv_1 from uo_tv_mtrltype within w_rp_mtrlware_warebalc
  10. end type
  11. type ddlb_1 from dropdownlistbox within w_rp_mtrlware_warebalc
  12. end type
  13. end forward
  14. global type w_rp_mtrlware_warebalc from w_publ_easyq
  15. string title = "仓库历史库存表"
  16. ddlb_2 ddlb_2
  17. ddlb_storageid ddlb_storageid
  18. tv_1 tv_1
  19. ddlb_1 ddlb_1
  20. end type
  21. global w_rp_mtrlware_warebalc w_rp_mtrlware_warebalc
  22. type variables
  23. Long cur_storageid_arr[]
  24. Long cur_storageid = -1
  25. String ls_handtype = ''
  26. end variables
  27. forward prototypes
  28. public subroutine wf_hidecol ()
  29. end prototypes
  30. public subroutine wf_hidecol ();s_hide_col s_col
  31. IF ddlb_1.Text = '明细表' Or ddlb_1.Text = '汇总表' THEN
  32. s_col.col_1 = 'v_ware_day_bgamt'
  33. s_col.col_2 = 'v_ware_day_incamt'
  34. s_col.col_3 = 'v_ware_day_desamt'
  35. s_col.col_4 = 'v_ware_day_balcamt'
  36. s_col.col_5 = 'v_ware_day_balccost'
  37. f_hide_col(123,dw_1,s_col)
  38. END IF
  39. end subroutine
  40. on w_rp_mtrlware_warebalc.create
  41. int iCurrent
  42. call super::create
  43. this.ddlb_2=create ddlb_2
  44. this.ddlb_storageid=create ddlb_storageid
  45. this.tv_1=create tv_1
  46. this.ddlb_1=create ddlb_1
  47. iCurrent=UpperBound(this.Control)
  48. this.Control[iCurrent+1]=this.ddlb_2
  49. this.Control[iCurrent+2]=this.ddlb_storageid
  50. this.Control[iCurrent+3]=this.tv_1
  51. this.Control[iCurrent+4]=this.ddlb_1
  52. end on
  53. on w_rp_mtrlware_warebalc.destroy
  54. call super::destroy
  55. destroy(this.ddlb_2)
  56. destroy(this.ddlb_storageid)
  57. destroy(this.tv_1)
  58. destroy(this.ddlb_1)
  59. end on
  60. event ue_before_openretrieve;call super::ue_before_openretrieve;s_hide_col s_col_mtrlsectype
  61. s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype'
  62. f_hide_col(1308,dw_1,s_col_mtrlsectype)
  63. s_hide_col s_col_zxmtrlmode
  64. s_col_zxmtrlmode.col_1 = 'u_mtrldef_zxmtrlmode'
  65. f_hide_col(1309,dw_1,s_col_zxmtrlmode)
  66. end event
  67. event resize;call super::resize;tv_1.Height = dw_1.Height
  68. end event
  69. type cb_func from w_publ_easyq`cb_func within w_rp_mtrlware_warebalc
  70. end type
  71. type cb_exit from w_publ_easyq`cb_exit within w_rp_mtrlware_warebalc
  72. end type
  73. type cb_2 from w_publ_easyq`cb_2 within w_rp_mtrlware_warebalc
  74. integer taborder = 100
  75. boolean bringtotop = true
  76. end type
  77. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_mtrlware_warebalc
  78. boolean bringtotop = true
  79. end type
  80. type cb_1 from w_publ_easyq`cb_1 within w_rp_mtrlware_warebalc
  81. boolean bringtotop = true
  82. end type
  83. event cb_1::clicked;DateTime firstdate,enddate
  84. firstdate = DateTime(Date(em_1.Text),Time(0))
  85. enddate = DateTime(Date(em_2.Text),Time('23:59:59'))
  86. //IF cur_storageid <= 0 THEN
  87. // MessageBox('提示','请选择仓库')
  88. // dw_1.Reset()
  89. // RETURN
  90. //END IF
  91. DELETE u_parm_batchtake
  92. Where cusid = :cur_storageid Or :cur_storageid = -1 ;
  93. IF sqlca.SQLCode <> 0 THEN
  94. ROLLBACK ;
  95. MessageBox(publ_operator,"更新查询时间失败!"+sqlca.SQLErrText)
  96. RETURN
  97. END IF
  98. INSERT INTO u_parm_batchtake
  99. (cusid,firstdate,enddate,balcdateint)
  100. SELECT storageid,:firstdate,:enddate,0
  101. FROM u_storage
  102. Where storageid = :cur_storageid Or :cur_storageid = -1;
  103. IF sqlca.SQLCode <> 0 THEN
  104. ROLLBACK ;
  105. MessageBox(publ_operator,"更新查询时间失败!"+sqlca.SQLErrText)
  106. RETURN
  107. END IF
  108. COMMIT ;
  109. SetPointer(HourGlass!)
  110. dw_1.Retrieve(cur_storageid_arr,ls_handtype)
  111. IF ddlb_1.Text = '汇总表' THEN
  112. dw_1.Object.Title.Text = f_rst_storagename(cur_storageid)+'历史库存表(汇总表)'
  113. ELSE
  114. dw_1.Object.Title.Text = f_rst_storagename(cur_storageid)+'历史库存表'
  115. END IF
  116. SetPointer(Arrow!)
  117. //IF retrieve_all THEN
  118. // THIS.TriggerEvent("ue_usual_query_filt")
  119. //END IF
  120. end event
  121. type st_3 from w_publ_easyq`st_3 within w_rp_mtrlware_warebalc
  122. integer x = 754
  123. integer y = 216
  124. end type
  125. type st_4 from w_publ_easyq`st_4 within w_rp_mtrlware_warebalc
  126. integer x = 1504
  127. integer y = 212
  128. end type
  129. type em_1 from w_publ_easyq`em_1 within w_rp_mtrlware_warebalc
  130. integer x = 960
  131. integer y = 200
  132. integer taborder = 110
  133. end type
  134. type em_2 from w_publ_easyq`em_2 within w_rp_mtrlware_warebalc
  135. integer x = 1609
  136. integer y = 196
  137. integer taborder = 120
  138. end type
  139. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_mtrlware_warebalc
  140. integer x = 1595
  141. integer y = 8
  142. end type
  143. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_mtrlware_warebalc
  144. integer x = 1385
  145. integer y = 8
  146. end type
  147. type dw_1 from w_publ_easyq`dw_1 within w_rp_mtrlware_warebalc
  148. integer x = 805
  149. integer y = 308
  150. integer width = 2181
  151. integer height = 940
  152. string dataobject = "dw_rp_mtrlware_warebalc"
  153. end type
  154. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_mtrlware_warebalc
  155. end type
  156. type sle_cust from w_publ_easyq`sle_cust within w_rp_mtrlware_warebalc
  157. end type
  158. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_mtrlware_warebalc
  159. end type
  160. type st_cust from w_publ_easyq`st_cust within w_rp_mtrlware_warebalc
  161. end type
  162. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_mtrlware_warebalc
  163. boolean visible = true
  164. integer x = 1385
  165. integer y = 100
  166. end type
  167. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_mtrlware_warebalc
  168. integer x = 1376
  169. end type
  170. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_mtrlware_warebalc
  171. integer x = 2034
  172. end type
  173. type pb_2 from w_publ_easyq`pb_2 within w_rp_mtrlware_warebalc
  174. integer x = 2144
  175. end type
  176. type cb_help from w_publ_easyq`cb_help within w_rp_mtrlware_warebalc
  177. end type
  178. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_mtrlware_warebalc
  179. end type
  180. type gb_1 from w_publ_easyq`gb_1 within w_rp_mtrlware_warebalc
  181. end type
  182. type ln_bar from w_publ_easyq`ln_bar within w_rp_mtrlware_warebalc
  183. end type
  184. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_mtrlware_warebalc
  185. end type
  186. type r_bar from w_publ_easyq`r_bar within w_rp_mtrlware_warebalc
  187. end type
  188. type ln_1 from w_publ_easyq`ln_1 within w_rp_mtrlware_warebalc
  189. end type
  190. type ln_2 from w_publ_easyq`ln_2 within w_rp_mtrlware_warebalc
  191. end type
  192. type ln_3 from w_publ_easyq`ln_3 within w_rp_mtrlware_warebalc
  193. end type
  194. type ln_4 from w_publ_easyq`ln_4 within w_rp_mtrlware_warebalc
  195. end type
  196. type ddlb_2 from uo_ddlb_storageid within w_rp_mtrlware_warebalc
  197. boolean visible = false
  198. integer x = 14
  199. integer y = 208
  200. integer width = 681
  201. integer height = 1108
  202. integer taborder = 40
  203. boolean bringtotop = true
  204. end type
  205. event constructor;call super::constructor;cur_storageid_arr = this.uo_storageid_arr
  206. end event
  207. event selectionchanged;call super::selectionchanged;cur_storageid_arr = this.uo_storageid_arr
  208. cb_1.triggerevent(clicked!)
  209. end event
  210. type ddlb_storageid from uo_ddlb_storageid within w_rp_mtrlware_warebalc
  211. integer x = 5
  212. integer y = 200
  213. integer width = 681
  214. integer height = 1108
  215. integer taborder = 30
  216. boolean bringtotop = true
  217. end type
  218. event constructor;call super::constructor;cur_storageid_arr = THIS.uo_storageid_arr
  219. cur_storageid = THIS.uo_storageid
  220. end event
  221. event selectionchanged;call super::selectionchanged;cur_storageid_arr = THIS.uo_storageid_arr
  222. cur_storageid = THIS.uo_storageid
  223. cb_1.TriggerEvent(Clicked!)
  224. end event
  225. type tv_1 from uo_tv_mtrltype within w_rp_mtrlware_warebalc
  226. integer y = 304
  227. integer width = 805
  228. integer height = 1312
  229. integer taborder = 60
  230. boolean bringtotop = true
  231. integer textsize = -9
  232. fontcharset fontcharset = gb2312charset!
  233. fontfamily fontfamily = anyfont!
  234. string facename = "宋体"
  235. end type
  236. event selectionchanged;call super::selectionchanged;ls_handtype = THIS.uo_cur_info.handtype
  237. ls_handtype = ls_handtype + '%'
  238. cb_1.TriggerEvent(Clicked!)
  239. end event
  240. type ddlb_1 from dropdownlistbox within w_rp_mtrlware_warebalc
  241. integer x = 1943
  242. integer y = 48
  243. integer width = 398
  244. integer height = 356
  245. integer taborder = 100
  246. boolean bringtotop = true
  247. integer textsize = -9
  248. integer weight = 400
  249. fontcharset fontcharset = gb2312charset!
  250. fontpitch fontpitch = variable!
  251. string facename = "宋体"
  252. long textcolor = 33554432
  253. string text = "明细表"
  254. boolean sorted = false
  255. string item[] = {"明细表","汇总表"}
  256. borderstyle borderstyle = stylelowered!
  257. end type
  258. event selectionchanged;dw_1.uf_save_profile_layout()
  259. IF THIS.Text = '明细表' THEN
  260. dw_1.DataObject = 'dw_rp_mtrlware_warebalc'
  261. ELSEIF THIS.Text = '汇总表' THEN
  262. dw_1.DataObject = 'dw_rp_mtrlware_warebalc_hz'
  263. //ELSEIF THIS.Text = '明细表[带计划价]' THEN
  264. // dw_1.DataObject = 'dw_ware_day_1'
  265. END IF
  266. wf_replacedw()
  267. cb_1.TriggerEvent(Clicked!)
  268. //dw_1.SetTransObject(sqlca)
  269. //
  270. //dw_1.ins_INIfile_name = sys_inifilename
  271. //dw_1.ins_opemp = publ_operator
  272. //dw_1.cardw_empid = sys_empid
  273. //dw_1.cur_DataObject = dw_1.DataObject
  274. //
  275. //dw_1.uf_read_profile_layout()
  276. //f_title_change(dw_1)
  277. //wf_hide_col()
  278. //cb_refresh.TriggerEvent(Clicked!)
  279. end event