w_rp_saletask_waste.srw 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. $PBExportHeader$w_rp_saletask_waste.srw
  2. forward
  3. global type w_rp_saletask_waste from w_publ_easyq
  4. end type
  5. type cb_undo from uo_imflatbutton within w_rp_saletask_waste
  6. end type
  7. end forward
  8. global type w_rp_saletask_waste from w_publ_easyq
  9. integer x = 270
  10. integer y = 136
  11. string title = "销售订单废弃单统计表"
  12. cb_undo cb_undo
  13. end type
  14. global w_rp_saletask_waste w_rp_saletask_waste
  15. type variables
  16. Long cur_storageid_arr[]
  17. Long cur_flag = -1 //-1:全部,0仓库未审,1仓库已审核
  18. Long cur_secflag = -1 //-1:全部,0财务未审
  19. end variables
  20. on w_rp_saletask_waste.create
  21. int iCurrent
  22. call super::create
  23. this.cb_undo=create cb_undo
  24. iCurrent=UpperBound(this.Control)
  25. this.Control[iCurrent+1]=this.cb_undo
  26. end on
  27. on w_rp_saletask_waste.destroy
  28. call super::destroy
  29. destroy(this.cb_undo)
  30. end on
  31. event key;call super::key;IF Not sys_power_issuper THEN RETURN
  32. IF KeyDown(KeyF12!) And KeyDown ( KeyControl!) And KeyDown(KeyAlt!) THEN
  33. cb_undo.Enabled = True
  34. cb_undo.Visible = True
  35. END IF
  36. end event
  37. event ue_before_openretrieve;call super::ue_before_openretrieve;s_hide_col s_col
  38. s_col.col_1 = 'u_outwaremx_costamt'
  39. s_col.col_2 = 'gfamt'
  40. f_hide_col(490,dw_1,s_col)
  41. s_hide_col s_col_mtrlsectype
  42. s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype'
  43. f_hide_col(1308,dw_1,s_col_mtrlsectype)
  44. s_hide_col s_col_zxmtrlmode
  45. s_col_zxmtrlmode.col_1 = 'u_mtrldef_zxmtrlmode'
  46. f_hide_col(1309,dw_1,s_col_zxmtrlmode)
  47. end event
  48. type cb_func from w_publ_easyq`cb_func within w_rp_saletask_waste
  49. end type
  50. type cb_exit from w_publ_easyq`cb_exit within w_rp_saletask_waste
  51. end type
  52. type cb_2 from w_publ_easyq`cb_2 within w_rp_saletask_waste
  53. boolean bringtotop = true
  54. end type
  55. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_saletask_waste
  56. boolean bringtotop = true
  57. end type
  58. type cb_1 from w_publ_easyq`cb_1 within w_rp_saletask_waste
  59. boolean bringtotop = true
  60. end type
  61. event cb_1::clicked;DateTime first_date,end_date
  62. first_date = DateTime(Date(em_1.Text),Time(0))
  63. end_date = DateTime(Date(em_2.Text),Time('23:59:59'))
  64. IF first_date < sys_showsaledata_mindt THEN first_date = sys_showsaledata_mindt
  65. dw_1.Retrieve(first_date,end_date)
  66. end event
  67. type st_3 from w_publ_easyq`st_3 within w_rp_saletask_waste
  68. integer x = 11
  69. integer y = 205
  70. end type
  71. type st_4 from w_publ_easyq`st_4 within w_rp_saletask_waste
  72. integer x = 742
  73. integer y = 205
  74. end type
  75. type em_1 from w_publ_easyq`em_1 within w_rp_saletask_waste
  76. integer x = 230
  77. integer y = 189
  78. integer taborder = 130
  79. end type
  80. type em_2 from w_publ_easyq`em_2 within w_rp_saletask_waste
  81. integer x = 845
  82. integer y = 189
  83. integer taborder = 140
  84. end type
  85. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_saletask_waste
  86. integer x = 1682
  87. integer y = 3
  88. end type
  89. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_saletask_waste
  90. integer x = 1474
  91. integer y = 10
  92. end type
  93. type dw_1 from w_publ_easyq`dw_1 within w_rp_saletask_waste
  94. integer y = 301
  95. integer width = 2743
  96. integer height = 928
  97. string dataobject = "dw_rp_saletask_waste"
  98. end type
  99. event dw_1::doubleclicked;call super::doubleclicked;IF row > 0 THEN
  100. String ls_code
  101. Long ll_scid
  102. ll_scid = This.Object.scid[row]
  103. ls_code = This.Object.taskcode[row]
  104. f_open_win(ll_scid,ls_code)
  105. END IF
  106. end event
  107. event dw_1::dwnkey;call super::dwnkey;parent.triggerevent('key')
  108. end event
  109. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_saletask_waste
  110. end type
  111. type sle_cust from w_publ_easyq`sle_cust within w_rp_saletask_waste
  112. end type
  113. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_saletask_waste
  114. end type
  115. type st_cust from w_publ_easyq`st_cust within w_rp_saletask_waste
  116. end type
  117. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_saletask_waste
  118. boolean visible = true
  119. integer x = 1474
  120. end type
  121. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_saletask_waste
  122. integer x = 640
  123. integer y = 189
  124. end type
  125. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_saletask_waste
  126. integer x = 1262
  127. integer y = 189
  128. end type
  129. type pb_2 from w_publ_easyq`pb_2 within w_rp_saletask_waste
  130. integer x = 1371
  131. integer y = 189
  132. end type
  133. type cb_help from w_publ_easyq`cb_help within w_rp_saletask_waste
  134. end type
  135. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_saletask_waste
  136. end type
  137. type gb_1 from w_publ_easyq`gb_1 within w_rp_saletask_waste
  138. end type
  139. type ln_bar from w_publ_easyq`ln_bar within w_rp_saletask_waste
  140. end type
  141. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_saletask_waste
  142. end type
  143. type r_bar from w_publ_easyq`r_bar within w_rp_saletask_waste
  144. end type
  145. type ln_1 from w_publ_easyq`ln_1 within w_rp_saletask_waste
  146. end type
  147. type ln_2 from w_publ_easyq`ln_2 within w_rp_saletask_waste
  148. end type
  149. type ln_3 from w_publ_easyq`ln_3 within w_rp_saletask_waste
  150. end type
  151. type ln_4 from w_publ_easyq`ln_4 within w_rp_saletask_waste
  152. end type
  153. type cb_undo from uo_imflatbutton within w_rp_saletask_waste
  154. boolean visible = false
  155. integer x = 1832
  156. integer width = 165
  157. integer height = 173
  158. integer taborder = 20
  159. boolean bringtotop = true
  160. boolean enabled = false
  161. string text = "还原"
  162. end type
  163. event clicked;call super::clicked;long ll_outwareid,ll_num,ll_scid
  164. string errmsg,ls_outwarecode
  165. uo_outware_waste uo_waste
  166. uo_waste =create uo_outware_waste
  167. uo_waste.commit_transaction=sqlca
  168. if dw_1.object.u_outware_waste_wastetype[dw_1.getrow()]=1 then
  169. Messagebox('提示','废弃原因不是删除,不能还原!',information!,OK!)
  170. return
  171. end if
  172. ll_outwareid=dw_1.object.u_outware_waste_outwareid[dw_1.getrow()]
  173. ll_num=dw_1.object.u_outware_waste_wastenum[dw_1.getrow()]
  174. ll_scid=dw_1.object.u_outware_waste_scid[dw_1.getrow()]
  175. ls_outwarecode=dw_1.object.u_outware_waste_outwarecode[dw_1.getrow()]
  176. if messagebox ("询问","是否确定还原当前单据?[单号:"+ls_outwarecode+",流水号:"+string(ll_num)+"]",question!,yesno! ,2) = 2 then return
  177. if uo_waste.wastemoveback(ll_num,ll_scid,ll_outwareid,errmsg,true)=1 then
  178. Messagebox('提示','还原成功!',information!,OK!)
  179. else
  180. Messagebox('错误',errmsg,stopsign!,OK!)
  181. end if
  182. cb_1.triggerevent(clicked!)
  183. DESTROY uo_waste
  184. end event