w_ljfieb_sale_send_his.srw 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. $PBExportHeader$w_ljfieb_sale_send_his.srw
  2. forward
  3. global type w_ljfieb_sale_send_his from w_publ_easyq
  4. end type
  5. type cbx_1 from checkbox within w_ljfieb_sale_send_his
  6. end type
  7. end forward
  8. global type w_ljfieb_sale_send_his from w_publ_easyq
  9. string title = "销售电子商务记录"
  10. cbx_1 cbx_1
  11. end type
  12. global w_ljfieb_sale_send_his w_ljfieb_sale_send_his
  13. on w_ljfieb_sale_send_his.create
  14. int iCurrent
  15. call super::create
  16. this.cbx_1=create cbx_1
  17. iCurrent=UpperBound(this.Control)
  18. this.Control[iCurrent+1]=this.cbx_1
  19. end on
  20. on w_ljfieb_sale_send_his.destroy
  21. call super::destroy
  22. destroy(this.cbx_1)
  23. end on
  24. event open;this.triggerevent('ue_before_open')
  25. wf_movetocenter()
  26. dw_1.SetTransObject (sys_email_sqlca)
  27. EM_1.Text = String(Today(),'YYYY-MM-DD')
  28. EM_2.Text = EM_1.Text
  29. dw_1.RBUTTON_FILTER_USE = TRUE //右键查询功能开关
  30. cb_1.triggerevent(clicked!)
  31. end event
  32. type cb_func from w_publ_easyq`cb_func within w_ljfieb_sale_send_his
  33. boolean visible = false
  34. end type
  35. type cb_exit from w_publ_easyq`cb_exit within w_ljfieb_sale_send_his
  36. integer x = 151
  37. end type
  38. type cb_2 from w_publ_easyq`cb_2 within w_ljfieb_sale_send_his
  39. boolean visible = false
  40. end type
  41. type cb_psetup from w_publ_easyq`cb_psetup within w_ljfieb_sale_send_his
  42. boolean visible = false
  43. end type
  44. type cb_1 from w_publ_easyq`cb_1 within w_ljfieb_sale_send_his
  45. end type
  46. event cb_1::clicked;call super::clicked;DateTime first_date,end_date
  47. first_date = DateTime(Date(em_1.Text),Time(0))
  48. end_date = DateTime(Date(em_2.Text),Time('23:59:59'))
  49. Int li_ifall
  50. IF cbx_1.Checked THEN
  51. li_ifall = 0
  52. ELSE
  53. li_ifall = 1
  54. END IF
  55. dw_1.SetRedraw(False)
  56. dw_1.Retrieve(first_date,end_date,li_ifall)
  57. Long ll_i
  58. String ls_cuscode
  59. Long ll_sendcuscommid,ll_cusareaid
  60. String ls_custype,ls_receivesccode,ls_scstr,ls_SendSCcode
  61. String ls_areastr,ls_outrep
  62. Long ll_scid
  63. IF Not sys_power_issuper THEN
  64. dw_1.AcceptText()
  65. FOR ll_i = dw_1.RowCount() To 1 Step -1
  66. ll_sendcuscommid = dw_1.Object.ljfieb_packet_sendcuscommid[ll_i]
  67. ls_receivesccode = dw_1.Object.ljfieb_packet_receivesccode[ll_i]
  68. ls_SendSCcode = dw_1.Object.ljfieb_packet_SendSCcode [ll_i]
  69. IF sys_user_scstr <> '0' THEN
  70. SELECT scid INTO :ll_scid
  71. FROM u_scdef
  72. Where sccode = :ls_receivesccode Using sqlca;
  73. IF sqlca.SQLCode <> 0 THEN
  74. ll_scid = 0
  75. END IF
  76. ls_scstr = ','+String(ll_scid)+','
  77. IF Pos(sys_user_scstr,ls_scstr) = 0 THEN
  78. dw_1.DeleteRow(ll_i)
  79. CONTINUE
  80. END IF
  81. END IF
  82. SELECT CusCode
  83. INTO :ls_cuscode
  84. FROM LJFIEB_CusComm
  85. Where CusCommID = :ll_sendcuscommid Using sys_email_sqlca;
  86. IF sys_email_sqlca.SQLCode <> 0 THEN
  87. ls_cuscode = ''
  88. END IF
  89. IF Trim(ls_cuscode) = '' THEN CONTINUE
  90. SELECT cusareaid,
  91. custype
  92. INTO
  93. :ll_cusareaid,
  94. :ls_custype
  95. FROM u_cust
  96. WHERE commcode = :ls_cuscode
  97. And commsccode = :ls_SendSCcode Using sqlca;
  98. IF sqlca.SQLCode <> 0 THEN CONTINUE
  99. IF sys_areastr <> '0' THEN
  100. ls_areastr = ','+String( ll_cusareaid)+','
  101. IF Pos(sys_areastr,ls_areastr) = 0 THEN
  102. dw_1.DeleteRow(ll_i)
  103. CONTINUE
  104. END IF
  105. END IF
  106. IF sys_user_outrepstr <> '0' THEN
  107. ls_outrep = ','+String( ls_custype)+','
  108. IF Pos(sys_user_outrepstr,ls_outrep) = 0 THEN
  109. dw_1.DeleteRow(ll_i)
  110. CONTINUE
  111. END IF
  112. END IF
  113. NEXT
  114. END IF
  115. dw_1.SetRedraw(True)
  116. end event
  117. type st_3 from w_publ_easyq`st_3 within w_ljfieb_sale_send_his
  118. integer x = 0
  119. integer width = 315
  120. string text = "发送日期从:"
  121. end type
  122. type st_4 from w_publ_easyq`st_4 within w_ljfieb_sale_send_his
  123. integer x = 823
  124. end type
  125. type em_1 from w_publ_easyq`em_1 within w_ljfieb_sale_send_his
  126. integer x = 315
  127. end type
  128. type em_2 from w_publ_easyq`em_2 within w_ljfieb_sale_send_his
  129. integer x = 928
  130. end type
  131. type ddlb_yl from w_publ_easyq`ddlb_yl within w_ljfieb_sale_send_his
  132. boolean visible = false
  133. end type
  134. type cbx_yl from w_publ_easyq`cbx_yl within w_ljfieb_sale_send_his
  135. boolean visible = false
  136. end type
  137. type dw_1 from w_publ_easyq`dw_1 within w_ljfieb_sale_send_his
  138. integer y = 300
  139. string dataobject = "dw_ljfieb_sale_send_his"
  140. end type
  141. event dw_1::doubleclicked;call super::doubleclicked;IF row <= 0 THEN RETURN
  142. if this.object.ljfieb_packet_billtype[row] = 3 then return
  143. String ls_code,ls_sccode
  144. Long ll_scid
  145. ls_sccode = This.Object.ljfieb_packet_receivesccode[row]
  146. SELECT scid
  147. INTO :ll_scid
  148. FROM u_scdef
  149. Where sccode = :ls_sccode;
  150. IF sqlca.SQLCode <> 0 THEN ll_scid = 0
  151. ls_code = This.Object.ljfieb_packet_relatedcode[row]
  152. if trim(ls_code) = '' then return
  153. f_open_win(ll_scid,ls_code)
  154. end event
  155. type sle_mtrl from w_publ_easyq`sle_mtrl within w_ljfieb_sale_send_his
  156. end type
  157. type sle_cust from w_publ_easyq`sle_cust within w_ljfieb_sale_send_his
  158. end type
  159. type st_mtrl from w_publ_easyq`st_mtrl within w_ljfieb_sale_send_his
  160. end type
  161. type st_cust from w_publ_easyq`st_cust within w_ljfieb_sale_send_his
  162. end type
  163. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_ljfieb_sale_send_his
  164. end type
  165. type pb_em1 from w_publ_easyq`pb_em1 within w_ljfieb_sale_send_his
  166. integer x = 731
  167. end type
  168. type pb_em2 from w_publ_easyq`pb_em2 within w_ljfieb_sale_send_his
  169. integer x = 1344
  170. end type
  171. type pb_2 from w_publ_easyq`pb_2 within w_ljfieb_sale_send_his
  172. integer x = 1454
  173. end type
  174. type cb_help from w_publ_easyq`cb_help within w_ljfieb_sale_send_his
  175. boolean visible = false
  176. end type
  177. type cb_copyself from w_publ_easyq`cb_copyself within w_ljfieb_sale_send_his
  178. boolean visible = false
  179. end type
  180. type gb_1 from w_publ_easyq`gb_1 within w_ljfieb_sale_send_his
  181. end type
  182. type ln_bar from w_publ_easyq`ln_bar within w_ljfieb_sale_send_his
  183. end type
  184. type ln_bar2 from w_publ_easyq`ln_bar2 within w_ljfieb_sale_send_his
  185. end type
  186. type r_bar from w_publ_easyq`r_bar within w_ljfieb_sale_send_his
  187. end type
  188. type ln_1 from w_publ_easyq`ln_1 within w_ljfieb_sale_send_his
  189. end type
  190. type ln_2 from w_publ_easyq`ln_2 within w_ljfieb_sale_send_his
  191. end type
  192. type ln_3 from w_publ_easyq`ln_3 within w_ljfieb_sale_send_his
  193. boolean visible = false
  194. end type
  195. type ln_4 from w_publ_easyq`ln_4 within w_ljfieb_sale_send_his
  196. boolean visible = false
  197. end type
  198. type cbx_1 from checkbox within w_ljfieb_sale_send_his
  199. integer x = 1600
  200. integer y = 200
  201. integer width = 411
  202. integer height = 60
  203. boolean bringtotop = true
  204. integer textsize = -9
  205. integer weight = 400
  206. fontcharset fontcharset = gb2312charset!
  207. fontpitch fontpitch = variable!
  208. string facename = "宋体"
  209. long textcolor = 33554432
  210. long backcolor = 134217739
  211. string text = "只显示待处理"
  212. end type
  213. event clicked;cb_1.triggerevent(clicked!)
  214. end event