w_rp_ware_outware.srw 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501
  1. $PBExportHeader$w_rp_ware_outware.srw
  2. forward
  3. global type w_rp_ware_outware from w_publ_easyq
  4. end type
  5. type ddlb_1 from dropdownlistbox within w_rp_ware_outware
  6. end type
  7. type ddlb_2 from dropdownlistbox within w_rp_ware_outware
  8. end type
  9. type ddlb_3 from uo_ddlb_storageid within w_rp_ware_outware
  10. end type
  11. type cb_other from uo_imflatbutton within w_rp_ware_outware
  12. end type
  13. type tv_1 from uo_tv_mtrltype within w_rp_ware_outware
  14. end type
  15. type ddlb_4 from uo_ddlb_status within w_rp_ware_outware
  16. end type
  17. end forward
  18. global type w_rp_ware_outware from w_publ_easyq
  19. string title = "出仓统计表"
  20. event ue_retrieve_info ( )
  21. ddlb_1 ddlb_1
  22. ddlb_2 ddlb_2
  23. ddlb_3 ddlb_3
  24. cb_other cb_other
  25. tv_1 tv_1
  26. ddlb_4 ddlb_4
  27. end type
  28. global w_rp_ware_outware w_rp_ware_outware
  29. type variables
  30. Long cur_billtype = 0
  31. Long cur_storageid_arr[]
  32. Int cur_mtrlorigin = -1
  33. String ls_handtype = ''
  34. string ls_mtrltype = ''
  35. long cur_flag = -1
  36. end variables
  37. forward prototypes
  38. public subroutine wf_hidecol ()
  39. end prototypes
  40. event ue_retrieve_info();Long ll_row
  41. Long ll_mtrlid
  42. ll_row = dw_1.GetRow()
  43. IF ll_row <= 0 THEN
  44. ll_mtrlid = 0
  45. ELSE
  46. ll_mtrlid = dw_1.Object.mtrlid[ll_row]
  47. END IF
  48. IF IsValid(w_mtrl_info) THEN
  49. w_mtrl_info.WindowState = Normal!
  50. w_mtrl_info.ins_mtrlid = ll_mtrlid
  51. w_mtrl_info.wf_retrieve(ll_mtrlid)
  52. END IF
  53. end event
  54. public subroutine wf_hidecol ();s_hide_col s_col,s_col2
  55. IF dw_1.DataObject = 'dw_rp_ware_outware' THEN
  56. s_col.col_1 = 'amt'
  57. s_col.col_2 = 'cost'
  58. s_col.col_3 = 'u_outwaremx_costamt'
  59. s_col.col_4 = 'u_outwaremx_ware_price'
  60. s_col2.col_1 = 'u_mtrldef_planprice'
  61. s_col2.col_2 = 'planamt'
  62. ELSEIF dw_1.DataObject = 'dw_rp_ware_outware_hz' THEN
  63. s_col.col_1 = 'price'
  64. s_col.col_2 = 'amt'
  65. s_col.col_3 = 'cost'
  66. s_col.col_4 = 'costamt'
  67. s_col2.col_1 = 'u_mtrldef_planprice'
  68. s_col2.col_2 = 'planamt'
  69. ELSEIF dw_1.DataObject = 'dw_rp_ware_outware_hz_mtrltype' THEN
  70. s_col.col_1 = 'amt'
  71. s_col.col_2 = 'costamt'
  72. s_col2.col_1 = 'planamt'
  73. ELSE
  74. s_col.col_1 = 'amt'
  75. s_col.col_2 = 'costamt'
  76. s_col2.col_1 = 'planamt'
  77. END IF
  78. f_hide_col(490,dw_1,s_col) //隐藏出仓成本价
  79. f_hide_col(1451,dw_1,s_col2) //隐藏计划价
  80. s_hide_col s_col_mtrlsectype
  81. s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype'
  82. f_hide_col(1308,dw_1,s_col_mtrlsectype)
  83. s_hide_col s_col_zxmtrlmode
  84. s_col_zxmtrlmode.col_1 = 'u_mtrldef_zxmtrlmode'
  85. f_hide_col(1309,dw_1,s_col_zxmtrlmode)
  86. end subroutine
  87. on w_rp_ware_outware.create
  88. int iCurrent
  89. call super::create
  90. this.ddlb_1=create ddlb_1
  91. this.ddlb_2=create ddlb_2
  92. this.ddlb_3=create ddlb_3
  93. this.cb_other=create cb_other
  94. this.tv_1=create tv_1
  95. this.ddlb_4=create ddlb_4
  96. iCurrent=UpperBound(this.Control)
  97. this.Control[iCurrent+1]=this.ddlb_1
  98. this.Control[iCurrent+2]=this.ddlb_2
  99. this.Control[iCurrent+3]=this.ddlb_3
  100. this.Control[iCurrent+4]=this.cb_other
  101. this.Control[iCurrent+5]=this.tv_1
  102. this.Control[iCurrent+6]=this.ddlb_4
  103. end on
  104. on w_rp_ware_outware.destroy
  105. call super::destroy
  106. destroy(this.ddlb_1)
  107. destroy(this.ddlb_2)
  108. destroy(this.ddlb_3)
  109. destroy(this.cb_other)
  110. destroy(this.tv_1)
  111. destroy(this.ddlb_4)
  112. end on
  113. event resize;call super::resize;tv_1.height=dw_1.height
  114. end event
  115. type cb_func from w_publ_easyq`cb_func within w_rp_ware_outware
  116. end type
  117. type cb_exit from w_publ_easyq`cb_exit within w_rp_ware_outware
  118. integer x = 1477
  119. end type
  120. type cb_2 from w_publ_easyq`cb_2 within w_rp_ware_outware
  121. integer x = 1175
  122. boolean bringtotop = true
  123. end type
  124. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_ware_outware
  125. integer x = 919
  126. boolean bringtotop = true
  127. end type
  128. type cb_1 from w_publ_easyq`cb_1 within w_rp_ware_outware
  129. boolean bringtotop = true
  130. end type
  131. event cb_1::clicked;DateTime first_date,end_date
  132. first_date = DateTime(Date(em_1.Text),Time(0))
  133. end_date = DateTime(Date(em_2.Text),Time('23:59:59'))
  134. //f_title_change(dw_1)
  135. IF ddlb_2.Text = '分类汇总表' THEN
  136. dw_1.Retrieve(cur_storageid_arr,first_date,end_date,cur_flag,cur_billtype,ls_handtype,ls_mtrltype,cur_mtrlorigin)
  137. ELSE
  138. dw_1.Retrieve(cur_storageid_arr,first_date,end_date,cur_flag,cur_billtype,ls_handtype,cur_mtrlorigin)
  139. END IF
  140. end event
  141. type st_3 from w_publ_easyq`st_3 within w_rp_ware_outware
  142. integer x = 1120
  143. integer y = 204
  144. end type
  145. type st_4 from w_publ_easyq`st_4 within w_rp_ware_outware
  146. integer x = 1801
  147. integer y = 204
  148. end type
  149. type em_1 from w_publ_easyq`em_1 within w_rp_ware_outware
  150. integer x = 1307
  151. integer y = 188
  152. integer taborder = 120
  153. end type
  154. type em_2 from w_publ_easyq`em_2 within w_rp_ware_outware
  155. integer x = 1897
  156. integer y = 188
  157. integer taborder = 130
  158. end type
  159. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_ware_outware
  160. integer x = 2066
  161. integer y = 4
  162. end type
  163. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_ware_outware
  164. integer x = 1856
  165. integer y = 8
  166. end type
  167. type dw_1 from w_publ_easyq`dw_1 within w_rp_ware_outware
  168. integer x = 805
  169. integer y = 300
  170. integer width = 2386
  171. integer height = 1808
  172. string dataobject = "dw_rp_ware_outware"
  173. end type
  174. event dw_1::doubleclicked;call super::doubleclicked;IF dw_1.DataObject = 'dw_rp_ware_outware' THEN
  175. IF row > 0 THEN
  176. String ls_code,ls_relcode
  177. Long ll_scid
  178. // int li_thflag,li_billtype
  179. ll_scid = THIS.Object.u_outware_scid[row]
  180. ls_code = THIS.Object.u_outware_outwarecode[row]
  181. // ls_relcode = THIS.Object.u_outware_part[row]
  182. // li_billtype = THIS.Object.u_outware_billtype[row]
  183. // CHOOSE CASE li_billtype
  184. // CASE 4,12,15
  185. // f_open_win(ll_scid,ls_relcode)
  186. // CASE ELSE
  187. f_open_win(ll_scid,ls_code)
  188. // END CHOOSE
  189. END IF
  190. END IF
  191. end event
  192. event dw_1::rowfocuschanged;call super::rowfocuschanged;IF ddlb_2.Text = '明细表' OR ddlb_2.Text = '汇总表' THEN
  193. PARENT.TriggerEvent('ue_retrieve_info')
  194. END IF
  195. end event
  196. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_ware_outware
  197. end type
  198. type sle_cust from w_publ_easyq`sle_cust within w_rp_ware_outware
  199. end type
  200. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_ware_outware
  201. end type
  202. type st_cust from w_publ_easyq`st_cust within w_rp_ware_outware
  203. end type
  204. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_ware_outware
  205. integer x = 1856
  206. integer y = 100
  207. end type
  208. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_ware_outware
  209. integer x = 1719
  210. integer y = 188
  211. end type
  212. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_ware_outware
  213. integer x = 2309
  214. integer y = 188
  215. end type
  216. type pb_2 from w_publ_easyq`pb_2 within w_rp_ware_outware
  217. integer x = 2418
  218. integer y = 188
  219. end type
  220. type cb_help from w_publ_easyq`cb_help within w_rp_ware_outware
  221. integer x = 1326
  222. end type
  223. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_ware_outware
  224. end type
  225. type gb_1 from w_publ_easyq`gb_1 within w_rp_ware_outware
  226. end type
  227. type ln_bar from w_publ_easyq`ln_bar within w_rp_ware_outware
  228. end type
  229. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_ware_outware
  230. end type
  231. type r_bar from w_publ_easyq`r_bar within w_rp_ware_outware
  232. integer x = 2501
  233. end type
  234. type ln_1 from w_publ_easyq`ln_1 within w_rp_ware_outware
  235. end type
  236. type ln_2 from w_publ_easyq`ln_2 within w_rp_ware_outware
  237. end type
  238. type ln_3 from w_publ_easyq`ln_3 within w_rp_ware_outware
  239. boolean visible = false
  240. end type
  241. type ln_4 from w_publ_easyq`ln_4 within w_rp_ware_outware
  242. boolean visible = false
  243. end type
  244. type ddlb_1 from dropdownlistbox within w_rp_ware_outware
  245. integer x = 2866
  246. integer y = 196
  247. integer width = 681
  248. integer height = 816
  249. integer taborder = 90
  250. boolean bringtotop = true
  251. integer textsize = -9
  252. integer weight = 400
  253. fontcharset fontcharset = gb2312charset!
  254. fontpitch fontpitch = variable!
  255. string facename = "宋体"
  256. long textcolor = 33554432
  257. string text = "全 部[0]"
  258. boolean sorted = false
  259. boolean vscrollbar = true
  260. string item[] = {"全 部[0]","现货销售[1]","领 料[3]","外加工出仓[4]","其 它[8]","盘 亏[9]","调拨出仓[12]","拆装出仓[15]"}
  261. borderstyle borderstyle = stylelowered!
  262. end type
  263. event selectionchanged;cur_billtype=long(Mid ( ddlb_1.text,pos(ddlb_1.text,'[') + 1,len(ddlb_1.text) - pos(ddlb_1.text,'[') - 1 ))
  264. cb_1.triggerevent(clicked!)
  265. end event
  266. event constructor;Long Index
  267. String ls_txt
  268. ls_txt = f_ProfileString(sys_empid, String(Parent.ClassName()), "dft_billtype",'全 部[0]')
  269. Index = This.FindItem(ls_txt, 0)
  270. IF Index > 0 THEN
  271. // This.SelectItem(Index)
  272. this.text = ls_txt
  273. cur_billtype=long(Mid ( this.text,pos(this.text,'[') + 1,len(this.text) - pos(this.text,'[') - 1 ))
  274. END IF
  275. end event
  276. event destructor;f_SetProfileString(sys_empid, String(Parent.ClassName()), "dft_billtype", This.Text)
  277. end event
  278. type ddlb_2 from dropdownlistbox within w_rp_ware_outware
  279. integer x = 2866
  280. integer y = 32
  281. integer width = 681
  282. integer height = 448
  283. integer taborder = 70
  284. boolean bringtotop = true
  285. integer textsize = -9
  286. integer weight = 400
  287. fontcharset fontcharset = gb2312charset!
  288. fontpitch fontpitch = variable!
  289. string facename = "宋体"
  290. long textcolor = 33554432
  291. string text = "明细表"
  292. boolean sorted = false
  293. boolean vscrollbar = true
  294. string item[] = {"明细表","汇总表","分类汇总表","出仓类别统计表"}
  295. borderstyle borderstyle = stylelowered!
  296. end type
  297. event selectionchanged;dw_1.uf_save_profile_layout()
  298. IF ddlb_2.Text = '明细表' THEN
  299. dw_1.DataObject = 'dw_rp_ware_outware'
  300. ELSEIF ddlb_2.Text = '汇总表' THEN
  301. dw_1.DataObject = 'dw_rp_ware_outware_hz'
  302. ELSEIF ddlb_2.Text = '出仓类别统计表' THEN
  303. dw_1.DataObject = 'dw_rp_ware_outware_hz_type'
  304. ELSE
  305. dw_1.DataObject = 'dw_rp_ware_outware_hz_mtrltype'
  306. END IF
  307. wf_replacedw()
  308. //dw_1.SetTransObject(sqlca)
  309. //
  310. //dw_1.ins_INIfile_name = sys_inifilename
  311. //dw_1.ins_opemp = publ_operator
  312. //dw_1.cardw_empid = sys_empid
  313. //dw_1.cur_DataObject = dw_1.DataObject
  314. //
  315. //dw_1.uf_read_profile_layout()
  316. //
  317. //wf_hide_col()
  318. cb_1.TriggerEvent(Clicked!)
  319. end event
  320. type ddlb_3 from uo_ddlb_storageid within w_rp_ware_outware
  321. integer y = 192
  322. integer width = 1093
  323. integer height = 1108
  324. integer taborder = 130
  325. boolean bringtotop = true
  326. end type
  327. event constructor;call super::constructor;cur_storageid_arr = this.uo_storageid_arr
  328. end event
  329. event selectionchanged;call super::selectionchanged;cur_storageid_arr = this.uo_storageid_arr
  330. cb_1.triggerevent(clicked!)
  331. end event
  332. type cb_other from uo_imflatbutton within w_rp_ware_outware
  333. integer x = 558
  334. integer width = 361
  335. integer height = 164
  336. integer taborder = 140
  337. boolean bringtotop = true
  338. string text = "物料相关查询"
  339. string normalpicname = "imexport.BMP"
  340. integer picsize = 16
  341. toolbaralignment pic_align = alignattop!
  342. boolean border = false
  343. end type
  344. event clicked;call super::clicked;Long ll_row
  345. ll_row = dw_1.GetRow()
  346. IF ll_row <= 0 THEN
  347. MessageBox('提示','请选择物料',information!,OK!)
  348. RETURN
  349. END IF
  350. Long ll_mtrlid
  351. IF ddlb_2.Text = '明细表' THEN
  352. ll_mtrlid = dw_1.Object.u_outwaremx_mtrlid[ll_row]
  353. ELSEIF ddlb_2.Text = '汇总表' THEN
  354. ll_mtrlid = dw_1.Object.u_mtrldef_mtrlid[ll_row]
  355. ELSE
  356. RETURN
  357. END IF
  358. IF IsValid(w_mtrl_info) THEN
  359. w_mtrl_info.WindowState = Normal!
  360. w_mtrl_info.ins_mtrlid = ll_mtrlid
  361. w_mtrl_info.wf_retrieve(ll_mtrlid)
  362. ELSE
  363. OpenWithParm(w_mtrl_info,ll_mtrlid)
  364. END IF
  365. end event
  366. type tv_1 from uo_tv_mtrltype within w_rp_ware_outware
  367. integer y = 300
  368. integer width = 800
  369. integer height = 1808
  370. integer taborder = 90
  371. boolean bringtotop = true
  372. integer textsize = -9
  373. fontcharset fontcharset = gb2312charset!
  374. fontfamily fontfamily = anyfont!
  375. string facename = "宋体"
  376. end type
  377. event selectionchanged;call super::selectionchanged;IF ddlb_2.Text = '分类汇总表' THEN
  378. ls_handtype = THIS.uo_cur_info.handtype
  379. ls_mtrltype = THIS.uo_cur_info.mtrltype
  380. IF ls_handtype <> '' THEN
  381. ls_mtrltype = ls_handtype+'%'
  382. ELSE
  383. ls_mtrltype = ""
  384. END IF
  385. ELSE
  386. ls_handtype = THIS.uo_cur_info.handtype
  387. ls_handtype = ls_handtype + '%'
  388. END IF
  389. cb_1.TriggerEvent(Clicked!)
  390. end event
  391. type ddlb_4 from uo_ddlb_status within w_rp_ware_outware
  392. integer x = 2523
  393. integer y = 196
  394. integer width = 338
  395. integer taborder = 130
  396. boolean bringtotop = true
  397. end type
  398. event selectionchanged;call super::selectionchanged;cb_1.TriggerEvent(Clicked!)
  399. end event
  400. event uof_getvalue;call super::uof_getvalue;cur_flag = this.uo_status
  401. end event