w_rp_ware_day.srw 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  1. $PBExportHeader$w_rp_ware_day.srw
  2. forward
  3. global type w_rp_ware_day from w_publ_easyq
  4. end type
  5. type ddlb_2 from uo_ddlb_storageid within w_rp_ware_day
  6. end type
  7. type ddlb_storageid from uo_ddlb_storageid within w_rp_ware_day
  8. end type
  9. type tv_1 from uo_tv_mtrltype within w_rp_ware_day
  10. end type
  11. type ddlb_1 from dropdownlistbox within w_rp_ware_day
  12. end type
  13. end forward
  14. global type w_rp_ware_day 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_ware_day w_rp_ware_day
  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_ware_day.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_ware_day.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_ware_day
  70. end type
  71. type cb_exit from w_publ_easyq`cb_exit within w_rp_ware_day
  72. end type
  73. type cb_2 from w_publ_easyq`cb_2 within w_rp_ware_day
  74. integer taborder = 100
  75. boolean bringtotop = true
  76. end type
  77. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_ware_day
  78. boolean bringtotop = true
  79. end type
  80. type cb_1 from w_publ_easyq`cb_1 within w_rp_ware_day
  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 where cusid = :cur_storageid ;
  92. IF sqlca.SQLCode <> 0 THEN
  93. ROLLBACK ;
  94. MessageBox(publ_operator,"因网络或其它原因导致操作失败,请重试!"+sqlca.SQLErrText)
  95. RETURN
  96. END IF
  97. INSERT INTO u_parm_batchtake
  98. (cusid,firstdate,enddate,balcdateint)
  99. Values (:cur_storageid,:firstdate,:enddate,0) ;
  100. IF sqlca.SQLCode <> 0 THEN
  101. ROLLBACK ;
  102. MessageBox(publ_operator,"因网络或其它原因导致操作失败,请重试!"+sqlca.SQLErrText)
  103. RETURN
  104. ELSE
  105. COMMIT ;
  106. END IF
  107. SetPointer(HourGlass!)
  108. dw_1.Retrieve(cur_storageid,ls_handtype)
  109. IF ddlb_1.Text = '汇总表' THEN
  110. dw_1.Object.Title.Text = f_rst_storagename(cur_storageid)+'历史库存表(汇总表)'
  111. ELSE
  112. dw_1.Object.Title.Text = f_rst_storagename(cur_storageid)+'历史库存表'
  113. END IF
  114. SetPointer(Arrow!)
  115. //IF retrieve_all THEN
  116. // THIS.TriggerEvent("ue_usual_query_filt")
  117. //END IF
  118. end event
  119. type st_3 from w_publ_easyq`st_3 within w_rp_ware_day
  120. integer x = 754
  121. integer y = 216
  122. end type
  123. type st_4 from w_publ_easyq`st_4 within w_rp_ware_day
  124. integer x = 1504
  125. integer y = 212
  126. end type
  127. type em_1 from w_publ_easyq`em_1 within w_rp_ware_day
  128. integer x = 960
  129. integer y = 200
  130. integer taborder = 110
  131. end type
  132. type em_2 from w_publ_easyq`em_2 within w_rp_ware_day
  133. integer x = 1609
  134. integer y = 196
  135. integer taborder = 120
  136. end type
  137. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_ware_day
  138. integer x = 1595
  139. integer y = 8
  140. end type
  141. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_ware_day
  142. integer x = 1385
  143. integer y = 8
  144. end type
  145. type dw_1 from w_publ_easyq`dw_1 within w_rp_ware_day
  146. integer x = 805
  147. integer y = 308
  148. integer width = 2181
  149. integer height = 940
  150. string dataobject = "dw_rp_ware_day"
  151. end type
  152. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_ware_day
  153. end type
  154. type sle_cust from w_publ_easyq`sle_cust within w_rp_ware_day
  155. end type
  156. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_ware_day
  157. end type
  158. type st_cust from w_publ_easyq`st_cust within w_rp_ware_day
  159. end type
  160. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_ware_day
  161. boolean visible = true
  162. integer x = 1385
  163. integer y = 100
  164. end type
  165. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_ware_day
  166. integer x = 1376
  167. end type
  168. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_ware_day
  169. integer x = 2034
  170. end type
  171. type pb_2 from w_publ_easyq`pb_2 within w_rp_ware_day
  172. integer x = 2144
  173. end type
  174. type cb_help from w_publ_easyq`cb_help within w_rp_ware_day
  175. end type
  176. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_ware_day
  177. end type
  178. type gb_1 from w_publ_easyq`gb_1 within w_rp_ware_day
  179. end type
  180. type ln_bar from w_publ_easyq`ln_bar within w_rp_ware_day
  181. end type
  182. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_ware_day
  183. end type
  184. type r_bar from w_publ_easyq`r_bar within w_rp_ware_day
  185. end type
  186. type ln_1 from w_publ_easyq`ln_1 within w_rp_ware_day
  187. end type
  188. type ln_2 from w_publ_easyq`ln_2 within w_rp_ware_day
  189. end type
  190. type ln_3 from w_publ_easyq`ln_3 within w_rp_ware_day
  191. end type
  192. type ln_4 from w_publ_easyq`ln_4 within w_rp_ware_day
  193. end type
  194. type ddlb_2 from uo_ddlb_storageid within w_rp_ware_day
  195. boolean visible = false
  196. integer x = 14
  197. integer y = 208
  198. integer width = 681
  199. integer height = 1108
  200. integer taborder = 40
  201. boolean bringtotop = true
  202. end type
  203. event constructor;call super::constructor;cur_storageid_arr = this.uo_storageid_arr
  204. end event
  205. event selectionchanged;call super::selectionchanged;cur_storageid_arr = this.uo_storageid_arr
  206. cb_1.triggerevent(clicked!)
  207. end event
  208. type ddlb_storageid from uo_ddlb_storageid within w_rp_ware_day
  209. integer x = 5
  210. integer y = 200
  211. integer width = 681
  212. integer height = 1108
  213. integer taborder = 30
  214. boolean bringtotop = true
  215. end type
  216. event constructor;call super::constructor;cur_storageid = THIS.uo_storageid
  217. end event
  218. event selectionchanged;call super::selectionchanged;cur_storageid_arr = THIS.uo_storageid_arr
  219. cur_storageid = THIS.uo_storageid
  220. cb_1.TriggerEvent(Clicked!)
  221. end event
  222. type tv_1 from uo_tv_mtrltype within w_rp_ware_day
  223. integer y = 304
  224. integer width = 805
  225. integer height = 1312
  226. integer taborder = 60
  227. boolean bringtotop = true
  228. integer textsize = -9
  229. fontcharset fontcharset = gb2312charset!
  230. fontfamily fontfamily = anyfont!
  231. string facename = "宋体"
  232. end type
  233. event selectionchanged;call super::selectionchanged;ls_handtype = THIS.uo_cur_info.handtype
  234. ls_handtype = ls_handtype + '%'
  235. cb_1.TriggerEvent(Clicked!)
  236. end event
  237. type ddlb_1 from dropdownlistbox within w_rp_ware_day
  238. integer x = 1943
  239. integer y = 48
  240. integer width = 398
  241. integer height = 356
  242. integer taborder = 100
  243. boolean bringtotop = true
  244. integer textsize = -9
  245. integer weight = 400
  246. fontcharset fontcharset = gb2312charset!
  247. fontpitch fontpitch = variable!
  248. string facename = "宋体"
  249. long textcolor = 33554432
  250. string text = "明细表"
  251. boolean sorted = false
  252. string item[] = {"明细表","汇总表"}
  253. borderstyle borderstyle = stylelowered!
  254. end type
  255. event selectionchanged;dw_1.uf_save_profile_layout()
  256. IF THIS.Text = '明细表' THEN
  257. dw_1.DataObject = 'dw_rp_ware_day'
  258. ELSEIF THIS.Text = '汇总表' THEN
  259. dw_1.DataObject = 'dw_rp_ware_day_hz'
  260. //ELSEIF THIS.Text = '明细表[带计划价]' THEN
  261. // dw_1.DataObject = 'dw_ware_day_1'
  262. END IF
  263. wf_replacedw()
  264. cb_1.TriggerEvent(Clicked!)
  265. //dw_1.SetTransObject(sqlca)
  266. //
  267. //dw_1.ins_INIfile_name = sys_inifilename
  268. //dw_1.ins_opemp = publ_operator
  269. //dw_1.cardw_empid = sys_empid
  270. //dw_1.cur_DataObject = dw_1.DataObject
  271. //
  272. //dw_1.uf_read_profile_layout()
  273. //f_title_change(dw_1)
  274. //wf_hide_col()
  275. //cb_refresh.TriggerEvent(Clicked!)
  276. end event