w_ljfieb_buy_feedback_his.srw 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. $PBExportHeader$w_ljfieb_buy_feedback_his.srw
  2. forward
  3. global type w_ljfieb_buy_feedback_his from w_publ_easyq
  4. end type
  5. type cbx_1 from checkbox within w_ljfieb_buy_feedback_his
  6. end type
  7. end forward
  8. global type w_ljfieb_buy_feedback_his from w_publ_easyq
  9. string title = "采购电子商务接收记录"
  10. cbx_1 cbx_1
  11. end type
  12. global w_ljfieb_buy_feedback_his w_ljfieb_buy_feedback_his
  13. on w_ljfieb_buy_feedback_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_buy_feedback_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_buy_feedback_his
  33. boolean visible = false
  34. end type
  35. type cb_exit from w_publ_easyq`cb_exit within w_ljfieb_buy_feedback_his
  36. integer x = 151
  37. end type
  38. type cb_2 from w_publ_easyq`cb_2 within w_ljfieb_buy_feedback_his
  39. boolean visible = false
  40. end type
  41. type cb_psetup from w_publ_easyq`cb_psetup within w_ljfieb_buy_feedback_his
  42. boolean visible = false
  43. end type
  44. type cb_1 from w_publ_easyq`cb_1 within w_ljfieb_buy_feedback_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. Long ll_i
  51. String ls_cuscode
  52. Long ll_sendcuscommid,ll_spttypeid
  53. String ls_spttype,ls_receivesccode, ls_SendSCcode,ls_scstr
  54. Long ll_scid
  55. IF cbx_1.Checked THEN
  56. li_ifall = 0
  57. ELSE
  58. li_ifall = 1
  59. END IF
  60. dw_1.SetRedraw(False)
  61. dw_1.Retrieve(first_date,end_date,li_ifall)
  62. IF Not sys_power_issuper THEN
  63. dw_1.AcceptText()
  64. FOR ll_i = dw_1.RowCount() To 1 Step -1
  65. IF dw_1.Object.ljfieb_packet_billtype [ll_i] = 9 THEN CONTINUE
  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 spttypeid
  91. INTO :ll_spttypeid
  92. FROM u_spt
  93. WHERE commcode = :ls_cuscode
  94. And commsccode = :ls_SendSCcode Using sqlca;
  95. IF sqlca.SQLCode <> 0 THEN CONTINUE
  96. IF sys_user_spttypestr <> '0' THEN
  97. ls_spttype = ','+String( ll_spttypeid)+','
  98. IF Pos(sys_user_spttypestr,ls_spttype) = 0 THEN
  99. dw_1.DeleteRow(ll_i)
  100. CONTINUE
  101. END IF
  102. END IF
  103. NEXT
  104. END IF
  105. dw_1.SetRedraw(True)
  106. end event
  107. type st_3 from w_publ_easyq`st_3 within w_ljfieb_buy_feedback_his
  108. integer x = 0
  109. integer width = 315
  110. string text = "发送日期从:"
  111. end type
  112. type st_4 from w_publ_easyq`st_4 within w_ljfieb_buy_feedback_his
  113. integer x = 823
  114. end type
  115. type em_1 from w_publ_easyq`em_1 within w_ljfieb_buy_feedback_his
  116. integer x = 315
  117. end type
  118. type em_2 from w_publ_easyq`em_2 within w_ljfieb_buy_feedback_his
  119. integer x = 928
  120. end type
  121. type ddlb_yl from w_publ_easyq`ddlb_yl within w_ljfieb_buy_feedback_his
  122. boolean visible = false
  123. end type
  124. type cbx_yl from w_publ_easyq`cbx_yl within w_ljfieb_buy_feedback_his
  125. boolean visible = false
  126. end type
  127. type dw_1 from w_publ_easyq`dw_1 within w_ljfieb_buy_feedback_his
  128. integer y = 300
  129. string dataobject = "dw_ljfieb_buy_feedback_his"
  130. end type
  131. event dw_1::doubleclicked;call super::doubleclicked;Long ll_row
  132. String ls_sn
  133. ll_row = dw_1.GetRow()
  134. IF ll_row <= 0 THEN RETURN
  135. s_packet_ljfieb s_inscust
  136. s_inscust.sendcuscommid = dw_1.Object.ljfieb_packet_sendcuscommid[ll_row]
  137. s_inscust.receivecuscommid = dw_1.Object.ljfieb_packet_receivecuscommid[ll_row]
  138. s_inscust.sendsccode = dw_1.Object.ljfieb_packet_sendsccode[ll_row]
  139. s_inscust.receivesccode = dw_1.Object.ljfieb_packet_receivesccode[ll_row]
  140. s_inscust.RelatedCode = dw_1.Object.ljfieb_packet_relatedcode[ll_row]
  141. s_inscust.remark = dw_1.Object.ljfieb_packet_remark[ll_row]
  142. s_inscust.postscript = dw_1.Object.ljfieb_packet_postscript[ll_row]
  143. s_inscust.serialnum = dw_1.Object.ljfieb_packet_serialnum[ll_row]
  144. IF dw_1.Object.ljfieb_packet_billtype[ll_row] = 3 THEN
  145. OpenWithParm(w_buytask_feedback_ljfieb,s_inscust)
  146. ELSEIF dw_1.Object.ljfieb_packet_billtype[ll_row] = 12 THEN
  147. OpenWithParm(w_buytask_redate_ljfieb,s_inscust)
  148. ELSEIF dw_1.Object.ljfieb_packet_billtype[ll_row] = 4 THEN
  149. OpenWithParm(w_outware_receive_ljfieb,s_inscust)
  150. ELSEIF dw_1.Object.ljfieb_packet_billtype[ll_row] = 1 THEN
  151. OpenWithParm(w_quote_receive_ljfieb,s_inscust)
  152. ELSEIF dw_1.Object.ljfieb_packet_billtype[ll_row] = 9 THEN
  153. IF dw_1.Object.ljfieb_packet_status[ll_row] <> 5 THEN RETURN
  154. SELECT top 1 SerialNum
  155. INTO :ls_sn
  156. FROM LJFIEB_packet
  157. WHERE BillType = 9
  158. AND status = 5
  159. AND Complete = 0
  160. AND sendcuscommid = :s_inscust.sendcuscommid
  161. Order By AddTime Using sys_email_sqlca;
  162. IF sys_email_sqlca.SQLCode <> 0 THEN
  163. MessageBox('Error','查询最早待处理的同步数据失败,'+sys_email_sqlca.SQLErrText)
  164. RETURN
  165. END IF
  166. IF ls_sn <> s_inscust.serialnum THEN
  167. MessageBox('系统提示','同一供应商资料同步严格按照推送时间顺序,当前选中的资料不是最早,将自动转到最早的资料作同步')
  168. ELSE
  169. ls_sn = s_inscust.serialnum
  170. END IF
  171. OpenWithParm(w_mtrl_receive_ljfieb,ls_sn)
  172. END IF
  173. cb_1.TriggerEvent(Clicked!)
  174. end event
  175. type sle_mtrl from w_publ_easyq`sle_mtrl within w_ljfieb_buy_feedback_his
  176. end type
  177. type sle_cust from w_publ_easyq`sle_cust within w_ljfieb_buy_feedback_his
  178. end type
  179. type st_mtrl from w_publ_easyq`st_mtrl within w_ljfieb_buy_feedback_his
  180. end type
  181. type st_cust from w_publ_easyq`st_cust within w_ljfieb_buy_feedback_his
  182. end type
  183. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_ljfieb_buy_feedback_his
  184. end type
  185. type pb_em1 from w_publ_easyq`pb_em1 within w_ljfieb_buy_feedback_his
  186. integer x = 731
  187. end type
  188. type pb_em2 from w_publ_easyq`pb_em2 within w_ljfieb_buy_feedback_his
  189. integer x = 1344
  190. end type
  191. type pb_2 from w_publ_easyq`pb_2 within w_ljfieb_buy_feedback_his
  192. integer x = 1454
  193. end type
  194. type cb_help from w_publ_easyq`cb_help within w_ljfieb_buy_feedback_his
  195. boolean visible = false
  196. end type
  197. type cb_copyself from w_publ_easyq`cb_copyself within w_ljfieb_buy_feedback_his
  198. boolean visible = false
  199. end type
  200. type gb_1 from w_publ_easyq`gb_1 within w_ljfieb_buy_feedback_his
  201. end type
  202. type ln_bar from w_publ_easyq`ln_bar within w_ljfieb_buy_feedback_his
  203. end type
  204. type ln_bar2 from w_publ_easyq`ln_bar2 within w_ljfieb_buy_feedback_his
  205. end type
  206. type r_bar from w_publ_easyq`r_bar within w_ljfieb_buy_feedback_his
  207. end type
  208. type ln_1 from w_publ_easyq`ln_1 within w_ljfieb_buy_feedback_his
  209. end type
  210. type ln_2 from w_publ_easyq`ln_2 within w_ljfieb_buy_feedback_his
  211. end type
  212. type ln_3 from w_publ_easyq`ln_3 within w_ljfieb_buy_feedback_his
  213. boolean visible = false
  214. end type
  215. type ln_4 from w_publ_easyq`ln_4 within w_ljfieb_buy_feedback_his
  216. boolean visible = false
  217. end type
  218. type cbx_1 from checkbox within w_ljfieb_buy_feedback_his
  219. integer x = 1600
  220. integer y = 200
  221. integer width = 411
  222. integer height = 60
  223. boolean bringtotop = true
  224. integer textsize = -9
  225. integer weight = 400
  226. fontcharset fontcharset = gb2312charset!
  227. fontpitch fontpitch = variable!
  228. string facename = "宋体"
  229. long textcolor = 33554432
  230. long backcolor = 134217739
  231. string text = "只显示待处理"
  232. end type
  233. event clicked;cb_1.triggerevent(clicked!)
  234. end event