w_gz_wage_basepay_edit.srw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633
  1. $PBExportHeader$w_gz_wage_basepay_edit.srw
  2. forward
  3. global type w_gz_wage_basepay_edit from w_publ_base
  4. end type
  5. type cb_retrieve from uo_imflatbutton within w_gz_wage_basepay_edit
  6. end type
  7. type cb_wage_edit from uo_imflatbutton within w_gz_wage_basepay_edit
  8. end type
  9. type cb_cancel from uo_imflatbutton within w_gz_wage_basepay_edit
  10. end type
  11. type tv_1 from uo_tv_deptype within w_gz_wage_basepay_edit
  12. end type
  13. type dw_wage from u_dw_rbtnfilter within w_gz_wage_basepay_edit
  14. end type
  15. type ddlb_scid from uo_ddlb_scid within w_gz_wage_basepay_edit
  16. end type
  17. type st_2 from statictext within w_gz_wage_basepay_edit
  18. end type
  19. type ddlb_1 from dropdownlistbox within w_gz_wage_basepay_edit
  20. end type
  21. type ln_bar from line within w_gz_wage_basepay_edit
  22. end type
  23. type ln_bar2 from line within w_gz_wage_basepay_edit
  24. end type
  25. type ln_1 from line within w_gz_wage_basepay_edit
  26. end type
  27. type ln_2 from line within w_gz_wage_basepay_edit
  28. end type
  29. type r_bar from rectangle within w_gz_wage_basepay_edit
  30. end type
  31. end forward
  32. global type w_gz_wage_basepay_edit from w_publ_base
  33. integer x = 59
  34. integer y = 32
  35. integer width = 3630
  36. integer height = 2540
  37. string title = "员工基本工资"
  38. windowstate windowstate = maximized!
  39. boolean if_ue_retr = true
  40. boolean if_ue_filter = true
  41. boolean if_ue_sort = true
  42. boolean if_ue_sentdataout = true
  43. cb_retrieve cb_retrieve
  44. cb_wage_edit cb_wage_edit
  45. cb_cancel cb_cancel
  46. tv_1 tv_1
  47. dw_wage dw_wage
  48. ddlb_scid ddlb_scid
  49. st_2 st_2
  50. ddlb_1 ddlb_1
  51. ln_bar ln_bar
  52. ln_bar2 ln_bar2
  53. ln_1 ln_1
  54. ln_2 ln_2
  55. r_bar r_bar
  56. end type
  57. global w_gz_wage_basepay_edit w_gz_wage_basepay_edit
  58. type variables
  59. String ls_handtype = ''
  60. Long cur_scid
  61. Long cur_scid_arr[]
  62. int cur_status = 1
  63. Boolean if_power_sendout = true
  64. Boolean if_power_print = true
  65. end variables
  66. forward prototypes
  67. public function integer wf_refresh_face ()
  68. public subroutine wf_find_tvchild (long arg_handl, long arg_deptid)
  69. public subroutine wf_find_tvnext (long arg_handl, long arg_deptid)
  70. public subroutine wf_setopen (long arg_deptid, long arg_scid)
  71. end prototypes
  72. public function integer wf_refresh_face ();//wf_refresh_face
  73. Int ls_i
  74. cb_func.Enabled = NOT dw_edit_mode
  75. ddlb_scid.Enabled = NOT dw_edit_mode
  76. IF dw_edit_mode THEN
  77. cb_cancel.Enabled = TRUE
  78. cb_wage_edit.Text = '保存'
  79. cb_wage_edit.normalpicname = 'Save.bmp'
  80. cb_retrieve.Enabled = FALSE
  81. dw_wage.SetTabOrder('u_basepay_basepay',10)
  82. dw_wage.SetTabOrder('dscrp',20)
  83. ELSE
  84. cb_cancel.Enabled = FALSE
  85. cb_wage_edit.Text = '修改'
  86. cb_wage_edit.normalpicname = 'open.bmp'
  87. cb_retrieve.Enabled = TRUE
  88. cb_wage_edit.Enabled = TRUE
  89. dw_wage.SetTabOrder('u_basepay_basepay',0)
  90. dw_wage.SetTabOrder('dscrp',0)
  91. END IF
  92. cb_wage_edit.of_init_draw()
  93. cb_wage_edit.of_paint()
  94. cb_wage_edit.TriggerEvent('ue_textchange')
  95. RETURN 0
  96. end function
  97. public subroutine wf_find_tvchild (long arg_handl, long arg_deptid);Long ll_handl
  98. Long ll_deptid
  99. treeviewitem tvi
  100. ll_handl = arg_handl
  101. ll_handl = tv_1.FindItem(ChildTreeItem!,ll_handl)
  102. DO WHILE ll_handl > 0
  103. tv_1.GetItem(ll_handl,tvi)
  104. ll_deptid = tvi.Data
  105. IF ll_deptid = arg_deptid THEN
  106. tv_1.SelectItem (ll_handl)
  107. RETURN
  108. END IF
  109. wf_find_tvnext(ll_handl,arg_deptid)
  110. ll_handl = tv_1.FindItem(ChildTreeItem!,ll_handl)
  111. LOOP
  112. end subroutine
  113. public subroutine wf_find_tvnext (long arg_handl, long arg_deptid);Long ll_handl
  114. Long ll_deptid
  115. treeviewitem tvi
  116. ll_handl = arg_handl
  117. ll_handl = tv_1.FindItem(NextTreeItem!,ll_handl)
  118. DO WHILE ll_handl > 0
  119. tv_1.GetItem(ll_handl,tvi)
  120. ll_deptid = tvi.Data
  121. IF ll_deptid = arg_deptid THEN
  122. tv_1.SelectItem ( ll_handl )
  123. RETURN
  124. END IF
  125. wf_find_tvchild(ll_handl,arg_deptid)
  126. ll_handl = tv_1.FindItem(NextTreeItem!,ll_handl)
  127. LOOP
  128. end subroutine
  129. public subroutine wf_setopen (long arg_deptid, long arg_scid);//tv
  130. Long ll_handl
  131. ll_handl = tv_1.FindItem(RootTreeItem!,0)
  132. IF ll_handl > 0 THEN wf_find_tvchild(ll_handl,arg_deptid)
  133. //ddlb
  134. String ls_scname
  135. Int li_spacenum
  136. String ls_space
  137. String ls_name
  138. Long ll_finditem
  139. IF arg_scid = -1 THEN
  140. ls_name = '[全部]'
  141. ELSE
  142. SELECT scname
  143. INTO :ls_scname
  144. FROM u_scdef
  145. Where scid = :arg_scid;
  146. IF sqlca.SQLCode <> 0 OR IsNull(ls_scname) THEN ls_scname = ''
  147. li_spacenum = 50 - Len(Trim(ls_scname)) - 2 - Len(String(arg_scid))
  148. ls_space = Fill(' ',li_spacenum)
  149. ls_name = ls_scname+ls_space+'['+String(arg_scid)+']'
  150. END IF
  151. ll_finditem = ddlb_scid.FindItem(ls_name,0)
  152. IF ll_finditem > 0 THEN
  153. ddlb_scid.SelectItem ( ls_name, ll_finditem )
  154. END IF
  155. end subroutine
  156. on w_gz_wage_basepay_edit.create
  157. int iCurrent
  158. call super::create
  159. this.cb_retrieve=create cb_retrieve
  160. this.cb_wage_edit=create cb_wage_edit
  161. this.cb_cancel=create cb_cancel
  162. this.tv_1=create tv_1
  163. this.dw_wage=create dw_wage
  164. this.ddlb_scid=create ddlb_scid
  165. this.st_2=create st_2
  166. this.ddlb_1=create ddlb_1
  167. this.ln_bar=create ln_bar
  168. this.ln_bar2=create ln_bar2
  169. this.ln_1=create ln_1
  170. this.ln_2=create ln_2
  171. this.r_bar=create r_bar
  172. iCurrent=UpperBound(this.Control)
  173. this.Control[iCurrent+1]=this.cb_retrieve
  174. this.Control[iCurrent+2]=this.cb_wage_edit
  175. this.Control[iCurrent+3]=this.cb_cancel
  176. this.Control[iCurrent+4]=this.tv_1
  177. this.Control[iCurrent+5]=this.dw_wage
  178. this.Control[iCurrent+6]=this.ddlb_scid
  179. this.Control[iCurrent+7]=this.st_2
  180. this.Control[iCurrent+8]=this.ddlb_1
  181. this.Control[iCurrent+9]=this.ln_bar
  182. this.Control[iCurrent+10]=this.ln_bar2
  183. this.Control[iCurrent+11]=this.ln_1
  184. this.Control[iCurrent+12]=this.ln_2
  185. this.Control[iCurrent+13]=this.r_bar
  186. end on
  187. on w_gz_wage_basepay_edit.destroy
  188. call super::destroy
  189. destroy(this.cb_retrieve)
  190. destroy(this.cb_wage_edit)
  191. destroy(this.cb_cancel)
  192. destroy(this.tv_1)
  193. destroy(this.dw_wage)
  194. destroy(this.ddlb_scid)
  195. destroy(this.st_2)
  196. destroy(this.ddlb_1)
  197. destroy(this.ln_bar)
  198. destroy(this.ln_bar2)
  199. destroy(this.ln_1)
  200. destroy(this.ln_2)
  201. destroy(this.r_bar)
  202. end on
  203. event open;call super::open;if_power_sendout = f_power_ind(1505)
  204. dw_wage.SetTransObject(sqlca)
  205. s_wageeditw_open s_wageedit_tran
  206. s_wageedit_tran = Message.PowerObjectParm
  207. ls_handtype = s_wageedit_tran.handtype
  208. cur_scid_arr = s_wageedit_tran.scid_arr
  209. cur_scid = s_wageedit_tran.scid
  210. //////更新基本工资
  211. //Long ll_updateflag = 0
  212. //ll_updateflag = Long(f_ProfileString (sys_empid,'dw_rs_empinfo_index', "updateflag",'0'))
  213. //IF ll_updateflag = 0 THEN
  214. // INSERT INTO U_BasePay(empid,BasePay)
  215. // (SELECT empid,wage FROM u_rs_empinfo);
  216. // f_setProfileString (sys_empid,'dw_rs_empinfo_index', "updateflag",'1')
  217. //END IF
  218. wf_setopen(s_wageedit_tran.deptid,s_wageedit_tran.scid)
  219. //wf_retreve()
  220. cb_retrieve.TriggerEvent(Clicked!)
  221. wf_refresh_face()
  222. end event
  223. event ue_filter;call super::ue_filter;OPENWITHPARM(w_filter_query,dw_wage)
  224. STRING LS_EXPR
  225. LS_EXPR=Message.StringParm
  226. if len(LS_EXPR)>2 and trim(LS_EXPR)='' then return
  227. dw_wage.setfilter(LS_EXPR)
  228. dw_wage.SetRedraw (false)
  229. dw_wage.filter()
  230. dw_wage.SetRedraw (TRUE)
  231. end event
  232. event ue_sort;call super::ue_sort;OPENwithparm(w_sortrow,dw_wage)
  233. STRING LS_EXPR
  234. LS_EXPR=Message.StringParm
  235. IF ISNULL(LS_EXPR) THEN LS_EXPR=' '
  236. if len(LS_EXPR)>2 and trim(LS_EXPR)='' then return
  237. dw_wage.setsort(LS_EXPR)
  238. dw_wage.SetRedraw (false)
  239. dw_wage.sort()
  240. dw_wage.SetRedraw (true)
  241. end event
  242. event resize;call super::resize;ln_bar.EndX = THIS.Width
  243. ln_bar2.EndX = THIS.Width
  244. ln_1.EndX = THIS.Width
  245. ln_2.EndX = THIS.Width
  246. r_bar.Width = THIS.Width
  247. Long w_width,w_height
  248. w_width = 3611
  249. w_height = 2200
  250. IF newwidth < w_width THEN THIS.Width = w_width
  251. IF newheight < w_height THEN THIS.Height = w_height
  252. dw_wage.Width = THIS.Width - (w_width - 2720)
  253. dw_wage.Height = THIS.Height - (w_height - 1740)
  254. tv_1.Height = THIS.Height - (w_height - 1740)
  255. end event
  256. event ue_sentdataout;call super::ue_sentdataout;IF NOT if_power_sendout THEN
  257. MessageBox(publ_operator,'你没有使用权限!')
  258. RETURN
  259. END IF
  260. OpenWithParm(w_sentdataout,dw_wage)
  261. end event
  262. type cb_func from w_publ_base`cb_func within w_gz_wage_basepay_edit
  263. integer x = 151
  264. integer width = 151
  265. integer height = 164
  266. string normalpicname = "setting.bmp"
  267. integer picsize = 16
  268. toolbaralignment pic_align = alignattop!
  269. boolean border = false
  270. end type
  271. type cb_exit from w_publ_base`cb_exit within w_gz_wage_basepay_edit
  272. integer x = 603
  273. integer width = 151
  274. integer height = 164
  275. integer taborder = 100
  276. integer picsize = 16
  277. toolbaralignment pic_align = alignattop!
  278. boolean border = false
  279. end type
  280. type cb_retrieve from uo_imflatbutton within w_gz_wage_basepay_edit
  281. integer width = 151
  282. integer height = 164
  283. integer taborder = 90
  284. boolean bringtotop = true
  285. string text = "刷新"
  286. string normalpicname = "refresh.bmp"
  287. integer picsize = 16
  288. toolbaralignment pic_align = alignattop!
  289. boolean border = false
  290. end type
  291. event clicked;call super::clicked;//wf_retreve()
  292. dw_wage.Retrieve(cur_scid_arr,ls_handtype,cur_status)
  293. end event
  294. type cb_wage_edit from uo_imflatbutton within w_gz_wage_basepay_edit
  295. integer x = 302
  296. integer width = 151
  297. integer height = 164
  298. integer taborder = 40
  299. boolean bringtotop = true
  300. string text = "修改"
  301. string normalpicname = "save.bmp"
  302. integer picsize = 16
  303. toolbaralignment pic_align = alignattop!
  304. boolean border = false
  305. end type
  306. event clicked;call super::clicked;IF dw_edit_mode THEN
  307. dw_wage.SetFilter('')
  308. dw_wage.Filter()
  309. dw_wage.AcceptText()
  310. Long i
  311. Long ll_empid
  312. String ls_empname
  313. Decimal ld_basepay
  314. Boolean if_commit
  315. String arg_msg
  316. string ls_Dscrp
  317. uo_basewage uo_bp
  318. uo_bp = CREATE uo_basewage
  319. FOR i = 1 TO dw_wage.RowCount()
  320. IF dw_wage.Object.u_basepay_empid[i] = 0 THEN
  321. ll_empid = dw_wage.Object.u_rs_empinfo_empid[i]
  322. ELSE
  323. ll_empid = dw_wage.Object.u_basepay_empid[i]
  324. END IF
  325. ls_empname = dw_wage.Object.u_rs_empinfo_empname[i]
  326. ld_basepay = dw_wage.Object.u_basepay_basepay[i]
  327. ls_Dscrp = dw_wage.Object.dscrp[i]
  328. IF i = dw_wage.RowCount() THEN
  329. if_commit = TRUE
  330. ELSE
  331. if_commit = FALSE
  332. END IF
  333. IF uo_bp.uof_basepay_init(ll_empid,ls_empname,ld_basepay,ls_Dscrp,arg_msg,if_commit) = 0 THEN
  334. MessageBox(publ_operator,'保存失败!'+arg_msg)
  335. RETURN
  336. END IF
  337. NEXT
  338. DESTROY uo_bp
  339. MessageBox(publ_operator,'保存成功!')
  340. END IF
  341. dw_edit_mode = NOT dw_edit_mode
  342. wf_refresh_face()
  343. end event
  344. type cb_cancel from uo_imflatbutton within w_gz_wage_basepay_edit
  345. integer x = 453
  346. integer width = 151
  347. integer height = 164
  348. integer taborder = 60
  349. boolean bringtotop = true
  350. string text = "取消"
  351. string normalpicname = "undo.bmp"
  352. integer picsize = 16
  353. toolbaralignment pic_align = alignattop!
  354. boolean border = false
  355. end type
  356. event clicked;call super::clicked;dw_edit_mode = FALSE
  357. //wf_retreve()
  358. cb_retrieve.TriggerEvent(Clicked!)
  359. wf_refresh_face()
  360. end event
  361. type tv_1 from uo_tv_deptype within w_gz_wage_basepay_edit
  362. integer y = 292
  363. integer width = 814
  364. integer height = 1740
  365. integer taborder = 10
  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;ls_handtype = THIS.uo_cur_info.handtype
  373. ls_handtype = ls_handtype + '%'
  374. cb_retrieve.TriggerEvent(Clicked!)
  375. end event
  376. type dw_wage from u_dw_rbtnfilter within w_gz_wage_basepay_edit
  377. integer x = 814
  378. integer y = 292
  379. integer width = 2720
  380. integer height = 1740
  381. integer taborder = 20
  382. boolean bringtotop = true
  383. string dataobject = "dw_mthwage_basepay_edit"
  384. boolean hscrollbar = true
  385. boolean vscrollbar = true
  386. end type
  387. event constructor;call super::constructor; titleclick_sort_use=true //单击标题排序功能开关
  388. RBUTTON_FILTER_USE=true //右键查询功能开关
  389. end event
  390. event rowfocuschanged;call super::rowfocuschanged;IF currentrow >0 THEN
  391. this.selectrow(0,false)
  392. this.selectrow(currentrow,true)
  393. end if
  394. end event
  395. event dwnkey;call super::dwnkey;IF Key = KeyEnter! THEN //
  396. keybd_event ( 9, 0, 0 , 0 ) // 按下tab
  397. keybd_event ( 9, 0, 2, 0 ) // 释放tab
  398. RETURN 1
  399. END IF
  400. end event
  401. type ddlb_scid from uo_ddlb_scid within w_gz_wage_basepay_edit
  402. integer y = 192
  403. integer width = 517
  404. integer height = 676
  405. integer taborder = 110
  406. boolean bringtotop = true
  407. end type
  408. event constructor;call super::constructor;cur_scid_arr = THIS.uo_scid_arr
  409. end event
  410. event selectionchanged;call super::selectionchanged;cur_scid_arr = THIS.uo_scid_arr
  411. cb_retrieve.TriggerEvent(Clicked!)
  412. end event
  413. type st_2 from statictext within w_gz_wage_basepay_edit
  414. integer x = 558
  415. integer y = 208
  416. integer width = 219
  417. integer height = 48
  418. boolean bringtotop = true
  419. integer textsize = -9
  420. integer weight = 400
  421. fontcharset fontcharset = gb2312charset!
  422. fontpitch fontpitch = variable!
  423. string facename = "宋体"
  424. long textcolor = 33554432
  425. long backcolor = 134217739
  426. string text = "状 态:"
  427. boolean focusrectangle = false
  428. end type
  429. type ddlb_1 from dropdownlistbox within w_gz_wage_basepay_edit
  430. integer x = 745
  431. integer y = 192
  432. integer width = 398
  433. integer height = 300
  434. integer taborder = 120
  435. boolean bringtotop = true
  436. integer textsize = -9
  437. integer weight = 400
  438. fontcharset fontcharset = gb2312charset!
  439. fontpitch fontpitch = variable!
  440. string facename = "宋体"
  441. long textcolor = 33554432
  442. string text = "在职"
  443. boolean sorted = false
  444. string item[] = {"离职","在职"}
  445. borderstyle borderstyle = stylelowered!
  446. end type
  447. event selectionchanged;IF THIS.Text = '离职' THEN
  448. cur_status = 0
  449. ELSE
  450. cur_status = 1
  451. END IF
  452. cb_retrieve.TriggerEvent(Clicked!)
  453. end event
  454. type ln_bar from line within w_gz_wage_basepay_edit
  455. long linecolor = 268435456
  456. integer linethickness = 4
  457. integer beginy = 172
  458. integer endx = 2007
  459. integer endy = 172
  460. end type
  461. type ln_bar2 from line within w_gz_wage_basepay_edit
  462. long linecolor = 16777215
  463. integer linethickness = 4
  464. integer beginy = 176
  465. integer endx = 2039
  466. integer endy = 176
  467. end type
  468. type ln_1 from line within w_gz_wage_basepay_edit
  469. long linecolor = 268435456
  470. integer linethickness = 4
  471. integer beginy = 284
  472. integer endx = 2016
  473. integer endy = 284
  474. end type
  475. type ln_2 from line within w_gz_wage_basepay_edit
  476. long linecolor = 16777215
  477. integer linethickness = 4
  478. integer beginy = 288
  479. integer endx = 2048
  480. integer endy = 288
  481. end type
  482. type r_bar from rectangle within w_gz_wage_basepay_edit
  483. long linecolor = 16777215
  484. integer linethickness = 4
  485. long fillcolor = 1073741824
  486. integer x = 2139
  487. integer width = 146
  488. integer height = 68
  489. end type
  490. event constructor;this.fillcolor = 14215660
  491. this.linecolor = 14215660
  492. this.x = -1
  493. this.y = -1
  494. this.height = ln_bar.beginy - 5
  495. end event