w_sale_rece_his_fx.srw 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. $PBExportHeader$w_sale_rece_his_fx.srw
  2. $PBExportComments$查看销售接收的历史消息
  3. forward
  4. global type w_sale_rece_his_fx from w_publ_base_style
  5. end type
  6. type cb_retrieve from uo_imflatbutton within w_sale_rece_his_fx
  7. end type
  8. type st_1 from statictext within w_sale_rece_his_fx
  9. end type
  10. type st_2 from statictext within w_sale_rece_his_fx
  11. end type
  12. type cbx_1 from checkbox within w_sale_rece_his_fx
  13. end type
  14. type dw_1 from u_dw_rbtnfilter within w_sale_rece_his_fx
  15. end type
  16. type dp_timea from datepicker within w_sale_rece_his_fx
  17. end type
  18. type dp_timez from datepicker within w_sale_rece_his_fx
  19. end type
  20. end forward
  21. global type w_sale_rece_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. st_2 st_2
  32. cbx_1 cbx_1
  33. dw_1 dw_1
  34. dp_timea dp_timea
  35. dp_timez dp_timez
  36. end type
  37. global w_sale_rece_his_fx w_sale_rece_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.GetSaleReceHis(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. next
  76. dw_1.SetRedraw(true)
  77. ext:
  78. if (rslt = 0) then
  79. MessageBox('提示', '错误:' + msg)
  80. end if
  81. return rslt
  82. end function
  83. on w_sale_rece_his_fx.create
  84. int iCurrent
  85. call super::create
  86. this.cb_retrieve=create cb_retrieve
  87. this.st_1=create st_1
  88. this.st_2=create st_2
  89. this.cbx_1=create cbx_1
  90. this.dw_1=create dw_1
  91. this.dp_timea=create dp_timea
  92. this.dp_timez=create dp_timez
  93. iCurrent=UpperBound(this.Control)
  94. this.Control[iCurrent+1]=this.cb_retrieve
  95. this.Control[iCurrent+2]=this.st_1
  96. this.Control[iCurrent+3]=this.st_2
  97. this.Control[iCurrent+4]=this.cbx_1
  98. this.Control[iCurrent+5]=this.dw_1
  99. this.Control[iCurrent+6]=this.dp_timea
  100. this.Control[iCurrent+7]=this.dp_timez
  101. end on
  102. on w_sale_rece_his_fx.destroy
  103. call super::destroy
  104. destroy(this.cb_retrieve)
  105. destroy(this.st_1)
  106. destroy(this.st_2)
  107. destroy(this.cbx_1)
  108. destroy(this.dw_1)
  109. destroy(this.dp_timea)
  110. destroy(this.dp_timez)
  111. end on
  112. event open;call super::open;dp_timea.Value = DateTime(RelativeDate(Today(), - 7), Time('00:00:00'))
  113. dp_timez.Value = DateTime(Today(), Time('23:59:59'))
  114. wf_retrieve()
  115. end event
  116. event resize;call super::resize;if (this.Width < 3660) then this.Width = 3660
  117. if (this.Height < 1900) then this.Height = 1900
  118. dw_1.Width = this.workspacewidth( )
  119. dw_1.Height = this.workspaceheight( ) - dw_1.Y
  120. cb_exit.X = this.workspacewidth( ) - cb_exit.Width
  121. end event
  122. type cb_func from w_publ_base_style`cb_func within w_sale_rece_his_fx
  123. boolean visible = false
  124. end type
  125. type cb_exit from w_publ_base_style`cb_exit within w_sale_rece_his_fx
  126. integer x = 2203
  127. end type
  128. type ln_bar from w_publ_base_style`ln_bar within w_sale_rece_his_fx
  129. end type
  130. type ln_bar2 from w_publ_base_style`ln_bar2 within w_sale_rece_his_fx
  131. end type
  132. type r_bar from w_publ_base_style`r_bar within w_sale_rece_his_fx
  133. end type
  134. type cb_retrieve from uo_imflatbutton within w_sale_rece_his_fx
  135. integer width = 151
  136. integer height = 164
  137. integer taborder = 20
  138. boolean bringtotop = true
  139. string text = "刷新"
  140. string normalpicname = "refresh.bmp"
  141. integer picsize = 16
  142. toolbaralignment pic_align = alignattop!
  143. boolean border = false
  144. end type
  145. event clicked;call super::clicked;wf_retrieve()
  146. end event
  147. type st_1 from statictext within w_sale_rece_his_fx
  148. integer x = 23
  149. integer y = 200
  150. integer width = 325
  151. integer height = 48
  152. boolean bringtotop = true
  153. integer textsize = -9
  154. integer weight = 400
  155. fontcharset fontcharset = gb2312charset!
  156. fontpitch fontpitch = variable!
  157. string facename = "宋体"
  158. long textcolor = 33554432
  159. long backcolor = 16777215
  160. string text = "发送日期从:"
  161. boolean focusrectangle = false
  162. end type
  163. type st_2 from statictext within w_sale_rece_his_fx
  164. integer x = 809
  165. integer y = 200
  166. integer width = 82
  167. integer height = 48
  168. boolean bringtotop = true
  169. integer textsize = -9
  170. integer weight = 400
  171. fontcharset fontcharset = gb2312charset!
  172. fontpitch fontpitch = variable!
  173. string facename = "宋体"
  174. long textcolor = 33554432
  175. long backcolor = 16777215
  176. string text = "到"
  177. boolean focusrectangle = false
  178. end type
  179. type cbx_1 from checkbox within w_sale_rece_his_fx
  180. integer x = 1381
  181. integer y = 196
  182. integer width = 411
  183. integer height = 60
  184. boolean bringtotop = true
  185. integer textsize = -9
  186. integer weight = 400
  187. fontcharset fontcharset = gb2312charset!
  188. fontpitch fontpitch = variable!
  189. string facename = "宋体"
  190. long textcolor = 33554432
  191. long backcolor = 16777215
  192. string text = "只显示待处理"
  193. end type
  194. event clicked;if (dw_1.RowCount() <= 0) then return
  195. if (this.Checked) then
  196. dw_1.SetFilter('status=5') // [5]接收未处理
  197. dw_1.Filter()
  198. else
  199. dw_1.SetFilter('')
  200. dw_1.Filter()
  201. end if
  202. end event
  203. type dw_1 from u_dw_rbtnfilter within w_sale_rece_his_fx
  204. integer y = 276
  205. integer width = 3662
  206. integer height = 1520
  207. integer taborder = 20
  208. boolean bringtotop = true
  209. string dataobject = "dw_fx_feedback"
  210. boolean hscrollbar = true
  211. boolean vscrollbar = true
  212. boolean rbutton_filter_use = true
  213. boolean rbutton_setposition_use = true
  214. boolean titleclick_sort_use = true
  215. end type
  216. event clicked;call super::clicked;if (row > 0) then
  217. this.SelectRow(0, false)
  218. this.SelectRow(row, true)
  219. this.SetRow(row)
  220. end if
  221. end event
  222. type dp_timea from datepicker within w_sale_rece_his_fx
  223. integer x = 329
  224. integer y = 184
  225. integer width = 462
  226. integer height = 84
  227. integer taborder = 20
  228. boolean bringtotop = true
  229. borderstyle borderstyle = stylelowered!
  230. date maxdate = Date("2999-12-31")
  231. date mindate = Date("1800-01-01")
  232. datetime value = DateTime(Date("2016-11-04"), Time("10:31:24.000000"))
  233. integer textsize = -9
  234. fontcharset fontcharset = gb2312charset!
  235. fontpitch fontpitch = variable!
  236. string facename = "宋体"
  237. integer calendarfontweight = 400
  238. boolean todaysection = true
  239. boolean todaycircle = true
  240. boolean valueset = true
  241. end type
  242. type dp_timez from datepicker within w_sale_rece_his_fx
  243. integer x = 882
  244. integer y = 184
  245. integer width = 462
  246. integer height = 84
  247. integer taborder = 30
  248. boolean bringtotop = true
  249. borderstyle borderstyle = stylelowered!
  250. date maxdate = Date("2999-12-31")
  251. date mindate = Date("1800-01-01")
  252. datetime value = DateTime(Date("2016-11-04"), Time("10:33:29.000000"))
  253. integer textsize = -9
  254. fontcharset fontcharset = gb2312charset!
  255. fontpitch fontpitch = variable!
  256. string facename = "宋体"
  257. integer calendarfontweight = 400
  258. boolean todaysection = true
  259. boolean todaycircle = true
  260. boolean valueset = true
  261. end type