w_rp_sale_waste.srw 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. $PBExportHeader$w_rp_sale_waste.srw
  2. forward
  3. global type w_rp_sale_waste from w_publ_easyq
  4. end type
  5. type ddlb_flag from dropdownlistbox within w_rp_sale_waste
  6. end type
  7. type ddlb_1 from uo_ddlb_storageid within w_rp_sale_waste
  8. end type
  9. type cb_undo from uo_imflatbutton within w_rp_sale_waste
  10. end type
  11. end forward
  12. global type w_rp_sale_waste from w_publ_easyq
  13. string title = "废弃销售单明细表"
  14. ddlb_flag ddlb_flag
  15. ddlb_1 ddlb_1
  16. cb_undo cb_undo
  17. end type
  18. global w_rp_sale_waste w_rp_sale_waste
  19. type variables
  20. Long cur_storageid_arr[]
  21. Long cur_flag = -1 //-1:全部,0仓库未审,1仓库已审核
  22. Long cur_secflag = -1 //-1:全部,0财务未审
  23. end variables
  24. on w_rp_sale_waste.create
  25. int iCurrent
  26. call super::create
  27. this.ddlb_flag=create ddlb_flag
  28. this.ddlb_1=create ddlb_1
  29. this.cb_undo=create cb_undo
  30. iCurrent=UpperBound(this.Control)
  31. this.Control[iCurrent+1]=this.ddlb_flag
  32. this.Control[iCurrent+2]=this.ddlb_1
  33. this.Control[iCurrent+3]=this.cb_undo
  34. end on
  35. on w_rp_sale_waste.destroy
  36. call super::destroy
  37. destroy(this.ddlb_flag)
  38. destroy(this.ddlb_1)
  39. destroy(this.cb_undo)
  40. end on
  41. event key;call super::key;IF Not sys_power_issuper THEN RETURN
  42. IF KeyDown(KeyF12!) And KeyDown ( KeyControl!) And KeyDown(KeyAlt!) THEN
  43. cb_undo.Enabled = True
  44. cb_undo.Visible = True
  45. END IF
  46. end event
  47. event ue_before_openretrieve;call super::ue_before_openretrieve;s_hide_col s_col
  48. s_col.col_1 = 'u_outwaremx_costamt'
  49. s_col.col_2 = 'gfamt'
  50. f_hide_col(490,dw_1,s_col)
  51. s_hide_col s_col_mtrlsectype
  52. s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype'
  53. f_hide_col(1308,dw_1,s_col_mtrlsectype)
  54. s_hide_col s_col_zxmtrlmode
  55. s_col_zxmtrlmode.col_1 = 'u_mtrldef_zxmtrlmode'
  56. f_hide_col(1309,dw_1,s_col_zxmtrlmode)
  57. end event
  58. type cb_func from w_publ_easyq`cb_func within w_rp_sale_waste
  59. end type
  60. type cb_exit from w_publ_easyq`cb_exit within w_rp_sale_waste
  61. end type
  62. type cb_2 from w_publ_easyq`cb_2 within w_rp_sale_waste
  63. boolean bringtotop = true
  64. end type
  65. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_sale_waste
  66. boolean bringtotop = true
  67. end type
  68. type cb_1 from w_publ_easyq`cb_1 within w_rp_sale_waste
  69. boolean bringtotop = true
  70. end type
  71. event cb_1::clicked;DateTime first_date,end_date
  72. first_date = DateTime(Date(em_1.Text),Time(0))
  73. end_date = DateTime(Date(em_2.Text),Time('23:59:59'))
  74. IF first_date < sys_showsaledata_mindt THEN first_date = sys_showsaledata_mindt
  75. dw_1.Retrieve(first_date,end_date,cur_flag,cur_secflag,cur_storageid_arr,sys_areaid)
  76. end event
  77. type st_3 from w_publ_easyq`st_3 within w_rp_sale_waste
  78. integer x = 1111
  79. end type
  80. type st_4 from w_publ_easyq`st_4 within w_rp_sale_waste
  81. integer x = 1842
  82. end type
  83. type em_1 from w_publ_easyq`em_1 within w_rp_sale_waste
  84. integer x = 1330
  85. integer taborder = 130
  86. end type
  87. type em_2 from w_publ_easyq`em_2 within w_rp_sale_waste
  88. integer x = 1947
  89. integer taborder = 140
  90. end type
  91. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_sale_waste
  92. integer x = 1682
  93. integer y = 4
  94. end type
  95. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_sale_waste
  96. integer x = 1472
  97. integer y = 8
  98. end type
  99. type dw_1 from w_publ_easyq`dw_1 within w_rp_sale_waste
  100. integer y = 300
  101. integer width = 2743
  102. integer height = 928
  103. string dataobject = "dw_rp_outware_waste"
  104. end type
  105. event dw_1::doubleclicked;call super::doubleclicked;IF row > 0 THEN
  106. String ls_code
  107. Long ll_scid
  108. ll_scid = This.Object.u_outware_waste_scid[row]
  109. ls_code = This.Object.u_outware_waste_outwarecode[row]
  110. f_open_win(ll_scid,ls_code)
  111. END IF
  112. end event
  113. event dw_1::dwnkey;call super::dwnkey;parent.triggerevent('key')
  114. end event
  115. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_sale_waste
  116. end type
  117. type sle_cust from w_publ_easyq`sle_cust within w_rp_sale_waste
  118. end type
  119. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_sale_waste
  120. end type
  121. type st_cust from w_publ_easyq`st_cust within w_rp_sale_waste
  122. end type
  123. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_sale_waste
  124. boolean visible = true
  125. integer x = 1472
  126. end type
  127. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_sale_waste
  128. integer x = 1742
  129. end type
  130. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_sale_waste
  131. integer x = 2363
  132. end type
  133. type pb_2 from w_publ_easyq`pb_2 within w_rp_sale_waste
  134. integer x = 2473
  135. end type
  136. type cb_help from w_publ_easyq`cb_help within w_rp_sale_waste
  137. end type
  138. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_sale_waste
  139. end type
  140. type gb_1 from w_publ_easyq`gb_1 within w_rp_sale_waste
  141. end type
  142. type ln_bar from w_publ_easyq`ln_bar within w_rp_sale_waste
  143. end type
  144. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_sale_waste
  145. end type
  146. type r_bar from w_publ_easyq`r_bar within w_rp_sale_waste
  147. end type
  148. type ln_1 from w_publ_easyq`ln_1 within w_rp_sale_waste
  149. end type
  150. type ln_2 from w_publ_easyq`ln_2 within w_rp_sale_waste
  151. end type
  152. type ln_3 from w_publ_easyq`ln_3 within w_rp_sale_waste
  153. end type
  154. type ln_4 from w_publ_easyq`ln_4 within w_rp_sale_waste
  155. end type
  156. type ddlb_flag from dropdownlistbox within w_rp_sale_waste
  157. integer x = 699
  158. integer y = 192
  159. integer width = 379
  160. integer height = 484
  161. integer taborder = 90
  162. boolean bringtotop = true
  163. integer textsize = -9
  164. integer weight = 400
  165. fontcharset fontcharset = gb2312charset!
  166. fontpitch fontpitch = variable!
  167. string facename = "宋体"
  168. long textcolor = 33554432
  169. string text = "[全部]"
  170. boolean sorted = false
  171. boolean vscrollbar = true
  172. string item[] = {"[全部]","待仓库审核","待财务审核","审核完毕"}
  173. borderstyle borderstyle = stylelowered!
  174. end type
  175. event selectionchanged;if index=1 then
  176. cur_flag=-1
  177. cur_secflag= -1
  178. elseif index=2 then
  179. cur_flag= 0
  180. cur_secflag= -1
  181. elseif index=3 then
  182. cur_flag= 1
  183. cur_secflag= 0
  184. elseif index=4 then
  185. cur_flag= 1
  186. cur_secflag= 1
  187. end if
  188. cb_1.triggerevent(clicked!)
  189. end event
  190. type ddlb_1 from uo_ddlb_storageid within w_rp_sale_waste
  191. integer x = 14
  192. integer y = 192
  193. integer width = 681
  194. integer height = 1108
  195. integer taborder = 140
  196. boolean bringtotop = true
  197. end type
  198. event constructor;call super::constructor;cur_storageid_arr = this.uo_storageid_arr
  199. end event
  200. event selectionchanged;call super::selectionchanged;cur_storageid_arr = this.uo_storageid_arr
  201. cb_1.triggerevent(clicked!)
  202. end event
  203. type cb_undo from uo_imflatbutton within w_rp_sale_waste
  204. boolean visible = false
  205. integer x = 1833
  206. integer width = 165
  207. integer height = 172
  208. integer taborder = 20
  209. boolean bringtotop = true
  210. boolean enabled = false
  211. string text = "还原"
  212. end type
  213. event clicked;call super::clicked;long ll_outwareid,ll_num,ll_scid
  214. string errmsg,ls_outwarecode
  215. uo_outware_waste uo_waste
  216. uo_waste =create uo_outware_waste
  217. uo_waste.commit_transaction=sqlca
  218. if dw_1.object.u_outware_waste_wastetype[dw_1.getrow()]=1 then
  219. Messagebox('提示','废弃原因不是删除,不能还原!',information!,OK!)
  220. return
  221. end if
  222. ll_outwareid=dw_1.object.u_outware_waste_outwareid[dw_1.getrow()]
  223. ll_num=dw_1.object.u_outware_waste_wastenum[dw_1.getrow()]
  224. ll_scid=dw_1.object.u_outware_waste_scid[dw_1.getrow()]
  225. ls_outwarecode=dw_1.object.u_outware_waste_outwarecode[dw_1.getrow()]
  226. if messagebox ("询问","是否确定还原当前单据?[单号:"+ls_outwarecode+",流水号:"+string(ll_num)+"]",question!,yesno! ,2) = 2 then return
  227. if uo_waste.wastemoveback(ll_num,ll_scid,ll_outwareid,errmsg,true)=1 then
  228. Messagebox('提示','还原成功!',information!,OK!)
  229. else
  230. Messagebox('错误',errmsg,stopsign!,OK!)
  231. end if
  232. cb_1.triggerevent(clicked!)
  233. DESTROY uo_waste
  234. end event