w_rp_owwfjg_in_spt.srw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485
  1. $PBExportHeader$w_rp_owwfjg_in_spt.srw
  2. forward
  3. global type w_rp_owwfjg_in_spt from w_publ_easyq
  4. end type
  5. type ddlb_2 from dropdownlistbox within w_rp_owwfjg_in_spt
  6. end type
  7. type tv_1 from uo_tv_mtrltype within w_rp_owwfjg_in_spt
  8. end type
  9. type ddlb_status from dropdownlistbox within w_rp_owwfjg_in_spt
  10. end type
  11. type ddlb_1 from dropdownlistbox within w_rp_owwfjg_in_spt
  12. end type
  13. type ddlb_scid from uo_ddlb_scid within w_rp_owwfjg_in_spt
  14. end type
  15. type st_5 from statictext within w_rp_owwfjg_in_spt
  16. end type
  17. type cb_other from uo_imflatbutton within w_rp_owwfjg_in_spt
  18. end type
  19. end forward
  20. global type w_rp_owwfjg_in_spt from w_publ_easyq
  21. string title = "外协收货(外协商)统计表"
  22. event ue_retrieve_info ( )
  23. ddlb_2 ddlb_2
  24. tv_1 tv_1
  25. ddlb_status ddlb_status
  26. ddlb_1 ddlb_1
  27. ddlb_scid ddlb_scid
  28. st_5 st_5
  29. cb_other cb_other
  30. end type
  31. global w_rp_owwfjg_in_spt w_rp_owwfjg_in_spt
  32. type variables
  33. Int cur_mtrlorigin = -1
  34. String ls_handtype = ''
  35. Long cur_flag = -1
  36. Long cur_thflag = -1
  37. long cur_scid_arr[]
  38. end variables
  39. forward prototypes
  40. public function integer wf_hide_col ()
  41. end prototypes
  42. event ue_retrieve_info();Long ll_row
  43. Long ll_mtrlid
  44. ll_row = dw_1.GetRow()
  45. IF ll_row <= 0 THEN
  46. ll_mtrlid = 0
  47. ELSE
  48. ll_mtrlid = dw_1.Object.mtrlid[ll_row]
  49. END IF
  50. IF IsValid(w_mtrl_info) THEN
  51. w_mtrl_info.WindowState = Normal!
  52. w_mtrl_info.ins_mtrlid = ll_mtrlid
  53. w_mtrl_info.wf_retrieve(ll_mtrlid)
  54. END IF
  55. end event
  56. public function integer wf_hide_col ();s_hide_col s_col
  57. if dw_1.dataobject = 'dw_rp_owwfjg_in_spt' then
  58. s_col.col_1 = 'ow_wfjgmx_in_bef_fprice'
  59. s_col.col_2 = 'priceamt'
  60. else
  61. s_col.col_1 = 'amt'
  62. s_col.col_2 = 'price'
  63. s_col.col_3 = 'planamt'
  64. s_col.col_4 = 'u_mtrldef_planprice'
  65. end if
  66. //f_hide_col(121,dw_1,s_col)
  67. f_hide_col(1448,dw_1,s_col)
  68. s_hide_col s_col_mtrlsectype
  69. s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype'
  70. f_hide_col(1308,dw_1,s_col_mtrlsectype)
  71. s_hide_col s_col_zxmtrlmode
  72. s_col_zxmtrlmode.col_1 = 'u_mtrldef_zxmtrlmode'
  73. f_hide_col(1309,dw_1,s_col_zxmtrlmode)
  74. return 1
  75. end function
  76. on w_rp_owwfjg_in_spt.create
  77. int iCurrent
  78. call super::create
  79. this.ddlb_2=create ddlb_2
  80. this.tv_1=create tv_1
  81. this.ddlb_status=create ddlb_status
  82. this.ddlb_1=create ddlb_1
  83. this.ddlb_scid=create ddlb_scid
  84. this.st_5=create st_5
  85. this.cb_other=create cb_other
  86. iCurrent=UpperBound(this.Control)
  87. this.Control[iCurrent+1]=this.ddlb_2
  88. this.Control[iCurrent+2]=this.tv_1
  89. this.Control[iCurrent+3]=this.ddlb_status
  90. this.Control[iCurrent+4]=this.ddlb_1
  91. this.Control[iCurrent+5]=this.ddlb_scid
  92. this.Control[iCurrent+6]=this.st_5
  93. this.Control[iCurrent+7]=this.cb_other
  94. end on
  95. on w_rp_owwfjg_in_spt.destroy
  96. call super::destroy
  97. destroy(this.ddlb_2)
  98. destroy(this.tv_1)
  99. destroy(this.ddlb_status)
  100. destroy(this.ddlb_1)
  101. destroy(this.ddlb_scid)
  102. destroy(this.st_5)
  103. destroy(this.cb_other)
  104. end on
  105. event open;call super::open;tv_1.f_maketree(-1)
  106. wf_hide_col()
  107. IF cbx_loginretr.Checked THEN
  108. cb_1.TriggerEvent(Clicked!)
  109. END IF
  110. end event
  111. event ue_before_open;call super::ue_before_open;if_ue_filter=true
  112. if_ue_sort=true
  113. if_ue_sentdataout=true
  114. end event
  115. event resize;call super::resize;tv_1.height=this.height - dw_1.y - 150
  116. end event
  117. type cb_func from w_publ_easyq`cb_func within w_rp_owwfjg_in_spt
  118. end type
  119. type cb_exit from w_publ_easyq`cb_exit within w_rp_owwfjg_in_spt
  120. integer x = 1477
  121. end type
  122. type cb_2 from w_publ_easyq`cb_2 within w_rp_owwfjg_in_spt
  123. integer x = 1175
  124. integer taborder = 110
  125. boolean bringtotop = true
  126. end type
  127. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_owwfjg_in_spt
  128. integer x = 919
  129. integer taborder = 90
  130. boolean bringtotop = true
  131. end type
  132. type cb_1 from w_publ_easyq`cb_1 within w_rp_owwfjg_in_spt
  133. boolean bringtotop = true
  134. end type
  135. event cb_1::clicked;datetime first_date,end_date
  136. first_date=datetime(date(em_1.text),time(0))
  137. end_date=datetime(date(em_2.text),time('23:59:59'))
  138. f_title_change(dw_1)
  139. dw_1.retrieve(cur_scid_arr,first_date,end_date,cur_flag,ls_handtype,cur_thflag,sys_user_spttype)
  140. end event
  141. type st_3 from w_publ_easyq`st_3 within w_rp_owwfjg_in_spt
  142. integer x = 1266
  143. integer y = 212
  144. end type
  145. type st_4 from w_publ_easyq`st_4 within w_rp_owwfjg_in_spt
  146. integer x = 1970
  147. integer y = 212
  148. end type
  149. type em_1 from w_publ_easyq`em_1 within w_rp_owwfjg_in_spt
  150. integer x = 1458
  151. integer y = 196
  152. integer taborder = 120
  153. end type
  154. type em_2 from w_publ_easyq`em_2 within w_rp_owwfjg_in_spt
  155. integer x = 2075
  156. integer y = 196
  157. integer taborder = 130
  158. end type
  159. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_owwfjg_in_spt
  160. integer x = 1893
  161. integer y = 8
  162. end type
  163. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_owwfjg_in_spt
  164. integer x = 1678
  165. integer y = 8
  166. end type
  167. type dw_1 from w_publ_easyq`dw_1 within w_rp_owwfjg_in_spt
  168. integer x = 805
  169. integer y = 308
  170. integer width = 2400
  171. integer height = 1532
  172. string dataobject = "dw_rp_owwfjg_in_spt"
  173. end type
  174. event dw_1::doubleclicked;String ls_code
  175. Long ll_scid
  176. Int li_thflag
  177. long ll_billtype
  178. IF dw_1.DataObject = 'dw_rp_owwfjg_in_spt' THEN
  179. IF row > 0 THEN
  180. ll_scid = THIS.Object.ow_wfjg_in_scid[row]
  181. ls_code = THIS.Object.ow_wfjg_in_inwarecode[row]
  182. // li_thflag = THIS.Object.ow_wfjg_in_thflag[row]
  183. // ll_billtype = THIS.Object.ow_wfjg_in_billtype[row]
  184. f_open_win(ll_scid,ls_code)
  185. END IF
  186. END IF
  187. end event
  188. event dw_1::rowfocuschanged;call super::rowfocuschanged;IF currentrow <=0 THEN RETURN
  189. this.selectrow(0,false)
  190. this.selectrow(currentrow,true)
  191. PARENT.TriggerEvent('ue_retrieve_info')
  192. end event
  193. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_owwfjg_in_spt
  194. end type
  195. type sle_cust from w_publ_easyq`sle_cust within w_rp_owwfjg_in_spt
  196. end type
  197. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_owwfjg_in_spt
  198. end type
  199. type st_cust from w_publ_easyq`st_cust within w_rp_owwfjg_in_spt
  200. end type
  201. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_owwfjg_in_spt
  202. boolean visible = true
  203. integer x = 1678
  204. end type
  205. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_owwfjg_in_spt
  206. integer x = 1870
  207. end type
  208. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_owwfjg_in_spt
  209. integer x = 2491
  210. end type
  211. type pb_2 from w_publ_easyq`pb_2 within w_rp_owwfjg_in_spt
  212. integer x = 2601
  213. end type
  214. type cb_help from w_publ_easyq`cb_help within w_rp_owwfjg_in_spt
  215. integer x = 1326
  216. end type
  217. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_owwfjg_in_spt
  218. end type
  219. type gb_1 from w_publ_easyq`gb_1 within w_rp_owwfjg_in_spt
  220. end type
  221. type ln_bar from w_publ_easyq`ln_bar within w_rp_owwfjg_in_spt
  222. end type
  223. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_owwfjg_in_spt
  224. end type
  225. type r_bar from w_publ_easyq`r_bar within w_rp_owwfjg_in_spt
  226. integer x = 2066
  227. end type
  228. type ln_1 from w_publ_easyq`ln_1 within w_rp_owwfjg_in_spt
  229. end type
  230. type ln_2 from w_publ_easyq`ln_2 within w_rp_owwfjg_in_spt
  231. end type
  232. type ln_3 from w_publ_easyq`ln_3 within w_rp_owwfjg_in_spt
  233. end type
  234. type ln_4 from w_publ_easyq`ln_4 within w_rp_owwfjg_in_spt
  235. end type
  236. type ddlb_2 from dropdownlistbox within w_rp_owwfjg_in_spt
  237. integer x = 2263
  238. integer y = 40
  239. integer width = 462
  240. integer height = 448
  241. integer taborder = 80
  242. boolean bringtotop = true
  243. integer textsize = -9
  244. integer weight = 400
  245. fontcharset fontcharset = gb2312charset!
  246. fontpitch fontpitch = variable!
  247. string facename = "宋体"
  248. long textcolor = 33554432
  249. string text = "明细表"
  250. boolean sorted = false
  251. boolean vscrollbar = true
  252. string item[] = {"明细表","汇总表"}
  253. borderstyle borderstyle = stylelowered!
  254. end type
  255. event selectionchanged;dw_1.uf_save_profile_layout()
  256. if ddlb_2.text='明细表' then
  257. dw_1.dataobject='dw_rp_owwfjg_in_spt'
  258. else
  259. dw_1.dataobject='dw_rp_owwfjg_in_spt_hz'
  260. end if
  261. dw_1.settransobject(sqlca)
  262. dw_1.ins_INIfile_name = sys_inifilename
  263. dw_1.ins_opemp = publ_operator
  264. dw_1.cardw_empid = sys_empid
  265. dw_1.cur_DataObject = dw_1.DataObject
  266. dw_1.uf_read_profile_layout()
  267. wf_hide_col()
  268. cb_1.triggerevent(clicked!)
  269. end event
  270. type tv_1 from uo_tv_mtrltype within w_rp_owwfjg_in_spt
  271. integer y = 308
  272. integer width = 805
  273. integer height = 1532
  274. integer taborder = 60
  275. boolean bringtotop = true
  276. integer textsize = -9
  277. fontcharset fontcharset = gb2312charset!
  278. fontfamily fontfamily = anyfont!
  279. string facename = "宋体"
  280. end type
  281. event selectionchanged;call super::selectionchanged;ls_handtype = THIS.uo_cur_info.handtype
  282. ls_handtype = ls_handtype + '%'
  283. cb_1.TriggerEvent(clicked!)
  284. end event
  285. type ddlb_status from dropdownlistbox within w_rp_owwfjg_in_spt
  286. integer x = 919
  287. integer y = 196
  288. integer width = 325
  289. integer height = 296
  290. integer taborder = 70
  291. boolean bringtotop = true
  292. integer textsize = -9
  293. integer weight = 400
  294. fontcharset fontcharset = gb2312charset!
  295. fontpitch fontpitch = variable!
  296. string facename = "宋体"
  297. long textcolor = 33554432
  298. string text = "[全部]"
  299. boolean sorted = false
  300. string item[] = {"[全部]","待仓审","已仓审"}
  301. borderstyle borderstyle = stylelowered!
  302. end type
  303. event selectionchanged;IF Index = 1 THEN
  304. cur_flag = -1
  305. ELSEIF Index = 2 THEN
  306. cur_flag = 0
  307. ELSEIF Index = 3 THEN
  308. cur_flag = 1
  309. END IF
  310. cb_1.TriggerEvent(clicked!)
  311. end event
  312. type ddlb_1 from dropdownlistbox within w_rp_owwfjg_in_spt
  313. integer x = 626
  314. integer y = 196
  315. integer width = 283
  316. integer height = 296
  317. integer taborder = 90
  318. boolean bringtotop = true
  319. integer textsize = -9
  320. integer weight = 400
  321. fontcharset fontcharset = gb2312charset!
  322. fontpitch fontpitch = variable!
  323. string facename = "宋体"
  324. long textcolor = 33554432
  325. string text = "[全部]"
  326. boolean sorted = false
  327. string item[] = {"[全部]","收货","返工"}
  328. borderstyle borderstyle = stylelowered!
  329. end type
  330. event selectionchanged;IF Index = 1 THEN
  331. cur_thflag = -1
  332. ELSEIF Index = 2 THEN
  333. cur_thflag = 0
  334. ELSEIF Index = 3 THEN
  335. cur_thflag = 1
  336. END IF
  337. cb_1.TriggerEvent(clicked!)
  338. end event
  339. type ddlb_scid from uo_ddlb_scid within w_rp_owwfjg_in_spt
  340. integer x = 137
  341. integer y = 196
  342. integer width = 480
  343. integer height = 620
  344. integer taborder = 60
  345. boolean bringtotop = true
  346. end type
  347. event constructor;call super::constructor;cur_scid_arr = THIS.uo_scid_arr
  348. end event
  349. event selectionchanged;call super::selectionchanged;
  350. cur_scid_arr = THIS.uo_scid_arr
  351. cb_1.triggerevent(clicked!)
  352. end event
  353. type st_5 from statictext within w_rp_owwfjg_in_spt
  354. integer y = 216
  355. integer width = 128
  356. integer height = 48
  357. boolean bringtotop = true
  358. integer textsize = -9
  359. integer weight = 400
  360. fontcharset fontcharset = gb2312charset!
  361. fontpitch fontpitch = variable!
  362. string facename = "宋体"
  363. long textcolor = 33554432
  364. long backcolor = 134217739
  365. string text = "分部"
  366. alignment alignment = right!
  367. boolean focusrectangle = false
  368. end type
  369. type cb_other from uo_imflatbutton within w_rp_owwfjg_in_spt
  370. integer x = 558
  371. integer width = 361
  372. integer height = 164
  373. integer taborder = 50
  374. boolean bringtotop = true
  375. string text = "物料相关查询"
  376. string normalpicname = "imexport.BMP"
  377. integer picsize = 16
  378. toolbaralignment pic_align = alignattop!
  379. boolean border = false
  380. end type
  381. event clicked;call super::clicked;Long ll_row
  382. ll_row = dw_1.GetRow()
  383. IF ll_row <= 0 THEN
  384. MessageBox('提示','请选择物料',information!,OK!)
  385. RETURN
  386. END IF
  387. Long ll_mtrlid
  388. ll_mtrlid = dw_1.Object.mtrlid[ll_row]
  389. IF IsValid(w_mtrl_info) THEN
  390. w_mtrl_info.WindowState = Normal!
  391. w_mtrl_info.ins_mtrlid = ll_mtrlid
  392. w_mtrl_info.wf_retrieve(ll_mtrlid)
  393. ELSE
  394. OpenWithParm(w_mtrl_info,ll_mtrlid)
  395. END IF
  396. end event