w_rp_ware_warebalc_cmpl.srw 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170
  1. $PBExportHeader$w_rp_ware_warebalc_cmpl.srw
  2. forward
  3. global type w_rp_ware_warebalc_cmpl from w_publ_easyq
  4. end type
  5. type ddlb_2 from dropdownlistbox within w_rp_ware_warebalc_cmpl
  6. end type
  7. type ddlb_storageid from uo_ddlb_storageid within w_rp_ware_warebalc_cmpl
  8. end type
  9. type cb_other from uo_imflatbutton within w_rp_ware_warebalc_cmpl
  10. end type
  11. type tv_1 from uo_tv_mtrltype within w_rp_ware_warebalc_cmpl
  12. end type
  13. type cbx_inout from checkbox within w_rp_ware_warebalc_cmpl
  14. end type
  15. type tab_1 from tab within w_rp_ware_warebalc_cmpl
  16. end type
  17. type tabpage_1 from userobject within tab_1
  18. end type
  19. type st_6 from statictext within tabpage_1
  20. end type
  21. type st_7 from statictext within tabpage_1
  22. end type
  23. type ddlb_1 from dropdownlistbox within tabpage_1
  24. end type
  25. type cb_iomx_retrieve from uo_imflatbutton within tabpage_1
  26. end type
  27. type em_4 from editmask within tabpage_1
  28. end type
  29. type em_3 from editmask within tabpage_1
  30. end type
  31. type dw_inout from u_dw_rbtnfilter within tabpage_1
  32. end type
  33. type tabpage_1 from userobject within tab_1
  34. st_6 st_6
  35. st_7 st_7
  36. ddlb_1 ddlb_1
  37. cb_iomx_retrieve cb_iomx_retrieve
  38. em_4 em_4
  39. em_3 em_3
  40. dw_inout dw_inout
  41. end type
  42. type tabpage_2 from userobject within tab_1
  43. end type
  44. type dw_out_noaudit from u_dw_rbtnfilter within tabpage_2
  45. end type
  46. type tabpage_2 from userobject within tab_1
  47. dw_out_noaudit dw_out_noaudit
  48. end type
  49. type tabpage_3 from userobject within tab_1
  50. end type
  51. type dw_3 from u_dw_rbtnfilter within tabpage_3
  52. end type
  53. type dw_4 from u_dw_rbtnfilter within tabpage_3
  54. end type
  55. type cb_3 from uo_imflatbutton within tabpage_3
  56. end type
  57. type tabpage_3 from userobject within tab_1
  58. dw_3 dw_3
  59. dw_4 dw_4
  60. cb_3 cb_3
  61. end type
  62. type tab_1 from tab within w_rp_ware_warebalc_cmpl
  63. tabpage_1 tabpage_1
  64. tabpage_2 tabpage_2
  65. tabpage_3 tabpage_3
  66. end type
  67. end forward
  68. global type w_rp_ware_warebalc_cmpl from w_publ_easyq
  69. string title = "仓库推算结存表"
  70. event ue_retrieve_info ( )
  71. event ue_retrieve_inoutmx ( )
  72. event ue_getbalcdateint ( )
  73. ddlb_2 ddlb_2
  74. ddlb_storageid ddlb_storageid
  75. cb_other cb_other
  76. tv_1 tv_1
  77. cbx_inout cbx_inout
  78. tab_1 tab_1
  79. end type
  80. global w_rp_ware_warebalc_cmpl w_rp_ware_warebalc_cmpl
  81. type variables
  82. Long cur_storageid = -1
  83. long cur_storageid_arr[]
  84. DateTime balcdate //结存日期
  85. DateTime balcdate_end //结存日期end
  86. //Int cur_mtrlorigin = -1 //当前显示物料来源
  87. String ls_handtype = ''
  88. string ls_mtrltype = ''
  89. long viewtype = 0
  90. integer cur_billtype_in = -1
  91. integer cur_billtype_out = -1
  92. Long balcdateint
  93. end variables
  94. forward prototypes
  95. public subroutine wf_hidecol ()
  96. public function window getparentwindow ()
  97. public subroutine wf_retrieve_allmtrlware ()
  98. public subroutine wf_retrieve_allmtrlware_mx ()
  99. end prototypes
  100. event ue_retrieve_info();Long ll_row
  101. Long ll_mtrlid
  102. ll_row = dw_1.GetRow()
  103. IF ll_row <= 0 THEN
  104. ll_mtrlid = 0
  105. ELSE
  106. ll_mtrlid = dw_1.Object.mtrlid[ll_row]
  107. END IF
  108. IF IsValid(w_mtrl_info) THEN
  109. w_mtrl_info.WindowState = Normal!
  110. w_mtrl_info.ins_mtrlid = ll_mtrlid
  111. w_mtrl_info.wf_retrieve(ll_mtrlid)
  112. END IF
  113. end event
  114. event ue_retrieve_inoutmx();Long ll_row
  115. Long ll_storageid[]
  116. long ll_mtrlid
  117. String ls_status,ls_woodcode,ls_pcode
  118. String ls_plancode,ls_mtrlcuscode,ls_location
  119. DateTime ld_fdate,ld_edate,ld_showsale_data
  120. ll_row = dw_1.GetRow()
  121. tab_1.tabpage_1.dw_inout.setredraw(false)
  122. tab_1.tabpage_1.dw_inout.setfilter('')
  123. tab_1.tabpage_1.dw_inout.filter()
  124. IF ll_row <= 0 THEN
  125. tab_1.tabpage_1.dw_inout.Reset()
  126. ELSE
  127. ld_fdate = DateTime(Date(tab_1.tabpage_1.em_3.Text),Time(0))
  128. ld_edate = DateTime(Date(tab_1.tabpage_1.em_4.Text),Time('23:59:59'))
  129. IF ld_fdate < sys_showsaledata_mindt THEN
  130. ld_showsale_data = sys_showsaledata_mindt
  131. ELSE
  132. ld_showsale_data = ld_fdate
  133. END IF
  134. ll_storageid = cur_storageid_arr
  135. ll_mtrlid = dw_1.Object.u_mtrldef_mtrlid[ll_row]
  136. IF viewtype = 2 THEN
  137. ls_status = dw_1.Object.uv_warebalc_view_status[ll_row]
  138. ls_woodcode = dw_1.Object.uv_warebalc_view_woodcode[ll_row]
  139. ls_pcode = dw_1.Object.uv_warebalc_view_pcode[ll_row]
  140. ELSE
  141. IF balcdateint = 0 THEN
  142. IF viewtype = 0 THEN
  143. ls_status = dw_1.Object.uv_warebalc_view_status[ll_row]
  144. ls_woodcode = dw_1.Object.uv_warebalc_view_woodcode[ll_row]
  145. ls_pcode = dw_1.Object.uv_warebalc_view_pcode[ll_row]
  146. ELSEIF viewtype = 1 THEN
  147. ls_status = dw_1.Object.uv_warebalc_view_cusid_status[ll_row]
  148. ls_woodcode = dw_1.Object.uv_warebalc_view_cusid_woodcode[ll_row]
  149. ls_pcode = dw_1.Object.uv_warebalc_view_cusid_pcode[ll_row]
  150. END IF
  151. ELSE
  152. IF viewtype = 0 THEN
  153. ls_status = dw_1.Object.status[ll_row]
  154. ls_woodcode = dw_1.Object.woodcode[ll_row]
  155. ls_pcode = dw_1.Object.pcode[ll_row]
  156. ELSEIF viewtype = 1 THEN
  157. ls_status = dw_1.Object.uv_warebalc_view_1_cusid_status[ll_row]
  158. ls_woodcode = dw_1.Object.uv_warebalc_view_1_cusid_woodcode[ll_row]
  159. ls_pcode = dw_1.Object.uv_warebalc_view_1_cusid_pcode[ll_row]
  160. END IF
  161. END IF
  162. END IF
  163. tab_1.tabpage_1.dw_inout.Retrieve(ll_storageid,ll_mtrlid,ld_fdate,ld_edate,ls_status,ls_woodcode,ls_pcode,ld_showsale_data, cur_billtype_in, cur_billtype_out)
  164. END IF
  165. tab_1.tabpage_1.dw_inout.setredraw(true)
  166. end event
  167. event ue_getbalcdateint();DateTime first_date,end_date
  168. first_date = DateTime(Date(em_1.Text),Time(0))
  169. end_date = DateTime(Date(em_2.Text),Time('23:59:59'))
  170. SELECT top 1 isnull(min(balcdateint),0)
  171. INTO :balcdateint
  172. FROM u_warebalc
  173. WHERE balcdate >= :end_date
  174. And storageid = :cur_storageid;
  175. IF sqlca.SQLCode <> 0 THEN
  176. MessageBox('错误','查询结存日期失败!',stopsign!,ok!)
  177. RETURN
  178. END IF
  179. DELETE u_parm_batchtake ;
  180. IF sqlca.SQLCode <> 0 THEN
  181. ROLLBACK ;
  182. MessageBox('错误',"因网络或其它原因导致操作失败,请重试!"+sqlca.SQLErrText,information!,ok!)
  183. RETURN
  184. END IF
  185. INSERT Into u_parm_batchtake (cusid,firstdate,enddate,balcdateint) Values (0,:first_date,:end_date,:balcdateint) ;
  186. IF sqlca.SQLCode <> 0 THEN
  187. ROLLBACK ;
  188. MessageBox('错误',"因网络或其它原因导致操作失败,请重试!"+sqlca.SQLErrText,information!,ok!)
  189. RETURN
  190. END IF
  191. COMMIT ;
  192. end event
  193. public subroutine wf_hidecol ();s_hide_col s_col
  194. s_col.col_1 = 'bgamt'
  195. s_col.col_2 = 'uv_warebalc_view_incamt'
  196. s_col.col_3 = 'uv_warebalc_view_desamt'
  197. s_col.col_4 = 'uv_warebalc_view_balcamt'
  198. f_hide_col(123,dw_1,s_col)
  199. s_hide_col s_col_mtrlsectype
  200. s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype'
  201. f_hide_col(1308,dw_1,s_col_mtrlsectype)
  202. s_hide_col s_col_zxmtrlmode
  203. s_col_zxmtrlmode.col_1 = 'u_mtrldef_zxmtrlmode'
  204. f_hide_col(1309,dw_1,s_col_zxmtrlmode)
  205. end subroutine
  206. public function window getparentwindow ();return this
  207. end function
  208. public subroutine wf_retrieve_allmtrlware ();
  209. end subroutine
  210. public subroutine wf_retrieve_allmtrlware_mx ();
  211. end subroutine
  212. on w_rp_ware_warebalc_cmpl.create
  213. int iCurrent
  214. call super::create
  215. this.ddlb_2=create ddlb_2
  216. this.ddlb_storageid=create ddlb_storageid
  217. this.cb_other=create cb_other
  218. this.tv_1=create tv_1
  219. this.cbx_inout=create cbx_inout
  220. this.tab_1=create tab_1
  221. iCurrent=UpperBound(this.Control)
  222. this.Control[iCurrent+1]=this.ddlb_2
  223. this.Control[iCurrent+2]=this.ddlb_storageid
  224. this.Control[iCurrent+3]=this.cb_other
  225. this.Control[iCurrent+4]=this.tv_1
  226. this.Control[iCurrent+5]=this.cbx_inout
  227. this.Control[iCurrent+6]=this.tab_1
  228. end on
  229. on w_rp_ware_warebalc_cmpl.destroy
  230. call super::destroy
  231. destroy(this.ddlb_2)
  232. destroy(this.ddlb_storageid)
  233. destroy(this.cb_other)
  234. destroy(this.tv_1)
  235. destroy(this.cbx_inout)
  236. destroy(this.tab_1)
  237. end on
  238. event resize;call super::resize;tv_1.height=this.height - dw_1.y - 115
  239. IF cbx_inout.Checked THEN
  240. tab_1.Visible = TRUE
  241. dw_1.Width = THIS.Width - dw_1.X - 40
  242. dw_1.Height = THIS.Height - dw_1.Y - tab_1.Height - 150
  243. tv_1.Height = THIS.Height - tv_1.Y - 150
  244. tab_1.Width = THIS.Width - tab_1.X - 40
  245. tab_1.Y = dw_1.Y + dw_1.Height + 10
  246. tab_1.X = dw_1.X
  247. tab_1.tabpage_1.dw_inout.Height = tab_1.tabpage_1.Height - tab_1.tabpage_1.dw_inout.Y - 40
  248. tab_1.tabpage_1.dw_inout.Width = tab_1.tabpage_1.Width - tab_1.tabpage_1.dw_inout.X - 40
  249. tab_1.tabpage_2.dw_out_noaudit.Height = tab_1.tabpage_2.Height - tab_1.tabpage_2.dw_out_noaudit.Y - 40
  250. tab_1.tabpage_2.dw_out_noaudit.Width = tab_1.tabpage_2.Width - tab_1.tabpage_2.dw_out_noaudit.X - 40
  251. tab_1.tabpage_3.dw_3.Width = (tab_1.tabpage_3.Width - tab_1.tabpage_3.dw_3.X - 40) / 2
  252. tab_1.tabpage_3.dw_3.Height = tab_1.tabpage_3.Height - tab_1.tabpage_3.dw_3.Y - 40
  253. tab_1.tabpage_3.dw_4.x=tab_1.tabpage_3.dw_3.X + tab_1.tabpage_3.dw_3.Width + 10
  254. tab_1.tabpage_3.dw_4.Width = (tab_1.tabpage_3.Width - tab_1.tabpage_3.dw_3.X - 40) / 2 - 30
  255. tab_1.tabpage_3.dw_4.Height = tab_1.tabpage_3.Height - tab_1.tabpage_3.dw_4.Y - 40
  256. ELSE
  257. dw_1.Width = THIS.Width - dw_1.X - 40
  258. dw_1.Height = THIS.Height - dw_1.Y - 150
  259. tv_1.Height = THIS.Height - tv_1.Y - 150
  260. tab_1.Visible = FALSE
  261. END IF
  262. end event
  263. event ue_before_openretrieve;call super::ue_before_openretrieve;//tv_1.f_maketree(-1)
  264. //wf_hide_col()
  265. end event
  266. event open;call super::open;tab_1.tabpage_2.visible = false
  267. tab_1.tabpage_3.visible = false
  268. end event
  269. type cb_func from w_publ_easyq`cb_func within w_rp_ware_warebalc_cmpl
  270. end type
  271. type cb_exit from w_publ_easyq`cb_exit within w_rp_ware_warebalc_cmpl
  272. integer x = 1477
  273. end type
  274. type cb_2 from w_publ_easyq`cb_2 within w_rp_ware_warebalc_cmpl
  275. integer x = 1175
  276. boolean bringtotop = true
  277. end type
  278. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_ware_warebalc_cmpl
  279. integer x = 919
  280. boolean bringtotop = true
  281. end type
  282. type cb_1 from w_publ_easyq`cb_1 within w_rp_ware_warebalc_cmpl
  283. event ue_balcdateint ( )
  284. boolean bringtotop = true
  285. end type
  286. event cb_1::clicked;Parent.TriggerEvent("ue_getbalcdateint")
  287. // 与balcdateint 有关
  288. dw_1.uf_save_profile_layout()
  289. IF viewtype = 2 THEN
  290. dw_1.DataObject = 'dw_rp_ware_warebalc_cmpl_2'
  291. ELSEIF viewtype = 3 THEN
  292. dw_1.DataObject = 'dw_rp_dsr_ware_warebalc_his_cg'
  293. ELSE
  294. IF balcdateint = 0 THEN
  295. IF viewtype = 0 THEN
  296. dw_1.DataObject = 'dw_rp_ware_warebalc_cmpl'
  297. ELSEIF viewtype = 1 THEN
  298. dw_1.DataObject = 'dw_rp_ware_warebalc_cmpl_cusid'
  299. END IF
  300. ELSE
  301. IF viewtype = 0 THEN
  302. dw_1.DataObject = 'dw_rp_ware_warebalc_cmpl_1'
  303. ELSEIF viewtype = 1 THEN
  304. dw_1.DataObject = 'dw_rp_ware_warebalc_cmpl_1_cusid'
  305. END IF
  306. END IF
  307. END IF
  308. dw_1.uf_read_profile_layout()
  309. wf_replacedw()
  310. dw_1.Retrieve(cur_storageid_arr,ls_handtype)
  311. IF cur_storageid = -1 THEN
  312. dw_1.Object.Title.Text = '仓库推算结存表'
  313. ELSE
  314. dw_1.Object.Title.Text = Trim(Left(ddlb_storageid.Text,Pos(ddlb_storageid.Text,'[') - 1))+'-推算结存表'
  315. END IF
  316. dw_1.SetRedraw(True)
  317. end event
  318. type st_3 from w_publ_easyq`st_3 within w_rp_ware_warebalc_cmpl
  319. integer x = 690
  320. integer y = 204
  321. end type
  322. type st_4 from w_publ_easyq`st_4 within w_rp_ware_warebalc_cmpl
  323. integer x = 1381
  324. integer y = 204
  325. end type
  326. type em_1 from w_publ_easyq`em_1 within w_rp_ware_warebalc_cmpl
  327. integer x = 882
  328. integer y = 188
  329. integer taborder = 120
  330. end type
  331. type em_2 from w_publ_easyq`em_2 within w_rp_ware_warebalc_cmpl
  332. integer x = 1486
  333. integer y = 188
  334. integer taborder = 130
  335. end type
  336. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_ware_warebalc_cmpl
  337. integer x = 1984
  338. integer y = 12
  339. end type
  340. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_ware_warebalc_cmpl
  341. integer x = 1774
  342. integer y = 12
  343. end type
  344. type dw_1 from w_publ_easyq`dw_1 within w_rp_ware_warebalc_cmpl
  345. integer x = 805
  346. integer y = 300
  347. integer width = 2400
  348. integer height = 1808
  349. string dataobject = "dw_rp_ware_warebalc_cmpl"
  350. end type
  351. event dw_1::doubleclicked;call super::doubleclicked;IF dw_1.DataObject = 'dw_rp_ware_inware' THEN
  352. IF row > 0 THEN
  353. String ls_code,ls_relcode
  354. Long ll_scid
  355. int li_thflag,li_billtype
  356. ll_scid = THIS.Object.u_inware_scid[row]
  357. ls_code = THIS.Object.u_inware_inwarecode[row]
  358. ls_relcode = THIS.Object.u_inware_part[row]
  359. li_billtype = THIS.Object.u_inware_billtype[row]
  360. CHOOSE CASE li_billtype
  361. CASE 4,12,15
  362. f_open_win(ll_scid,ls_relcode)
  363. CASE ELSE
  364. f_open_win(ll_scid,ls_code)
  365. END CHOOSE
  366. END IF
  367. END IF
  368. end event
  369. event dw_1::rowfocuschanged;call super::rowfocuschanged;IF currentrow <= 0 THEN RETURN
  370. THIS.SelectRow(0,FALSE)
  371. THIS.SelectRow(currentrow,TRUE)
  372. IF ddlb_2.Text = '明细表' THEN
  373. PARENT.TriggerEvent('ue_retrieve_info')
  374. END IF
  375. IF cbx_inout.Checked THEN
  376. Parent.TriggerEvent('ue_retrieve_inoutmx')
  377. wf_retrieve_allmtrlware()
  378. END IF
  379. end event
  380. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_ware_warebalc_cmpl
  381. end type
  382. type sle_cust from w_publ_easyq`sle_cust within w_rp_ware_warebalc_cmpl
  383. end type
  384. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_ware_warebalc_cmpl
  385. end type
  386. type st_cust from w_publ_easyq`st_cust within w_rp_ware_warebalc_cmpl
  387. end type
  388. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_ware_warebalc_cmpl
  389. integer x = 1774
  390. integer y = 100
  391. end type
  392. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_ware_warebalc_cmpl
  393. integer x = 1298
  394. integer y = 188
  395. end type
  396. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_ware_warebalc_cmpl
  397. integer x = 1897
  398. integer y = 188
  399. end type
  400. type pb_2 from w_publ_easyq`pb_2 within w_rp_ware_warebalc_cmpl
  401. integer x = 2007
  402. integer y = 188
  403. end type
  404. type cb_help from w_publ_easyq`cb_help within w_rp_ware_warebalc_cmpl
  405. integer x = 1330
  406. end type
  407. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_ware_warebalc_cmpl
  408. end type
  409. type gb_1 from w_publ_easyq`gb_1 within w_rp_ware_warebalc_cmpl
  410. end type
  411. type ln_bar from w_publ_easyq`ln_bar within w_rp_ware_warebalc_cmpl
  412. end type
  413. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_ware_warebalc_cmpl
  414. end type
  415. type r_bar from w_publ_easyq`r_bar within w_rp_ware_warebalc_cmpl
  416. integer x = 2469
  417. end type
  418. type ln_1 from w_publ_easyq`ln_1 within w_rp_ware_warebalc_cmpl
  419. end type
  420. type ln_2 from w_publ_easyq`ln_2 within w_rp_ware_warebalc_cmpl
  421. end type
  422. type ln_3 from w_publ_easyq`ln_3 within w_rp_ware_warebalc_cmpl
  423. boolean visible = false
  424. end type
  425. type ln_4 from w_publ_easyq`ln_4 within w_rp_ware_warebalc_cmpl
  426. boolean visible = false
  427. end type
  428. type ddlb_2 from dropdownlistbox within w_rp_ware_warebalc_cmpl
  429. integer x = 2464
  430. integer y = 36
  431. integer width = 622
  432. integer height = 448
  433. integer taborder = 80
  434. boolean bringtotop = true
  435. integer textsize = -9
  436. integer weight = 400
  437. fontcharset fontcharset = gb2312charset!
  438. fontpitch fontpitch = variable!
  439. string facename = "宋体"
  440. long textcolor = 33554432
  441. string text = "按配置"
  442. boolean sorted = false
  443. boolean vscrollbar = true
  444. string item[] = {"按配置","按客户配置","按配置[带计划价]"}
  445. borderstyle borderstyle = stylelowered!
  446. end type
  447. event selectionchanged;
  448. dw_1.uf_save_profile_layout()
  449. IF THIS.Text = '按配置' THEN
  450. viewtype = 0
  451. ELSEIF THIS.Text = '按客户配置' THEN
  452. viewtype = 1
  453. ELSEIF THIS.Text = '按配置[带计划价]' THEN
  454. viewtype = 2
  455. END IF
  456. cb_1.TriggerEvent(Clicked!)
  457. end event
  458. type ddlb_storageid from uo_ddlb_storageid within w_rp_ware_warebalc_cmpl
  459. integer y = 192
  460. integer width = 681
  461. integer height = 1108
  462. integer taborder = 130
  463. boolean bringtotop = true
  464. end type
  465. event constructor;call super::constructor;cur_storageid = this.uo_storageid
  466. cur_storageid_arr = this.uo_storageid_arr
  467. end event
  468. event selectionchanged;call super::selectionchanged;cur_storageid = this.uo_storageid
  469. cur_storageid_arr = this.uo_storageid_arr
  470. cb_1.triggerevent(clicked!)
  471. end event
  472. type cb_other from uo_imflatbutton within w_rp_ware_warebalc_cmpl
  473. integer x = 562
  474. integer width = 361
  475. integer height = 164
  476. integer taborder = 130
  477. boolean bringtotop = true
  478. string text = "物料相关查询"
  479. string normalpicname = "imexport.BMP"
  480. integer picsize = 16
  481. toolbaralignment pic_align = alignattop!
  482. boolean border = false
  483. end type
  484. event clicked;call super::clicked;Long ll_row
  485. ll_row = dw_1.GetRow()
  486. IF ll_row <= 0 THEN
  487. MessageBox('提示','请选择物料',information!,OK!)
  488. RETURN
  489. END IF
  490. Long ll_mtrlid
  491. ll_mtrlid = dw_1.Object.u_mtrldef_mtrlid[ll_row]
  492. IF IsValid(w_mtrl_info) THEN
  493. w_mtrl_info.WindowState = Normal!
  494. w_mtrl_info.ins_mtrlid = ll_mtrlid
  495. w_mtrl_info.wf_retrieve(ll_mtrlid)
  496. ELSE
  497. OpenWithParm(w_mtrl_info,ll_mtrlid)
  498. END IF
  499. end event
  500. type tv_1 from uo_tv_mtrltype within w_rp_ware_warebalc_cmpl
  501. integer x = 5
  502. integer y = 300
  503. integer width = 800
  504. integer height = 1808
  505. integer taborder = 130
  506. boolean bringtotop = true
  507. integer textsize = -9
  508. fontcharset fontcharset = gb2312charset!
  509. fontfamily fontfamily = anyfont!
  510. string facename = "宋体"
  511. end type
  512. event selectionchanged;call super::selectionchanged;
  513. ls_handtype = THIS.uo_cur_info.handtype
  514. ls_mtrltype = THIS.uo_cur_info.mtrltype
  515. IF ls_handtype <> '' THEN
  516. ls_mtrltype = '%'+ls_handtype+'%'
  517. ls_handtype = ls_handtype+'%'
  518. ELSE
  519. ls_mtrltype = ""
  520. END IF
  521. cb_1.TriggerEvent(Clicked!)
  522. end event
  523. type cbx_inout from checkbox within w_rp_ware_warebalc_cmpl
  524. integer x = 2222
  525. integer y = 220
  526. integer width = 402
  527. integer height = 60
  528. boolean bringtotop = true
  529. integer textsize = -9
  530. integer weight = 400
  531. fontcharset fontcharset = gb2312charset!
  532. fontpitch fontpitch = variable!
  533. string facename = "宋体"
  534. long textcolor = 33554432
  535. long backcolor = 134217739
  536. string text = "显示明细"
  537. end type
  538. event clicked;Int if_inout
  539. IF This.Checked THEN
  540. if_inout = 1
  541. ELSE
  542. if_inout = 0
  543. END IF
  544. //f_SetProfileString (sys_empid,dw_1.DataObject, "if_inout", String(if_inout))
  545. Parent.TriggerEvent(Resize!)
  546. Parent.TriggerEvent("ue_getbalcdateint")
  547. Parent.TriggerEvent("ue_retrieve_inoutmx")
  548. end event
  549. event constructor;Int if_inout
  550. //if_inout = Integer(f_ProfileString (sys_empid,dw_1.DataObject, "if_inout", '0'))
  551. IF if_inout = 0 THEN
  552. This.Checked = False
  553. ELSE
  554. This.Checked = True
  555. END IF
  556. end event
  557. type tab_1 from tab within w_rp_ware_warebalc_cmpl
  558. event create ( )
  559. event destroy ( )
  560. integer x = 786
  561. integer y = 1228
  562. integer width = 2286
  563. integer height = 1056
  564. integer taborder = 70
  565. boolean bringtotop = true
  566. integer textsize = -9
  567. integer weight = 400
  568. fontcharset fontcharset = gb2312charset!
  569. fontpitch fontpitch = variable!
  570. string facename = "宋体"
  571. long backcolor = 134217739
  572. boolean raggedright = true
  573. boolean focusonbuttondown = true
  574. integer selectedtab = 1
  575. tabpage_1 tabpage_1
  576. tabpage_2 tabpage_2
  577. tabpage_3 tabpage_3
  578. end type
  579. on tab_1.create
  580. this.tabpage_1=create tabpage_1
  581. this.tabpage_2=create tabpage_2
  582. this.tabpage_3=create tabpage_3
  583. this.Control[]={this.tabpage_1,&
  584. this.tabpage_2,&
  585. this.tabpage_3}
  586. end on
  587. on tab_1.destroy
  588. destroy(this.tabpage_1)
  589. destroy(this.tabpage_2)
  590. destroy(this.tabpage_3)
  591. end on
  592. type tabpage_1 from userobject within tab_1
  593. event create ( )
  594. event destroy ( )
  595. integer x = 18
  596. integer y = 96
  597. integer width = 2249
  598. integer height = 944
  599. long backcolor = 134217739
  600. string text = "进出明细"
  601. long tabtextcolor = 33554432
  602. long tabbackcolor = 134217739
  603. long picturemaskcolor = 536870912
  604. st_6 st_6
  605. st_7 st_7
  606. ddlb_1 ddlb_1
  607. cb_iomx_retrieve cb_iomx_retrieve
  608. em_4 em_4
  609. em_3 em_3
  610. dw_inout dw_inout
  611. end type
  612. on tabpage_1.create
  613. this.st_6=create st_6
  614. this.st_7=create st_7
  615. this.ddlb_1=create ddlb_1
  616. this.cb_iomx_retrieve=create cb_iomx_retrieve
  617. this.em_4=create em_4
  618. this.em_3=create em_3
  619. this.dw_inout=create dw_inout
  620. this.Control[]={this.st_6,&
  621. this.st_7,&
  622. this.ddlb_1,&
  623. this.cb_iomx_retrieve,&
  624. this.em_4,&
  625. this.em_3,&
  626. this.dw_inout}
  627. end on
  628. on tabpage_1.destroy
  629. destroy(this.st_6)
  630. destroy(this.st_7)
  631. destroy(this.ddlb_1)
  632. destroy(this.cb_iomx_retrieve)
  633. destroy(this.em_4)
  634. destroy(this.em_3)
  635. destroy(this.dw_inout)
  636. end on
  637. type st_6 from statictext within tabpage_1
  638. integer x = 631
  639. integer y = 20
  640. integer width = 73
  641. integer height = 48
  642. integer textsize = -9
  643. integer weight = 400
  644. fontcharset fontcharset = gb2312charset!
  645. fontpitch fontpitch = variable!
  646. string facename = "宋体"
  647. long textcolor = 33554432
  648. long backcolor = 134217739
  649. string text = "至"
  650. boolean focusrectangle = false
  651. end type
  652. type st_7 from statictext within tabpage_1
  653. integer x = 9
  654. integer y = 20
  655. integer width = 219
  656. integer height = 48
  657. integer textsize = -9
  658. integer weight = 400
  659. fontcharset fontcharset = gb2312charset!
  660. fontpitch fontpitch = variable!
  661. string facename = "宋体"
  662. long textcolor = 33554432
  663. long backcolor = 134217739
  664. string text = "日期从:"
  665. boolean focusrectangle = false
  666. end type
  667. type ddlb_1 from dropdownlistbox within tabpage_1
  668. integer x = 1381
  669. integer y = 4
  670. integer width = 827
  671. integer height = 976
  672. integer taborder = 50
  673. integer textsize = -9
  674. integer weight = 400
  675. fontcharset fontcharset = gb2312charset!
  676. fontpitch fontpitch = variable!
  677. string facename = "宋体"
  678. long textcolor = 33554432
  679. string text = "全 部[0]"
  680. boolean sorted = false
  681. boolean vscrollbar = true
  682. string item[] = {"全 部[0]","全部进仓[0]","全部出仓{0}","采购进仓[1]","生产进仓[3]","外协进仓[4]","其它进仓[8]","盘盈进仓[9]","调拨进仓[12]","拆装进仓[15]","来料加工收料进仓[20]","库存配置调整单[22]","销售出仓{1}","领料出仓{3}","外协仓库出仓{4}","其它出仓{8}","盘亏出仓{9}","扣费品出仓{10}","调拨出仓{12}","拆装出仓{15}"}
  683. borderstyle borderstyle = stylelowered!
  684. end type
  685. event selectionchanged;string ls_billtype
  686. choose case index
  687. case 1
  688. cur_billtype_in = -1
  689. cur_billtype_out = -1
  690. case 2
  691. cur_billtype_in = -1
  692. cur_billtype_out = 0
  693. case 3
  694. cur_billtype_in = 0
  695. cur_billtype_out = -1
  696. case else
  697. ls_billtype = Mid ( this.text,pos(this.text,'[') + 1,len(this.text) - pos(this.text,'[') - 1 )
  698. if isnumber(ls_billtype) then
  699. cur_billtype_in=long(ls_billtype)
  700. else
  701. cur_billtype_in = 0
  702. end if
  703. ls_billtype = Mid ( this.text,pos(this.text,'{') + 1,len(this.text) - pos(this.text,'{') - 1 )
  704. if isnumber(ls_billtype) then
  705. cur_billtype_out=long(ls_billtype)
  706. else
  707. cur_billtype_out = 0
  708. end if
  709. end choose
  710. cb_iomx_retrieve.triggerevent(clicked!)
  711. end event
  712. type cb_iomx_retrieve from uo_imflatbutton within tabpage_1
  713. integer x = 1134
  714. integer y = 4
  715. integer width = 215
  716. integer height = 84
  717. integer taborder = 100
  718. string text = "刷新"
  719. integer picsize = 16
  720. end type
  721. event clicked;call super::clicked;getparentwindow().triggerevent("ue_retrieve_inoutmx")
  722. end event
  723. type em_4 from editmask within tabpage_1
  724. integer x = 704
  725. integer y = 4
  726. integer width = 402
  727. integer height = 84
  728. integer taborder = 100
  729. integer textsize = -9
  730. integer weight = 400
  731. fontcharset fontcharset = gb2312charset!
  732. fontpitch fontpitch = variable!
  733. string facename = "宋体"
  734. long textcolor = 33554432
  735. string text = "none"
  736. borderstyle borderstyle = stylelowered!
  737. maskdatatype maskdatatype = datemask!
  738. string mask = "yyyy-mm-dd"
  739. boolean spin = true
  740. end type
  741. event constructor;this.Text = String(Today(),'YYYY-MM-DD')
  742. end event
  743. type em_3 from editmask within tabpage_1
  744. integer x = 224
  745. integer y = 4
  746. integer width = 402
  747. integer height = 84
  748. integer taborder = 100
  749. integer textsize = -9
  750. integer weight = 400
  751. fontcharset fontcharset = gb2312charset!
  752. fontpitch fontpitch = variable!
  753. string facename = "宋体"
  754. long textcolor = 33554432
  755. string text = "none"
  756. borderstyle borderstyle = stylelowered!
  757. maskdatatype maskdatatype = datemask!
  758. string mask = "yyyy-mm-dd"
  759. boolean spin = true
  760. end type
  761. event constructor;this.Text = String(Today(),'YYYY-MM')+'-01'
  762. end event
  763. type dw_inout from u_dw_rbtnfilter within tabpage_1
  764. integer y = 92
  765. integer taborder = 40
  766. string dataobject = "dw_rp_ware_mtrlware_inoutmx_2"
  767. boolean hscrollbar = true
  768. boolean vscrollbar = true
  769. boolean hsplitscroll = true
  770. boolean rbutton_filter_use = true
  771. boolean rbutton_setposition_use = true
  772. boolean titleclick_sort_use = true
  773. end type
  774. event clicked;call super::clicked;IF row > 0 THEN
  775. This.SelectRow(0, False)
  776. This.SetRow(row)
  777. This.SelectRow(row,True)
  778. END IF
  779. end event
  780. event doubleclicked;call super::doubleclicked;IF row > 0 THEN
  781. String ls_code,ls_relcode,arg_msg
  782. Long ll_scid
  783. Int li_thflag,li_billtype
  784. ll_scid = This.Object.u_outware_scid[row]
  785. ls_code = This.Object.code[row]
  786. IF f_open_check(ll_scid,ls_code,arg_msg) = 0 THEN
  787. MessageBox('提示',arg_msg,information!,OK!)
  788. RETURN
  789. END IF
  790. f_open_win(ll_scid,ls_code)
  791. END IF
  792. end event
  793. type tabpage_2 from userobject within tab_1
  794. event create ( )
  795. event destroy ( )
  796. boolean visible = false
  797. integer x = 18
  798. integer y = 96
  799. integer width = 2249
  800. integer height = 944
  801. long backcolor = 134217739
  802. string text = "未审明细"
  803. long tabtextcolor = 33554432
  804. long tabbackcolor = 134217739
  805. long picturemaskcolor = 536870912
  806. dw_out_noaudit dw_out_noaudit
  807. end type
  808. on tabpage_2.create
  809. this.dw_out_noaudit=create dw_out_noaudit
  810. this.Control[]={this.dw_out_noaudit}
  811. end on
  812. on tabpage_2.destroy
  813. destroy(this.dw_out_noaudit)
  814. end on
  815. type dw_out_noaudit from u_dw_rbtnfilter within tabpage_2
  816. string dataobject = "dw_rp_ware_mtrlware_out_noaudit"
  817. boolean hscrollbar = true
  818. boolean vscrollbar = true
  819. boolean hsplitscroll = true
  820. boolean rbutton_filter_use = true
  821. boolean rbutton_setposition_use = true
  822. boolean titleclick_sort_use = true
  823. end type
  824. event clicked;call super::clicked;IF row > 0 THEN
  825. This.SelectRow(0, False)
  826. This.SetRow(row)
  827. This.SelectRow(row,True)
  828. END IF
  829. end event
  830. event doubleclicked;call super::doubleclicked;IF row > 0 THEN
  831. String ls_code,ls_relcode
  832. Long ll_scid
  833. Int li_thflag,li_billtype
  834. ll_scid = This.Object.u_outware_scid[row]
  835. ls_code = This.Object.u_outware_outwarecode[row]
  836. f_open_win(ll_scid,ls_code)
  837. END IF
  838. end event
  839. type tabpage_3 from userobject within tab_1
  840. event create ( )
  841. event destroy ( )
  842. boolean visible = false
  843. integer x = 18
  844. integer y = 96
  845. integer width = 2249
  846. integer height = 944
  847. long backcolor = 134217739
  848. string text = "进仓批明细"
  849. long tabtextcolor = 33554432
  850. long tabbackcolor = 134217739
  851. long picturemaskcolor = 536870912
  852. dw_3 dw_3
  853. dw_4 dw_4
  854. cb_3 cb_3
  855. end type
  856. on tabpage_3.create
  857. this.dw_3=create dw_3
  858. this.dw_4=create dw_4
  859. this.cb_3=create cb_3
  860. this.Control[]={this.dw_3,&
  861. this.dw_4,&
  862. this.cb_3}
  863. end on
  864. on tabpage_3.destroy
  865. destroy(this.dw_3)
  866. destroy(this.dw_4)
  867. destroy(this.cb_3)
  868. end on
  869. type dw_3 from u_dw_rbtnfilter within tabpage_3
  870. integer y = 92
  871. integer height = 604
  872. integer taborder = 50
  873. boolean titlebar = true
  874. string title = "进仓成本明细(先进先出法)"
  875. string dataobject = "dw_rp_ware_mtrlware_dw3_allmtrlware"
  876. boolean controlmenu = true
  877. boolean minbox = true
  878. boolean maxbox = true
  879. boolean hscrollbar = true
  880. boolean vscrollbar = true
  881. boolean livescroll = false
  882. boolean rbutton_filter_use = true
  883. boolean rbutton_setposition_use = true
  884. boolean titleclick_sort_use = true
  885. end type
  886. event clicked;call super::clicked;IF row > 0 THEN
  887. This.SelectRow(0,False)
  888. This.SelectRow(row,True)
  889. This.SetRow(row)
  890. wf_retrieve_allmtrlware_mx()
  891. END IF
  892. end event
  893. event doubleclicked;call super::doubleclicked;IF row > 0 THEN
  894. String ls_code
  895. Long ll_scid
  896. ll_scid = THIS.Object.scid[row]
  897. ls_code = THIS.Object.u_mtrlware_inmx_inwarecode[row]
  898. f_open_win(ll_scid,ls_code)
  899. END IF
  900. end event
  901. type dw_4 from u_dw_rbtnfilter within tabpage_3
  902. integer x = 1033
  903. integer y = 100
  904. integer height = 596
  905. integer taborder = 70
  906. boolean titlebar = true
  907. string title = "明细库存 占用明细(先进先出法)"
  908. string dataobject = "dw_rp_ware_mtrlware_dw4_allmtrlware_mx"
  909. boolean controlmenu = true
  910. boolean minbox = true
  911. boolean maxbox = true
  912. boolean hscrollbar = true
  913. boolean vscrollbar = true
  914. boolean livescroll = false
  915. boolean rbutton_filter_use = true
  916. boolean rbutton_setposition_use = true
  917. boolean titleclick_sort_use = true
  918. end type
  919. event clicked;call super::clicked;IF row > 0 THEN
  920. This.SelectRow(0, False)
  921. This.SetRow(row)
  922. This.SelectRow(row,True)
  923. END IF
  924. end event
  925. event doubleclicked;call super::doubleclicked;IF row > 0 THEN
  926. String ls_code,ls_relcode
  927. Long ll_scid
  928. Int li_thflag,li_billtype
  929. long ll_row
  930. ll_row = dw_1.GetRow()
  931. IF ll_row = 0 THEN RETURN
  932. ll_scid =dw_1 .Object.u_mtrlware_scid[ll_row]
  933. ls_code = This.Object.outwarecode[row]
  934. f_open_win(ll_scid,ls_code)
  935. END IF
  936. end event
  937. type cb_3 from uo_imflatbutton within tabpage_3
  938. integer x = 23
  939. integer width = 215
  940. integer height = 84
  941. integer taborder = 50
  942. string text = "刷新"
  943. integer picsize = 16
  944. end type
  945. event clicked;call super::clicked;wf_retrieve_allmtrlware()
  946. end event