w_rp_ware_inware.srw 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509
  1. $PBExportHeader$w_rp_ware_inware.srw
  2. forward
  3. global type w_rp_ware_inware from w_publ_easyq
  4. end type
  5. type ddlb_1 from dropdownlistbox within w_rp_ware_inware
  6. end type
  7. type ddlb_2 from dropdownlistbox within w_rp_ware_inware
  8. end type
  9. type ddlb_3 from uo_ddlb_storageid within w_rp_ware_inware
  10. end type
  11. type cb_other from uo_imflatbutton within w_rp_ware_inware
  12. end type
  13. type tv_1 from uo_tv_mtrltype within w_rp_ware_inware
  14. end type
  15. type ddlb_status from uo_ddlb_status within w_rp_ware_inware
  16. end type
  17. end forward
  18. global type w_rp_ware_inware 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_status ddlb_status
  27. end type
  28. global w_rp_ware_inware w_rp_ware_inware
  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_inware' THEN
  56. s_col.col_1 = 'u_inwaremx_price'
  57. s_col.col_2 = 'priceamt'
  58. s_col.col_3 = 'planamt'
  59. s_col.col_4 = 'u_mtrldef_planprice'
  60. ELSEIF dw_1.DataObject = 'dw_rp_ware_inware_hz' THEN
  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. ELSE
  66. s_col.col_1 = 'priceamt'
  67. s_col.col_2 = 'planamt'
  68. END IF
  69. f_hide_col(1449,dw_1,s_col)
  70. IF dw_1.DataObject = 'dw_rp_ware_inware' THEN
  71. s_col2.col_1 = 'u_inwaremx_cost'
  72. s_col2.col_2 = 'u_inwaremx_costamt'
  73. ELSEIF dw_1.DataObject = 'dw_rp_ware_inware_hz' THEN
  74. s_col2.col_1 = 'cost'
  75. s_col2.col_2 = 'costamt'
  76. ELSE
  77. s_col2.col_1 = 'costamt'
  78. END IF
  79. f_hide_col(123,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. s_hide_col s_col_cusname
  87. s_col_cusname.col_1 = 'u_cust_cuscode'
  88. s_col_cusname.col_2 = 'u_cust_name'
  89. f_hide_col(1306,dw_1,s_col_cusname)
  90. RETURN
  91. end subroutine
  92. on w_rp_ware_inware.create
  93. int iCurrent
  94. call super::create
  95. this.ddlb_1=create ddlb_1
  96. this.ddlb_2=create ddlb_2
  97. this.ddlb_3=create ddlb_3
  98. this.cb_other=create cb_other
  99. this.tv_1=create tv_1
  100. this.ddlb_status=create ddlb_status
  101. iCurrent=UpperBound(this.Control)
  102. this.Control[iCurrent+1]=this.ddlb_1
  103. this.Control[iCurrent+2]=this.ddlb_2
  104. this.Control[iCurrent+3]=this.ddlb_3
  105. this.Control[iCurrent+4]=this.cb_other
  106. this.Control[iCurrent+5]=this.tv_1
  107. this.Control[iCurrent+6]=this.ddlb_status
  108. end on
  109. on w_rp_ware_inware.destroy
  110. call super::destroy
  111. destroy(this.ddlb_1)
  112. destroy(this.ddlb_2)
  113. destroy(this.ddlb_3)
  114. destroy(this.cb_other)
  115. destroy(this.tv_1)
  116. destroy(this.ddlb_status)
  117. end on
  118. event resize;call super::resize;tv_1.height=this.height - dw_1.y - 115
  119. end event
  120. event ue_before_openretrieve;call super::ue_before_openretrieve;//tv_1.f_maketree(-1)
  121. //wf_hide_col()
  122. end event
  123. type cb_func from w_publ_easyq`cb_func within w_rp_ware_inware
  124. end type
  125. type cb_exit from w_publ_easyq`cb_exit within w_rp_ware_inware
  126. integer x = 1477
  127. end type
  128. type cb_2 from w_publ_easyq`cb_2 within w_rp_ware_inware
  129. integer x = 1175
  130. boolean bringtotop = true
  131. end type
  132. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_ware_inware
  133. integer x = 919
  134. boolean bringtotop = true
  135. end type
  136. type cb_1 from w_publ_easyq`cb_1 within w_rp_ware_inware
  137. boolean bringtotop = true
  138. end type
  139. event cb_1::clicked;DateTime first_date,end_date
  140. first_date = DateTime(Date(em_1.Text),Time(0))
  141. end_date = DateTime(Date(em_2.Text),Time('23:59:59'))
  142. //f_title_change(dw_1)
  143. IF ddlb_2.Text = '分类汇总表' THEN
  144. dw_1.Retrieve(cur_storageid_arr,first_date,end_date,cur_flag,cur_billtype,ls_handtype,ls_mtrltype,cur_mtrlorigin)
  145. ELSE
  146. dw_1.Retrieve(cur_storageid_arr,first_date,end_date,cur_flag,cur_billtype,ls_handtype,cur_mtrlorigin)
  147. END IF
  148. //wf_hide_col()
  149. end event
  150. type st_3 from w_publ_easyq`st_3 within w_rp_ware_inware
  151. integer x = 1079
  152. end type
  153. type st_4 from w_publ_easyq`st_4 within w_rp_ware_inware
  154. integer x = 1381
  155. integer y = 204
  156. end type
  157. type em_1 from w_publ_easyq`em_1 within w_rp_ware_inware
  158. integer x = 1271
  159. integer taborder = 120
  160. end type
  161. type em_2 from w_publ_easyq`em_2 within w_rp_ware_inware
  162. integer x = 1874
  163. integer taborder = 130
  164. end type
  165. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_ware_inware
  166. integer x = 1984
  167. integer y = 8
  168. end type
  169. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_ware_inware
  170. integer x = 1774
  171. integer y = 12
  172. end type
  173. type dw_1 from w_publ_easyq`dw_1 within w_rp_ware_inware
  174. integer x = 805
  175. integer y = 300
  176. integer width = 2400
  177. integer height = 1808
  178. string dataobject = "dw_rp_ware_inware"
  179. end type
  180. event dw_1::doubleclicked;call super::doubleclicked;IF dw_1.DataObject = 'dw_rp_ware_inware' THEN
  181. IF row > 0 THEN
  182. String ls_code,ls_relcode
  183. Long ll_scid
  184. // int li_thflag,li_billtype
  185. ll_scid = THIS.Object.u_inware_scid[row]
  186. ls_code = THIS.Object.u_inware_inwarecode[row]
  187. // ls_relcode = THIS.Object.u_inware_part[row]
  188. // li_billtype = THIS.Object.u_inware_billtype[row]
  189. // CHOOSE CASE li_billtype
  190. // CASE 4,12,15
  191. // f_open_win(ll_scid,ls_relcode)
  192. // CASE ELSE
  193. f_open_win(ll_scid,ls_code)
  194. // END CHOOSE
  195. END IF
  196. END IF
  197. end event
  198. event dw_1::rowfocuschanged;call super::rowfocuschanged;IF currentrow <= 0 THEN RETURN
  199. THIS.SelectRow(0,FALSE)
  200. THIS.SelectRow(currentrow,TRUE)
  201. IF ddlb_2.Text = '明细表' THEN
  202. PARENT.TriggerEvent('ue_retrieve_info')
  203. END IF
  204. end event
  205. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_ware_inware
  206. end type
  207. type sle_cust from w_publ_easyq`sle_cust within w_rp_ware_inware
  208. end type
  209. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_ware_inware
  210. end type
  211. type st_cust from w_publ_easyq`st_cust within w_rp_ware_inware
  212. end type
  213. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_ware_inware
  214. integer x = 1774
  215. integer y = 100
  216. end type
  217. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_ware_inware
  218. integer x = 1687
  219. end type
  220. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_ware_inware
  221. integer x = 2286
  222. end type
  223. type pb_2 from w_publ_easyq`pb_2 within w_rp_ware_inware
  224. integer x = 2395
  225. end type
  226. type cb_help from w_publ_easyq`cb_help within w_rp_ware_inware
  227. integer x = 1326
  228. end type
  229. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_ware_inware
  230. end type
  231. type gb_1 from w_publ_easyq`gb_1 within w_rp_ware_inware
  232. end type
  233. type ln_bar from w_publ_easyq`ln_bar within w_rp_ware_inware
  234. end type
  235. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_ware_inware
  236. end type
  237. type r_bar from w_publ_easyq`r_bar within w_rp_ware_inware
  238. integer x = 2469
  239. end type
  240. type ln_1 from w_publ_easyq`ln_1 within w_rp_ware_inware
  241. end type
  242. type ln_2 from w_publ_easyq`ln_2 within w_rp_ware_inware
  243. end type
  244. type ln_3 from w_publ_easyq`ln_3 within w_rp_ware_inware
  245. boolean visible = false
  246. end type
  247. type ln_4 from w_publ_easyq`ln_4 within w_rp_ware_inware
  248. boolean visible = false
  249. end type
  250. type ddlb_1 from dropdownlistbox within w_rp_ware_inware
  251. integer x = 2857
  252. integer y = 196
  253. integer width = 622
  254. integer height = 752
  255. integer taborder = 80
  256. boolean bringtotop = true
  257. integer textsize = -9
  258. integer weight = 400
  259. fontcharset fontcharset = gb2312charset!
  260. fontpitch fontpitch = variable!
  261. string facename = "宋体"
  262. long textcolor = 33554432
  263. string text = "全 部[0]"
  264. boolean sorted = false
  265. boolean vscrollbar = true
  266. string item[] = {"全 部[0]","采购入库[1]","成品入库[3]","外加工入库[4]","其 它[8]","盘 盈[9]","调拨入仓[12]","拆装进仓[15]","加工收料进仓[20]"}
  267. borderstyle borderstyle = stylelowered!
  268. end type
  269. event selectionchanged;cur_billtype=long(Mid ( ddlb_1.text,pos(ddlb_1.text,'[') + 1,len(ddlb_1.text) - pos(ddlb_1.text,'[') - 1 ))
  270. cb_1.triggerevent(clicked!)
  271. end event
  272. event destructor;
  273. f_SetProfileString(sys_empid, String(Parent.ClassName()), "dft_billtype", This.Text)
  274. end event
  275. event constructor;Long Index
  276. String ls_txt
  277. ls_txt = f_ProfileString(sys_empid, String(Parent.ClassName()), "dft_billtype",'全 部[0]')
  278. Index = This.FindItem(ls_txt, 0)
  279. IF Index > 0 THEN
  280. // This.SelectItem(Index)
  281. this.text = ls_txt
  282. cur_billtype=long(Mid ( this.text,pos(this.text,'[') + 1,len(this.text) - pos(this.text,'[') - 1 ))
  283. END IF
  284. end event
  285. type ddlb_2 from dropdownlistbox within w_rp_ware_inware
  286. integer x = 2853
  287. integer y = 40
  288. integer width = 622
  289. integer height = 448
  290. integer taborder = 80
  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. boolean vscrollbar = true
  301. string item[] = {"明细表","汇总表","分类汇总表"}
  302. borderstyle borderstyle = stylelowered!
  303. end type
  304. event selectionchanged;dw_1.uf_save_profile_layout()
  305. IF ddlb_2.Text = '明细表' THEN
  306. dw_1.DataObject = 'dw_rp_ware_inware'
  307. ELSEIF ddlb_2.Text = '汇总表' THEN
  308. dw_1.DataObject = 'dw_rp_ware_inware_hz'
  309. ELSE
  310. dw_1.DataObject = 'dw_rp_ware_inware_hz_mtrltype'
  311. END IF
  312. wf_replacedw()
  313. cb_1.TriggerEvent(Clicked!)
  314. end event
  315. type ddlb_3 from uo_ddlb_storageid within w_rp_ware_inware
  316. integer y = 192
  317. integer width = 1056
  318. integer height = 1108
  319. integer taborder = 130
  320. boolean bringtotop = true
  321. end type
  322. event constructor;call super::constructor;cur_storageid_arr = this.uo_storageid_arr
  323. end event
  324. event selectionchanged;call super::selectionchanged;cur_storageid_arr = this.uo_storageid_arr
  325. cb_1.triggerevent(clicked!)
  326. end event
  327. type cb_other from uo_imflatbutton within w_rp_ware_inware
  328. integer x = 558
  329. integer width = 361
  330. integer height = 164
  331. integer taborder = 130
  332. boolean bringtotop = true
  333. string text = "物料相关查询"
  334. string normalpicname = "imexport.BMP"
  335. integer picsize = 16
  336. toolbaralignment pic_align = alignattop!
  337. boolean border = false
  338. end type
  339. event clicked;call super::clicked;Long ll_row
  340. ll_row = dw_1.GetRow()
  341. IF ll_row <= 0 THEN
  342. MessageBox('提示','请选择物料',information!,OK!)
  343. RETURN
  344. END IF
  345. Long ll_mtrlid
  346. IF ddlb_2.Text = '明细表' THEN
  347. ll_mtrlid = dw_1.Object.mtrlid[ll_row]
  348. ELSEIF ddlb_2.Text = '汇总表' THEN
  349. ll_mtrlid = dw_1.Object.u_mtrldef_mtrlid[ll_row]
  350. ELSE
  351. RETURN
  352. END IF
  353. IF IsValid(w_mtrl_info) THEN
  354. w_mtrl_info.WindowState = Normal!
  355. w_mtrl_info.ins_mtrlid = ll_mtrlid
  356. w_mtrl_info.wf_retrieve(ll_mtrlid)
  357. ELSE
  358. OpenWithParm(w_mtrl_info,ll_mtrlid)
  359. END IF
  360. end event
  361. type tv_1 from uo_tv_mtrltype within w_rp_ware_inware
  362. integer y = 300
  363. integer width = 800
  364. integer height = 1808
  365. integer taborder = 130
  366. boolean bringtotop = true
  367. integer textsize = -9
  368. fontcharset fontcharset = gb2312charset!
  369. fontfamily fontfamily = anyfont!
  370. string facename = "宋体"
  371. end type
  372. event selectionchanged;call super::selectionchanged;
  373. IF ddlb_2.Text = '分类汇总表' THEN
  374. ls_handtype = THIS.uo_cur_info.handtype
  375. ls_mtrltype = THIS.uo_cur_info.mtrltype
  376. IF ls_handtype <> '' THEN
  377. ls_mtrltype = ls_handtype+'%'
  378. ELSE
  379. ls_mtrltype = ""
  380. END IF
  381. ELSE
  382. ls_handtype = THIS.uo_cur_info.handtype
  383. IF ls_handtype <> '' THEN
  384. ls_mtrltype = ls_handtype+'%'
  385. ELSE
  386. ls_mtrltype = ""
  387. END IF
  388. ls_handtype = ls_handtype + '%'
  389. END IF
  390. cb_1.TriggerEvent(Clicked!)
  391. end event
  392. type ddlb_status from uo_ddlb_status within w_rp_ware_inware
  393. integer x = 2510
  394. integer y = 196
  395. integer width = 338
  396. integer taborder = 90
  397. boolean bringtotop = true
  398. end type
  399. event selectionchanged;call super::selectionchanged;cb_1.TriggerEvent(Clicked!)
  400. end event
  401. event uof_getvalue;call super::uof_getvalue;cur_flag = this.uo_status
  402. end event