w_checkdata.srw 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. $PBExportHeader$w_checkdata.srw
  2. forward
  3. global type w_checkdata from w_publ_easyq
  4. end type
  5. type em_pagesize from editmask within w_checkdata
  6. end type
  7. type cb_toppage from uo_imflatbutton within w_checkdata
  8. end type
  9. type cb_page_ch from uo_imflatbutton within w_checkdata
  10. end type
  11. type mle_1 from multilineedit within w_checkdata
  12. end type
  13. type ddlb_1 from dropdownlistbox within w_checkdata
  14. end type
  15. end forward
  16. global type w_checkdata from w_publ_easyq
  17. string title = "数据检查"
  18. event ue_page_before ( )
  19. event ue_page_next ( )
  20. em_pagesize em_pagesize
  21. cb_toppage cb_toppage
  22. cb_page_ch cb_page_ch
  23. mle_1 mle_1
  24. ddlb_1 ddlb_1
  25. end type
  26. global w_checkdata w_checkdata
  27. type variables
  28. long ins_cur_pageNum = 1 // 用于记录当前页码
  29. long ins_totalPages = 1 // 用于记录总页数
  30. end variables
  31. forward prototypes
  32. public function integer wf_retrieve ()
  33. end prototypes
  34. event ue_page_before();if ins_cur_pageNum > 1 THEN
  35. ins_cur_pageNum --
  36. wf_retrieve()
  37. END IF
  38. end event
  39. event ue_page_next();ins_cur_pageNum ++
  40. wf_retrieve()
  41. end event
  42. public function integer wf_retrieve ();string ls_taskcodes[],temp_taskcode
  43. int rslt = 1
  44. long i, row
  45. string arg_msg
  46. oleobject request,response
  47. request = FXAppCom.CreatePbDictionary()
  48. request.SetString("token",app_token_fx)
  49. request.SetString("begindate",em_1.Text)
  50. request.SetString("enddate",em_2.Text)
  51. string t
  52. t = ddlb_1.text
  53. if t = '显示所有数据' then request.SetInt("config",1)
  54. temp_taskcode = mle_1.text
  55. if temp_taskcode <> '' then
  56. f_split(temp_taskcode,'~t~n',ls_taskcodes)
  57. oleobject list
  58. list = FXAppCom.NewPBArray()
  59. for i = 1 to upperbound(ls_taskcodes)
  60. list.AddString(ls_taskcodes[i])
  61. next
  62. request.SetObject('taskcodes_fxsaletask',list)
  63. end if
  64. response = FXAppCom.DoExecute("CheckData", request)
  65. arg_msg = response.GetString("ErrMsg")
  66. if (arg_msg <> '') then
  67. rslt = 0
  68. goto ext
  69. end if
  70. dw_1.Reset()
  71. dw_1.SetRedraw(false)
  72. list = response.GetArrOfPBDictionary('checkdataresult')
  73. any requiredate, promisedate, requiredate_erp,outDate
  74. for i = 1 to list.Count
  75. oleobject item
  76. item = list.GetItem(i - 1)
  77. row = dw_1.InsertRow(0)
  78. // dw_1.Object.taskcode[row] = item.GetInt("taskcode")
  79. dw_1.Object.taskcode[row] = item.GetString("taskcode")
  80. dw_1.Object.tid[row] = item.GetString("tid")
  81. dw_1.Object.taskid[row] = item.GetInt("taskid")
  82. dw_1.Object.printid[row] = item.GetInt("printid")
  83. dw_1.Object.cuscomid[row] = item.GetInt("cuscomid")
  84. dw_1.Object.comname[row] = item.GetString("comname")
  85. requiredate = item.GetDateTime("requiredate")
  86. if (not IsNull(requiredate_erp)) then dw_1.Object.requiredate[row] = requiredate
  87. dw_1.Object.date_confirm_flag[row] = item.GetInt("date_confirm_flag")
  88. dw_1.Object.stopQty[row] = item.GetDouble("date_confirm_flag")
  89. promisedate = item.GetDateTime("promisedate")
  90. if (not IsNull(promisedate)) then dw_1.Object.promisedate[row] = promisedate
  91. dw_1.Object.cus_receiveqty[row] = item.GetDouble("cus_receiveqty")
  92. outDate = item.GetDateTime("outDate")
  93. if (not IsNull(outDate)) then dw_1.Object.outdate[row] = outDate
  94. dw_1.Object.finishqty[row] = item.GetDouble("finishqty")
  95. dw_1.Object.custFlagStr_spt[row] = item.GetString("custFlagStr_spt")
  96. dw_1.Object.sptFlagStr_spt[row] = item.GetString("sptFlagStr_spt")
  97. dw_1.Object.uqty_erp[row] = item.GetDouble("uqty_erp")
  98. requiredate_erp = item.GetDateTime("requiredate_erp")
  99. if (not IsNull(requiredate_erp)) then dw_1.Object.requiredate_erp[row] = requiredate_erp
  100. dw_1.Object.finishqty_fx_erp[row] = item.GetDouble("finishqty_fx_erp")
  101. dw_1.Object.date_confirm_flag_erp[row] = item.GetInt("date_confirm_flag_erp")
  102. dw_1.Object.stopqty_erp[row] = item.GetDouble("stopqty_erp")
  103. dw_1.Object.consignedqty_erp[row] = item.GetDouble("consignedqty_erp")
  104. next
  105. dw_1.SetRedraw(true)
  106. if (arg_msg <> '') then
  107. rslt = 0
  108. goto ext
  109. end if
  110. ext:
  111. if (rslt = 1) then
  112. if (dw_1.RowCount() > 0) then
  113. dw_1.SelectRow(0, false)
  114. dw_1.SelectRow(1, true)
  115. dw_1.SetRow(1)
  116. end if
  117. else
  118. MessageBox('提示', arg_msg)
  119. end if
  120. return rslt
  121. end function
  122. on w_checkdata.create
  123. int iCurrent
  124. call super::create
  125. this.em_pagesize=create em_pagesize
  126. this.cb_toppage=create cb_toppage
  127. this.cb_page_ch=create cb_page_ch
  128. this.mle_1=create mle_1
  129. this.ddlb_1=create ddlb_1
  130. iCurrent=UpperBound(this.Control)
  131. this.Control[iCurrent+1]=this.em_pagesize
  132. this.Control[iCurrent+2]=this.cb_toppage
  133. this.Control[iCurrent+3]=this.cb_page_ch
  134. this.Control[iCurrent+4]=this.mle_1
  135. this.Control[iCurrent+5]=this.ddlb_1
  136. end on
  137. on w_checkdata.destroy
  138. call super::destroy
  139. destroy(this.em_pagesize)
  140. destroy(this.cb_toppage)
  141. destroy(this.cb_page_ch)
  142. destroy(this.mle_1)
  143. destroy(this.ddlb_1)
  144. end on
  145. event open;call super::open;em_1.Text = String(Today(),'YYYY-MM')+'-01'
  146. em_2.Text = String(Today(),'YYYY-MM-DD')
  147. end event
  148. type cb_func from w_publ_easyq`cb_func within w_checkdata
  149. boolean visible = false
  150. end type
  151. type cb_exit from w_publ_easyq`cb_exit within w_checkdata
  152. integer x = 151
  153. end type
  154. type cb_2 from w_publ_easyq`cb_2 within w_checkdata
  155. boolean visible = false
  156. end type
  157. type cb_psetup from w_publ_easyq`cb_psetup within w_checkdata
  158. boolean visible = false
  159. end type
  160. type cb_1 from w_publ_easyq`cb_1 within w_checkdata
  161. end type
  162. event cb_1::clicked;call super::clicked;wf_retrieve()
  163. end event
  164. type st_3 from w_publ_easyq`st_3 within w_checkdata
  165. end type
  166. type st_4 from w_publ_easyq`st_4 within w_checkdata
  167. end type
  168. type em_1 from w_publ_easyq`em_1 within w_checkdata
  169. end type
  170. type em_2 from w_publ_easyq`em_2 within w_checkdata
  171. end type
  172. type ddlb_yl from w_publ_easyq`ddlb_yl within w_checkdata
  173. boolean visible = false
  174. borderstyle borderstyle = styleraised!
  175. end type
  176. type cbx_yl from w_publ_easyq`cbx_yl within w_checkdata
  177. boolean visible = false
  178. end type
  179. type dw_1 from w_publ_easyq`dw_1 within w_checkdata
  180. integer y = 536
  181. integer height = 1696
  182. string dataobject = "dw_checkdata"
  183. boolean controlmenu = true
  184. end type
  185. type sle_mtrl from w_publ_easyq`sle_mtrl within w_checkdata
  186. integer x = 2523
  187. integer y = 184
  188. integer width = 896
  189. integer height = 88
  190. end type
  191. type sle_cust from w_publ_easyq`sle_cust within w_checkdata
  192. integer x = 2537
  193. integer y = 300
  194. integer width = 891
  195. end type
  196. type st_mtrl from w_publ_easyq`st_mtrl within w_checkdata
  197. integer x = 2341
  198. integer y = 312
  199. integer width = 187
  200. integer height = 52
  201. string text = "客户:"
  202. end type
  203. type st_cust from w_publ_easyq`st_cust within w_checkdata
  204. boolean visible = true
  205. integer x = 23
  206. integer width = 315
  207. integer height = 56
  208. string text = "采购订单号:"
  209. end type
  210. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_checkdata
  211. end type
  212. type pb_em1 from w_publ_easyq`pb_em1 within w_checkdata
  213. end type
  214. type pb_em2 from w_publ_easyq`pb_em2 within w_checkdata
  215. end type
  216. type pb_2 from w_publ_easyq`pb_2 within w_checkdata
  217. end type
  218. type cb_help from w_publ_easyq`cb_help within w_checkdata
  219. boolean visible = false
  220. end type
  221. type cb_copyself from w_publ_easyq`cb_copyself within w_checkdata
  222. boolean visible = false
  223. end type
  224. type gb_1 from w_publ_easyq`gb_1 within w_checkdata
  225. end type
  226. type ln_bar from w_publ_easyq`ln_bar within w_checkdata
  227. end type
  228. type ln_bar2 from w_publ_easyq`ln_bar2 within w_checkdata
  229. end type
  230. type r_bar from w_publ_easyq`r_bar within w_checkdata
  231. end type
  232. type ln_1 from w_publ_easyq`ln_1 within w_checkdata
  233. end type
  234. type ln_2 from w_publ_easyq`ln_2 within w_checkdata
  235. end type
  236. type ln_3 from w_publ_easyq`ln_3 within w_checkdata
  237. integer beginx = 5
  238. integer beginy = 508
  239. integer endx = 2021
  240. integer endy = 508
  241. end type
  242. type ln_4 from w_publ_easyq`ln_4 within w_checkdata
  243. integer beginx = 18
  244. integer beginy = 512
  245. integer endx = 2066
  246. integer endy = 512
  247. end type
  248. type em_pagesize from editmask within w_checkdata
  249. integer x = 311
  250. integer y = 44
  251. integer width = 306
  252. integer height = 84
  253. integer taborder = 50
  254. boolean bringtotop = true
  255. integer textsize = -9
  256. integer weight = 400
  257. fontcharset fontcharset = gb2312charset!
  258. fontpitch fontpitch = variable!
  259. string facename = "宋体"
  260. long textcolor = 33554432
  261. string text = "10000"
  262. alignment alignment = right!
  263. borderstyle borderstyle = stylelowered!
  264. string mask = "#####0"
  265. boolean spin = true
  266. double increment = 1
  267. string minmax = "1~~"
  268. end type
  269. type cb_toppage from uo_imflatbutton within w_checkdata
  270. integer x = 622
  271. integer width = 151
  272. integer height = 164
  273. integer taborder = 20
  274. boolean bringtotop = true
  275. string text = "首页"
  276. boolean border = false
  277. end type
  278. event clicked;call super::clicked;ins_cur_pageNum = 1
  279. wf_retrieve( )
  280. end event
  281. type cb_page_ch from uo_imflatbutton within w_checkdata
  282. integer x = 773
  283. integer width = 82
  284. integer height = 164
  285. integer taborder = 30
  286. boolean bringtotop = true
  287. string text = "▼"
  288. toolbaralignment pic_align = alignattop!
  289. boolean border = false
  290. end type
  291. event clicked;call super::clicked;m_Dfc_Control_PopupMenu dmPopupMenu
  292. string menustr
  293. menustr="Text=下页~tEvent=ue_page_next"
  294. menustr = menustr + "|" + "Text=上页~tEvent=ue_page_before"
  295. if len(trim(menustr))<>0 then
  296. dmPopupMenu = Create m_Dfc_Control_PopupMenu
  297. dmPopupMenu.mf_BuildMenu(This, menustr)
  298. dmPopupMenu.mf_PopMenu()
  299. Destroy dmPopupMenu
  300. end if
  301. end event
  302. type mle_1 from multilineedit within w_checkdata
  303. integer x = 320
  304. integer y = 320
  305. integer width = 1696
  306. integer height = 164
  307. integer taborder = 140
  308. boolean bringtotop = true
  309. integer textsize = -9
  310. integer weight = 400
  311. fontcharset fontcharset = gb2312charset!
  312. fontpitch fontpitch = variable!
  313. string facename = "宋体"
  314. long textcolor = 33554432
  315. borderstyle borderstyle = stylelowered!
  316. end type
  317. type ddlb_1 from dropdownlistbox within w_checkdata
  318. integer x = 873
  319. integer y = 44
  320. integer width = 480
  321. integer height = 300
  322. integer taborder = 60
  323. boolean bringtotop = true
  324. integer textsize = -9
  325. integer weight = 400
  326. fontcharset fontcharset = gb2312charset!
  327. fontpitch fontpitch = variable!
  328. string facename = "宋体"
  329. long textcolor = 33554432
  330. string item[] = {"显示不同步数据","显示所有数据"}
  331. borderstyle borderstyle = styleraised!
  332. end type
  333. event selectionchanged;wf_retrieve()
  334. end event