w_sale_send_his_fx.srw 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. $PBExportHeader$w_sale_send_his_fx.srw
  2. $PBExportComments$查看销售发送的历史消息
  3. forward
  4. global type w_sale_send_his_fx from w_publ_base_style
  5. end type
  6. type cb_retrieve from uo_imflatbutton within w_sale_send_his_fx
  7. end type
  8. type st_1 from statictext within w_sale_send_his_fx
  9. end type
  10. type dp_timea from datepicker within w_sale_send_his_fx
  11. end type
  12. type st_2 from statictext within w_sale_send_his_fx
  13. end type
  14. type dp_timez from datepicker within w_sale_send_his_fx
  15. end type
  16. type cbx_1 from checkbox within w_sale_send_his_fx
  17. end type
  18. type dw_1 from u_dw_rbtnfilter within w_sale_send_his_fx
  19. end type
  20. end forward
  21. global type w_sale_send_his_fx from w_publ_base_style
  22. integer width = 3698
  23. integer height = 2024
  24. string title = "销售电子商务记录(发送)"
  25. boolean maxbox = true
  26. boolean resizable = true
  27. long backcolor = 16777215
  28. string icon = "graphics\chain_link_128px.ico"
  29. cb_retrieve cb_retrieve
  30. st_1 st_1
  31. dp_timea dp_timea
  32. st_2 st_2
  33. dp_timez dp_timez
  34. cbx_1 cbx_1
  35. dw_1 dw_1
  36. end type
  37. global w_sale_send_his_fx w_sale_send_his_fx
  38. forward prototypes
  39. public function integer wf_retrieve ()
  40. end prototypes
  41. public function integer wf_retrieve ();int rslt = 1
  42. string msg
  43. dw_1.Reset()
  44. datetime timeA, timeZ
  45. timeA = datetime(date(dp_timea.Value), time('00:00:00'))
  46. timeZ = datetime(date(dp_timez.Value), time('23:59:59'))
  47. if (timeA > timeZ) then
  48. rslt = 0
  49. msg = '日期范围有误'
  50. goto ext
  51. end if
  52. string arg_msg
  53. oleobject list, item
  54. list = FXAppCom.GetSaleSendHis(app_token_fx, string(timeA), string(timeZ), ref arg_msg)
  55. if (arg_msg <> '') then
  56. rslt = 0
  57. arg_msg = '获取供应商协同电子商务记录失败:' + arg_msg
  58. goto ext
  59. end if
  60. long i
  61. dw_1.SetRedraw(false)
  62. for i = 1 to list.Count
  63. item = list.GetItem(i - 1)
  64. dw_1.Object.comname[i] = item.GetString('comname')
  65. dw_1.Object.SerialNum[i] = item.GetString('serialNum')
  66. dw_1.Object.SendSCcode[i] = item.GetString('sendSCcode')
  67. dw_1.Object.AddUser[i] = item.GetString('addUser')
  68. dw_1.Object.AddTime[i] = item.GetDateTime('addTime')
  69. dw_1.Object.Status[i] = item.GetInt('status')
  70. dw_1.Object.BillType[i] = item.GetInt('billType')
  71. dw_1.Object.Summary[i] = item.GetString('summary')
  72. dw_1.Object.Postscript[i] = item.GetString('postscript')
  73. dw_1.Object.Remark[i] = item.GetString('remark')
  74. dw_1.Object.RelatedCode[i] = item.GetString('relatedCode')
  75. dw_1.Object.r_postscript[i] = item.GetString('rpostscript')
  76. dw_1.Object.r_remark[i] = item.GetString('rremark')
  77. next
  78. dw_1.SetRedraw(true)
  79. ext:
  80. if (rslt = 0) then
  81. MessageBox('提示', '错误:' + msg)
  82. end if
  83. return rslt
  84. end function
  85. on w_sale_send_his_fx.create
  86. int iCurrent
  87. call super::create
  88. this.cb_retrieve=create cb_retrieve
  89. this.st_1=create st_1
  90. this.dp_timea=create dp_timea
  91. this.st_2=create st_2
  92. this.dp_timez=create dp_timez
  93. this.cbx_1=create cbx_1
  94. this.dw_1=create dw_1
  95. iCurrent=UpperBound(this.Control)
  96. this.Control[iCurrent+1]=this.cb_retrieve
  97. this.Control[iCurrent+2]=this.st_1
  98. this.Control[iCurrent+3]=this.dp_timea
  99. this.Control[iCurrent+4]=this.st_2
  100. this.Control[iCurrent+5]=this.dp_timez
  101. this.Control[iCurrent+6]=this.cbx_1
  102. this.Control[iCurrent+7]=this.dw_1
  103. end on
  104. on w_sale_send_his_fx.destroy
  105. call super::destroy
  106. destroy(this.cb_retrieve)
  107. destroy(this.st_1)
  108. destroy(this.dp_timea)
  109. destroy(this.st_2)
  110. destroy(this.dp_timez)
  111. destroy(this.cbx_1)
  112. destroy(this.dw_1)
  113. end on
  114. event open;call super::open;dp_timea.Value = DateTime(RelativeDate(Today(), - 7), Time('00:00:00'))
  115. dp_timez.Value = DateTime(Today(), Time('23:59:59'))
  116. wf_retrieve()
  117. end event
  118. event resize;call super::resize;if (this.Width < 3660) then this.Width = 3660
  119. if (this.Height < 1900) then this.Height = 1900
  120. dw_1.Width = this.workspacewidth( )
  121. dw_1.Height = this.workspaceheight( ) - dw_1.Y
  122. cb_exit.X = this.workspacewidth( ) - cb_exit.Width
  123. end event
  124. type cb_func from w_publ_base_style`cb_func within w_sale_send_his_fx
  125. boolean visible = false
  126. end type
  127. type cb_exit from w_publ_base_style`cb_exit within w_sale_send_his_fx
  128. integer x = 2491
  129. end type
  130. type ln_bar from w_publ_base_style`ln_bar within w_sale_send_his_fx
  131. end type
  132. type ln_bar2 from w_publ_base_style`ln_bar2 within w_sale_send_his_fx
  133. end type
  134. type r_bar from w_publ_base_style`r_bar within w_sale_send_his_fx
  135. end type
  136. type cb_retrieve from uo_imflatbutton within w_sale_send_his_fx
  137. integer width = 151
  138. integer height = 164
  139. integer taborder = 20
  140. boolean bringtotop = true
  141. string text = "刷新"
  142. string normalpicname = "refresh.bmp"
  143. integer picsize = 16
  144. toolbaralignment pic_align = alignattop!
  145. boolean border = false
  146. end type
  147. event clicked;call super::clicked;wf_retrieve()
  148. end event
  149. type st_1 from statictext within w_sale_send_his_fx
  150. integer x = 23
  151. integer y = 200
  152. integer width = 325
  153. integer height = 48
  154. boolean bringtotop = true
  155. integer textsize = -9
  156. integer weight = 400
  157. fontcharset fontcharset = gb2312charset!
  158. fontpitch fontpitch = variable!
  159. string facename = "宋体"
  160. long textcolor = 33554432
  161. long backcolor = 16777215
  162. string text = "发送日期从:"
  163. boolean focusrectangle = false
  164. end type
  165. type dp_timea from datepicker within w_sale_send_his_fx
  166. integer x = 329
  167. integer y = 184
  168. integer width = 462
  169. integer height = 84
  170. integer taborder = 20
  171. boolean bringtotop = true
  172. borderstyle borderstyle = stylelowered!
  173. date maxdate = Date("2999-12-31")
  174. date mindate = Date("1800-01-01")
  175. datetime value = DateTime(Date("2016-11-04"), Time("10:31:24.000000"))
  176. integer textsize = -9
  177. fontcharset fontcharset = gb2312charset!
  178. fontpitch fontpitch = variable!
  179. string facename = "宋体"
  180. integer calendarfontweight = 400
  181. boolean todaysection = true
  182. boolean todaycircle = true
  183. boolean valueset = true
  184. end type
  185. type st_2 from statictext within w_sale_send_his_fx
  186. integer x = 809
  187. integer y = 200
  188. integer width = 82
  189. integer height = 48
  190. boolean bringtotop = true
  191. integer textsize = -9
  192. integer weight = 400
  193. fontcharset fontcharset = gb2312charset!
  194. fontpitch fontpitch = variable!
  195. string facename = "宋体"
  196. long textcolor = 33554432
  197. long backcolor = 16777215
  198. string text = "到"
  199. boolean focusrectangle = false
  200. end type
  201. type dp_timez from datepicker within w_sale_send_his_fx
  202. integer x = 882
  203. integer y = 184
  204. integer width = 462
  205. integer height = 84
  206. integer taborder = 30
  207. boolean bringtotop = true
  208. borderstyle borderstyle = stylelowered!
  209. date maxdate = Date("2999-12-31")
  210. date mindate = Date("1800-01-01")
  211. datetime value = DateTime(Date("2016-11-04"), Time("10:33:29.000000"))
  212. integer textsize = -9
  213. fontcharset fontcharset = gb2312charset!
  214. fontpitch fontpitch = variable!
  215. string facename = "宋体"
  216. integer calendarfontweight = 400
  217. boolean todaysection = true
  218. boolean todaycircle = true
  219. boolean valueset = true
  220. end type
  221. type cbx_1 from checkbox within w_sale_send_his_fx
  222. integer x = 1381
  223. integer y = 196
  224. integer width = 411
  225. integer height = 60
  226. boolean bringtotop = true
  227. integer textsize = -9
  228. integer weight = 400
  229. fontcharset fontcharset = gb2312charset!
  230. fontpitch fontpitch = variable!
  231. string facename = "宋体"
  232. long textcolor = 33554432
  233. long backcolor = 16777215
  234. string text = "只显示待处理"
  235. end type
  236. event clicked;if (dw_1.RowCount() <= 0) then return
  237. if (this.Checked) then
  238. dw_1.SetFilter('status=0 or status=1 or status=2 or status=3') // [0]待发送 [1]发送失败 [2]发送成功 [3]对方已打开
  239. dw_1.Filter()
  240. else
  241. dw_1.SetFilter('')
  242. dw_1.Filter()
  243. end if
  244. end event
  245. type dw_1 from u_dw_rbtnfilter within w_sale_send_his_fx
  246. integer y = 276
  247. integer width = 3662
  248. integer height = 1520
  249. integer taborder = 20
  250. boolean bringtotop = true
  251. string dataobject = "dw_fx_send_his"
  252. boolean hscrollbar = true
  253. boolean vscrollbar = true
  254. boolean rbutton_filter_use = true
  255. boolean rbutton_setposition_use = true
  256. boolean titleclick_sort_use = true
  257. end type
  258. event clicked;call super::clicked;if (row > 0) then
  259. this.SelectRow(0, false)
  260. this.SelectRow(row, true)
  261. this.SetRow(row)
  262. end if
  263. end event