w_aifmb_eb_price.srw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879
  1. $PBExportHeader$w_aifmb_eb_price.srw
  2. forward
  3. global type w_aifmb_eb_price from window
  4. end type
  5. type cbx_1 from checkbox within w_aifmb_eb_price
  6. end type
  7. type cb_quote from uo_imflatbutton within w_aifmb_eb_price
  8. end type
  9. type cb_caudit from uo_imflatbutton within w_aifmb_eb_price
  10. end type
  11. type dw_3 from u_dw_rbtnfilter within w_aifmb_eb_price
  12. end type
  13. type dw_2 from u_dw_rbtnfilter within w_aifmb_eb_price
  14. end type
  15. type tv_1 from uo_tv_mtrltype within w_aifmb_eb_price
  16. end type
  17. type dw_1 from datawindow within w_aifmb_eb_price
  18. end type
  19. type cb_audit from uo_imflatbutton within w_aifmb_eb_price
  20. end type
  21. type cb_del from uo_imflatbutton within w_aifmb_eb_price
  22. end type
  23. type cb_edit from uo_imflatbutton within w_aifmb_eb_price
  24. end type
  25. type cb_exit from uo_imflatbutton within w_aifmb_eb_price
  26. end type
  27. type cb_reflash from uo_imflatbutton within w_aifmb_eb_price
  28. end type
  29. type ln_bar from line within w_aifmb_eb_price
  30. end type
  31. type ln_bar2 from line within w_aifmb_eb_price
  32. end type
  33. type r_bar from rectangle within w_aifmb_eb_price
  34. end type
  35. end forward
  36. global type w_aifmb_eb_price from window
  37. integer width = 3474
  38. integer height = 1972
  39. boolean titlebar = true
  40. string title = "亚洲国际电商报价"
  41. boolean controlmenu = true
  42. boolean minbox = true
  43. boolean maxbox = true
  44. boolean resizable = true
  45. windowtype windowtype = popup!
  46. windowstate windowstate = maximized!
  47. long backcolor = 67108864
  48. string icon = "AppIcon!"
  49. boolean center = true
  50. event ue_retrieve ( )
  51. cbx_1 cbx_1
  52. cb_quote cb_quote
  53. cb_caudit cb_caudit
  54. dw_3 dw_3
  55. dw_2 dw_2
  56. tv_1 tv_1
  57. dw_1 dw_1
  58. cb_audit cb_audit
  59. cb_del cb_del
  60. cb_edit cb_edit
  61. cb_exit cb_exit
  62. cb_reflash cb_reflash
  63. ln_bar ln_bar
  64. ln_bar2 ln_bar2
  65. r_bar r_bar
  66. end type
  67. global w_aifmb_eb_price w_aifmb_eb_price
  68. type variables
  69. boolean dw_edit_mode = false
  70. long uc_int = 2
  71. long uc_min = 2
  72. end variables
  73. forward prototypes
  74. public subroutine wf_face ()
  75. public function integer wf_save (ref string arg_msg)
  76. public function integer wf_del (ref string arg_msg)
  77. public function integer wf_audit (ref string arg_msg)
  78. public function integer wf_caudit (ref string arg_msg)
  79. public function integer wf_quote (ref string arg_msg)
  80. end prototypes
  81. event ue_retrieve();Long ll_row
  82. ll_row = dw_1.GetRow()
  83. IF ll_row <= 0 THEN
  84. dw_2.Reset()
  85. RETURN
  86. END IF
  87. Date ld_cur
  88. ld_cur = dw_1.Object.eb_date[ll_row]
  89. String ls_handtype
  90. ls_handtype = tv_1.uo_cur_info.handtype
  91. ls_handtype = ls_handtype + '%'
  92. dw_2.Retrieve(ld_cur, ls_handtype)
  93. end event
  94. public subroutine wf_face ();cb_reflash.Enabled = Not dw_edit_mode
  95. cb_audit.Enabled = Not dw_edit_mode
  96. cb_caudit.Enabled = Not dw_edit_mode
  97. cb_quote.Enabled = Not dw_edit_mode
  98. Long i
  99. FOR i = 1 To uc_min - 1
  100. dw_2.SetTabOrder(i, i * 10)
  101. NEXT
  102. IF dw_edit_mode THEN
  103. FOR i = uc_min To uc_int
  104. dw_2.SetTabOrder(i, i * 10)
  105. NEXT
  106. cb_edit.Text = '保存'
  107. cb_edit.normalpicname = 'Save.bmp'
  108. cb_del.Text = '放弃'
  109. cb_del.normalpicname = 'Undo.bmp'
  110. ELSE
  111. FOR i = uc_min To uc_int
  112. dw_2.SetTabOrder(i, 0)
  113. NEXT
  114. cb_edit.Text = '修改'
  115. cb_edit.normalpicname = 'OPEN.bmp'
  116. cb_del.Text = '删除'
  117. cb_del.normalpicname = 'delete.bmp'
  118. END IF
  119. cb_edit.of_init_draw()
  120. cb_edit.of_paint()
  121. cb_edit.TriggerEvent('ue_textchange')
  122. cb_del.of_init_draw()
  123. cb_del.of_paint()
  124. cb_del.TriggerEvent('ue_textchange')
  125. end subroutine
  126. public function integer wf_save (ref string arg_msg);Int rslt = 1
  127. Long i
  128. Long im_type
  129. String im_id, pros
  130. datetime opdate
  131. Decimal price
  132. Long auditflag
  133. FOR i = 1 To dw_2.RowCount()
  134. IF dw_2.Object.ch[i] <> 1 THEN CONTINUE
  135. im_type = dw_2.Object.im_type[i]
  136. im_id = dw_2.Object.im_id[i]
  137. pros = dw_2.Object.pros[i]
  138. price = dw_2.Object.price[i]
  139. auditflag = dw_2.Object.price[i]
  140. opdate = dw_2.Object.opdate[i]
  141. IF auditflag = 1 THEN
  142. rslt = 0
  143. arg_msg = '第'+String(i)+'行,已经审核不能修改'
  144. GOTO ext
  145. END IF
  146. SELECT auditflag
  147. INTO :auditflag
  148. FROM eb_price
  149. WHERE im_type = :im_type
  150. AND im_id = :im_id
  151. And pros = :pros
  152. And opdate = :opdate;
  153. IF sqlca.SQLCode <> 0 THEN
  154. rslt = 0
  155. arg_msg = '第'+String(i)+'行,查询审核状态失败,' + sqlca.SQLErrText
  156. GOTO ext
  157. END IF
  158. IF auditflag = 1 THEN
  159. rslt = 0
  160. arg_msg = '第'+String(i)+'行,已经审核不能修改'
  161. GOTO ext
  162. END IF
  163. UPDATE eb_price SET price = :price
  164. WHERE im_type = :im_type
  165. AND im_id = :im_id
  166. And pros = :pros
  167. AND opdate = :opdate;
  168. IF sqlca.SQLCode <> 0 THEN
  169. rslt = 0
  170. arg_msg = '第'+String(i)+'行,更新报价失败,' + sqlca.SQLErrText
  171. GOTO ext
  172. END IF
  173. NEXT
  174. GOTO ext
  175. ext:
  176. IF rslt = 1 THEN
  177. COMMIT;
  178. ELSE
  179. ROLLBACK;
  180. END IF
  181. RETURN rslt
  182. end function
  183. public function integer wf_del (ref string arg_msg);Int rslt = 1
  184. Long i
  185. Long im_type
  186. String im_id, pros
  187. datetime opdate
  188. Long auditflag
  189. FOR i = 1 To dw_2.RowCount()
  190. IF dw_2.Object.ch[i] <> 1 THEN CONTINUE
  191. im_type = dw_2.Object.im_type[i]
  192. im_id = dw_2.Object.im_id[i]
  193. pros = dw_2.Object.pros[i]
  194. auditflag = dw_2.Object.price[i]
  195. opdate = dw_2.Object.opdate[i]
  196. IF auditflag = 1 THEN
  197. rslt = 0
  198. arg_msg = '第'+String(i)+'行,已经审核不能删除'
  199. GOTO ext
  200. END IF
  201. SELECT auditflag
  202. INTO :auditflag
  203. FROM eb_price
  204. WHERE im_type = :im_type
  205. AND im_id = :im_id
  206. And pros = :pros
  207. and opdate = :opdate;
  208. IF sqlca.SQLCode <> 0 THEN
  209. rslt = 0
  210. arg_msg = '第'+String(i)+'行,查询审核状态失败,' + sqlca.SQLErrText
  211. GOTO ext
  212. END IF
  213. IF auditflag = 1 THEN
  214. rslt = 0
  215. arg_msg = '第'+String(i)+'行,已经审核不能删除'
  216. GOTO ext
  217. END IF
  218. DELETE FROM eb_price
  219. WHERE im_type = :im_type
  220. AND im_id = :im_id
  221. And pros = :pros
  222. and opdate = :opdate;
  223. IF sqlca.SQLCode <> 0 THEN
  224. rslt = 0
  225. arg_msg = '第'+String(i)+'行,删除报价失败,' + sqlca.SQLErrText
  226. GOTO ext
  227. END IF
  228. NEXT
  229. GOTO ext
  230. ext:
  231. IF rslt = 1 THEN
  232. COMMIT;
  233. ELSE
  234. ROLLBACK;
  235. END IF
  236. RETURN rslt
  237. end function
  238. public function integer wf_audit (ref string arg_msg);Int rslt = 1
  239. Long i
  240. Long im_type
  241. String im_id, pros
  242. datetime opdate
  243. Long auditflag
  244. FOR i = 1 To dw_2.RowCount()
  245. IF dw_2.Object.ch[i] <> 1 THEN CONTINUE
  246. im_type = dw_2.Object.im_type[i]
  247. im_id = dw_2.Object.im_id[i]
  248. pros = dw_2.Object.pros[i]
  249. auditflag = dw_2.Object.price[i]
  250. opdate = dw_2.Object.opdate[i]
  251. IF auditflag = 1 THEN
  252. rslt = 0
  253. arg_msg = '第'+String(i)+'行,已经审核不能再审核'
  254. GOTO ext
  255. END IF
  256. SELECT auditflag
  257. INTO :auditflag
  258. FROM eb_price
  259. WHERE im_type = :im_type
  260. AND im_id = :im_id
  261. And pros = :pros
  262. and opdate = :opdate;
  263. IF sqlca.SQLCode <> 0 THEN
  264. rslt = 0
  265. arg_msg = '第'+String(i)+'行,查询审核状态失败,' + sqlca.SQLErrText
  266. GOTO ext
  267. END IF
  268. IF auditflag = 1 THEN
  269. rslt = 0
  270. arg_msg = '第'+String(i)+'行,已经审核不能再审核'
  271. GOTO ext
  272. END IF
  273. UPDATE eb_price SET auditflag = 1,
  274. auditdate = GETDATE(),
  275. auditemp = :publ_operator
  276. WHERE im_type = :im_type
  277. AND im_id = :im_id
  278. And pros = :pros
  279. and opdate = :opdate;
  280. IF sqlca.SQLCode <> 0 THEN
  281. rslt = 0
  282. arg_msg = '第'+String(i)+'行,审核失败,' + sqlca.SQLErrText
  283. GOTO ext
  284. END IF
  285. NEXT
  286. GOTO ext
  287. ext:
  288. IF rslt = 1 THEN
  289. COMMIT;
  290. ELSE
  291. ROLLBACK;
  292. END IF
  293. RETURN rslt
  294. end function
  295. public function integer wf_caudit (ref string arg_msg);Int rslt = 1
  296. Long i
  297. Long im_type
  298. String im_id, pros
  299. datetime opdate
  300. Long auditflag
  301. Long sendflag
  302. FOR i = 1 To dw_2.RowCount()
  303. IF dw_2.Object.ch[i] <> 1 THEN CONTINUE
  304. im_type = dw_2.Object.im_type[i]
  305. im_id = dw_2.Object.im_id[i]
  306. pros = dw_2.Object.pros[i]
  307. auditflag = dw_2.Object.price[i]
  308. sendflag = dw_2.Object.sendflag[i]
  309. opdate = dw_2.Object.opdate[i]
  310. IF sendflag = 1 THEN
  311. rslt = 0
  312. arg_msg = '第'+String(i)+'行,已经发送不能撤审'
  313. GOTO ext
  314. END IF
  315. IF auditflag = 0 THEN
  316. rslt = 0
  317. arg_msg = '第'+String(i)+'行,未审核不能撤审'
  318. GOTO ext
  319. END IF
  320. SELECT auditflag, sendflag
  321. INTO :auditflag, :sendflag
  322. FROM eb_price
  323. WHERE im_type = :im_type
  324. AND im_id = :im_id
  325. And pros = :pros
  326. and opdate = :opdate;
  327. IF sqlca.SQLCode <> 0 THEN
  328. rslt = 0
  329. arg_msg = '第'+String(i)+'行,查询审核状态失败,' + sqlca.SQLErrText
  330. GOTO ext
  331. END IF
  332. IF sendflag = 1 THEN
  333. rslt = 0
  334. arg_msg = '第'+String(i)+'行,已经发送不能撤审'
  335. GOTO ext
  336. END IF
  337. IF auditflag = 0 THEN
  338. rslt = 0
  339. arg_msg = '第'+String(i)+'行,未审核不能撤审'
  340. GOTO ext
  341. END IF
  342. UPDATE eb_price SET auditflag = 0,
  343. auditdate = NULL,
  344. auditemp = ''
  345. WHERE im_type = :im_type
  346. AND im_id = :im_id
  347. And pros = :pros
  348. and opdate = :opdate;
  349. IF sqlca.SQLCode <> 0 THEN
  350. rslt = 0
  351. arg_msg = '第'+String(i)+'行,撤审失败,' + sqlca.SQLErrText
  352. GOTO ext
  353. END IF
  354. NEXT
  355. GOTO ext
  356. ext:
  357. IF rslt = 1 THEN
  358. COMMIT;
  359. ELSE
  360. ROLLBACK;
  361. END IF
  362. RETURN rslt
  363. end function
  364. public function integer wf_quote (ref string arg_msg);Int rslt = 1
  365. Long ll_row
  366. ll_row = dw_1.GetRow()
  367. IF ll_row <= 0 THEN
  368. rslt = 0
  369. arg_msg = '请选择是手动报价的日期'
  370. GOTO ext
  371. END IF
  372. DateTime ld_cur
  373. ld_cur = DateTime(dw_1.Object.eb_date[ll_row], Time(0))
  374. INSERT INTO eb_price(im_type, im_id, pros, opdate)
  375. SELECT eb_import_mtrlname.im_type, eb_import_mtrlname.im_id, '' AS pros, :ld_cur AS opdate
  376. FROM eb_import_mtrlname INNER JOIN u_mtrldef
  377. ON eb_import_mtrlname.mtrlid = u_mtrldef.mtrlid LEFT OUTER JOIN
  378. eb_price AS eb_price_1
  379. ON eb_import_mtrlname.im_type = eb_price_1.im_type
  380. AND eb_import_mtrlname.im_id = eb_price_1.im_id
  381. AND CONVERT(varchar(10),eb_price_1.opdate,120) = CONVERT(varchar(10),:ld_cur,120)
  382. AND eb_price_1.pros = ''
  383. WHERE (eb_import_mtrlname.pricemode = 0)
  384. AND (eb_import_mtrlname.acceptflag = 1)
  385. And (eb_price_1.im_type Is Null);
  386. IF sqlca.SQLCode <> 0 THEN
  387. rslt = 0
  388. arg_msg = '插入手动报价失败,' + sqlca.SQLErrText
  389. GOTO ext
  390. END IF
  391. ext:
  392. IF rslt = 1 THEN
  393. COMMIT;
  394. ELSE
  395. ROLLBACK;
  396. END IF
  397. RETURN rslt
  398. end function
  399. on w_aifmb_eb_price.create
  400. this.cbx_1=create cbx_1
  401. this.cb_quote=create cb_quote
  402. this.cb_caudit=create cb_caudit
  403. this.dw_3=create dw_3
  404. this.dw_2=create dw_2
  405. this.tv_1=create tv_1
  406. this.dw_1=create dw_1
  407. this.cb_audit=create cb_audit
  408. this.cb_del=create cb_del
  409. this.cb_edit=create cb_edit
  410. this.cb_exit=create cb_exit
  411. this.cb_reflash=create cb_reflash
  412. this.ln_bar=create ln_bar
  413. this.ln_bar2=create ln_bar2
  414. this.r_bar=create r_bar
  415. this.Control[]={this.cbx_1,&
  416. this.cb_quote,&
  417. this.cb_caudit,&
  418. this.dw_3,&
  419. this.dw_2,&
  420. this.tv_1,&
  421. this.dw_1,&
  422. this.cb_audit,&
  423. this.cb_del,&
  424. this.cb_edit,&
  425. this.cb_exit,&
  426. this.cb_reflash,&
  427. this.ln_bar,&
  428. this.ln_bar2,&
  429. this.r_bar}
  430. end on
  431. on w_aifmb_eb_price.destroy
  432. destroy(this.cbx_1)
  433. destroy(this.cb_quote)
  434. destroy(this.cb_caudit)
  435. destroy(this.dw_3)
  436. destroy(this.dw_2)
  437. destroy(this.tv_1)
  438. destroy(this.dw_1)
  439. destroy(this.cb_audit)
  440. destroy(this.cb_del)
  441. destroy(this.cb_edit)
  442. destroy(this.cb_exit)
  443. destroy(this.cb_reflash)
  444. destroy(this.ln_bar)
  445. destroy(this.ln_bar2)
  446. destroy(this.r_bar)
  447. end on
  448. event resize;ln_bar.EndX = THIS.Width
  449. ln_bar2.EndX = THIS.Width
  450. r_bar.Width = THIS.Width
  451. tv_1.Height = this.workspaceheight() - tv_1.Y
  452. dw_2.width = this.workspacewidth() - dw_2.X
  453. dw_2.height = this.workspaceheight() - dw_2.Y - dw_3.Height
  454. dw_3.width = dw_2.width
  455. dw_3.Y = dw_2.Y + dw_2.height
  456. end event
  457. event open;wf_face()
  458. dw_2.SetTransObject(sqlca)
  459. Date ld_today, ld_cur
  460. ld_today = Today()
  461. Long i, j
  462. FOR i = 1 To 20
  463. ld_cur = RelativeDate(ld_today, - i + 1)
  464. j = dw_1.InsertRow(0)
  465. dw_1.Object.eb_date[j] = ld_cur
  466. NEXT
  467. triggerevent('ue_retrieve')
  468. end event
  469. type cbx_1 from checkbox within w_aifmb_eb_price
  470. integer x = 1216
  471. integer y = 108
  472. integer width = 274
  473. integer height = 56
  474. boolean bringtotop = true
  475. integer textsize = -9
  476. integer weight = 400
  477. fontcharset fontcharset = gb2312charset!
  478. fontpitch fontpitch = variable!
  479. string facename = "宋体"
  480. long textcolor = 33554432
  481. long backcolor = 67108864
  482. string text = "全选"
  483. end type
  484. event clicked;Long i
  485. Long ll_check
  486. IF This.Checked THEN
  487. ll_check = 1
  488. ELSE
  489. ll_check = 0
  490. END IF
  491. FOR i = 1 To dw_2.RowCount()
  492. dw_2.Object.ch[i] = ll_check
  493. NEXT
  494. end event
  495. event constructor;this.backcolor = 14215660
  496. end event
  497. type cb_quote from uo_imflatbutton within w_aifmb_eb_price
  498. integer x = 754
  499. integer width = 274
  500. integer height = 164
  501. integer taborder = 30
  502. boolean bringtotop = true
  503. string text = "手动报价"
  504. string normalpicname = "imexport.BMP"
  505. integer picsize = 16
  506. toolbaralignment pic_align = alignattop!
  507. boolean border = false
  508. end type
  509. event clicked;call super::clicked;string ls_msg
  510. IF wf_quote(ls_msg) <> 1 THEN
  511. MessageBox('错误', ls_msg)
  512. RETURN
  513. END IF
  514. cb_reflash.TriggerEvent(Clicked!)
  515. end event
  516. type cb_caudit from uo_imflatbutton within w_aifmb_eb_price
  517. integer x = 603
  518. integer width = 151
  519. integer height = 164
  520. integer taborder = 30
  521. boolean bringtotop = true
  522. string text = "撤审"
  523. string normalpicname = "caudit.bmp"
  524. integer picsize = 16
  525. toolbaralignment pic_align = alignattop!
  526. boolean border = false
  527. end type
  528. event clicked;call super::clicked;string ls_msg
  529. IF MessageBox('提问', '是否要撤审选中的记录?', Question!, YesNo!) <> 1 THEN
  530. RETURN
  531. END IF
  532. IF wf_caudit(ls_msg) <> 1 THEN
  533. MessageBox('错误', ls_msg)
  534. RETURN
  535. END IF
  536. cb_reflash.TriggerEvent(Clicked!)
  537. end event
  538. type dw_3 from u_dw_rbtnfilter within w_aifmb_eb_price
  539. integer x = 1024
  540. integer y = 1248
  541. integer width = 2057
  542. integer height = 584
  543. integer taborder = 50
  544. end type
  545. type dw_2 from u_dw_rbtnfilter within w_aifmb_eb_price
  546. integer x = 1024
  547. integer y = 188
  548. integer width = 2267
  549. integer height = 1048
  550. integer taborder = 50
  551. string dataobject = "dw_aifmb_eb_price"
  552. end type
  553. event clicked;call super::clicked;if row > 0 then
  554. this.SetRow(row)
  555. this.ScrollToRow(row)
  556. end if
  557. end event
  558. event rowfocuschanged;call super::rowfocuschanged;This.SelectRow(0, False)
  559. IF currentrow > 0 THEN
  560. This.SelectRow(currentrow, True)
  561. END IF
  562. end event
  563. type tv_1 from uo_tv_mtrltype within w_aifmb_eb_price
  564. integer y = 1084
  565. integer width = 1024
  566. integer height = 700
  567. integer taborder = 40
  568. boolean bringtotop = true
  569. integer textsize = -9
  570. fontcharset fontcharset = gb2312charset!
  571. fontfamily fontfamily = anyfont!
  572. string facename = "宋体"
  573. string picturename[] = {"Application!","Structure5!"}
  574. end type
  575. event selectionchanged;call super::selectionchanged;parent.triggerevent('ue_retrieve')
  576. end event
  577. event selectionchanging;call super::selectionchanging;if dw_edit_mode then return 1
  578. end event
  579. type dw_1 from datawindow within w_aifmb_eb_price
  580. integer y = 188
  581. integer width = 1024
  582. integer height = 892
  583. integer taborder = 30
  584. string title = "none"
  585. string dataobject = "dw_aifmb_eb_price_date"
  586. boolean hscrollbar = true
  587. boolean vscrollbar = true
  588. boolean livescroll = true
  589. borderstyle borderstyle = stylelowered!
  590. end type
  591. event rowfocuschanged;This.SelectRow(0, False)
  592. IF currentrow > 0 THEN
  593. This.SelectRow(currentrow, True)
  594. END IF
  595. Parent.TriggerEvent('ue_retrieve')
  596. end event
  597. event clicked;if row > 0 then
  598. this.SetRow(row)
  599. this.ScrollToRow(row)
  600. end if
  601. end event
  602. event rowfocuschanging;if dw_edit_mode then return 1
  603. end event
  604. type cb_audit from uo_imflatbutton within w_aifmb_eb_price
  605. integer x = 453
  606. integer width = 151
  607. integer height = 164
  608. integer taborder = 50
  609. boolean bringtotop = true
  610. string text = "审核"
  611. string normalpicname = "audit.bmp"
  612. integer picsize = 16
  613. toolbaralignment pic_align = alignattop!
  614. boolean border = false
  615. end type
  616. event clicked;call super::clicked;string ls_msg
  617. IF MessageBox('提问', '是否要审核选中的记录?', Question!, YesNo!) <> 1 THEN
  618. RETURN
  619. END IF
  620. IF wf_audit(ls_msg) <> 1 THEN
  621. MessageBox('错误', ls_msg)
  622. RETURN
  623. END IF
  624. cb_reflash.TriggerEvent(Clicked!)
  625. end event
  626. type cb_del from uo_imflatbutton within w_aifmb_eb_price
  627. integer x = 302
  628. integer width = 151
  629. integer height = 164
  630. integer taborder = 40
  631. boolean bringtotop = true
  632. string text = "删除"
  633. string normalpicname = "delete.bmp"
  634. integer picsize = 16
  635. toolbaralignment pic_align = alignattop!
  636. boolean border = false
  637. end type
  638. event clicked;call super::clicked;String ls_msg
  639. IF dw_edit_mode THEN
  640. dw_edit_mode = Not dw_edit_mode
  641. cb_reflash.TriggerEvent(Clicked!)
  642. wf_face()
  643. ELSE
  644. IF MessageBox('提问', '是否要删除选中的记录?', Question!, YesNo!) <> 1 THEN
  645. RETURN
  646. END IF
  647. IF wf_del(ls_msg) <> 1 THEN
  648. MessageBox('错误', ls_msg)
  649. RETURN
  650. END IF
  651. cb_reflash.TriggerEvent(Clicked!)
  652. END IF
  653. end event
  654. type cb_edit from uo_imflatbutton within w_aifmb_eb_price
  655. integer x = 151
  656. integer width = 151
  657. integer height = 164
  658. integer taborder = 30
  659. boolean bringtotop = true
  660. string text = "修改"
  661. string normalpicname = "OPEN.bmp"
  662. integer picsize = 16
  663. toolbaralignment pic_align = alignattop!
  664. boolean border = false
  665. end type
  666. event clicked;call super::clicked;String arg_msg
  667. IF dw_edit_mode THEN
  668. IF dw_2.AcceptText() <> 1 THEN RETURN
  669. IF wf_save(arg_msg) <> 1 THEN
  670. MessageBox('错误', arg_msg)
  671. RETURN
  672. END IF
  673. END IF
  674. dw_edit_mode = Not dw_edit_mode
  675. IF Not dw_edit_mode THEN
  676. cb_reflash.TriggerEvent(Clicked!)
  677. ELSE
  678. Long i
  679. FOR i = 1 To dw_2.RowCount()
  680. IF dw_2.Object.auditflag[i] = 1 THEN
  681. dw_2.Object.ch[i] = 0
  682. ELSE
  683. dw_2.Object.ch[i] = 1
  684. END IF
  685. NEXT
  686. END IF
  687. wf_face()
  688. end event
  689. type cb_exit from uo_imflatbutton within w_aifmb_eb_price
  690. integer x = 1029
  691. integer width = 151
  692. integer height = 164
  693. integer taborder = 20
  694. string text = "退出"
  695. boolean cancel = true
  696. string normalpicname = "exit.bmp"
  697. integer picsize = 16
  698. toolbaralignment pic_align = alignattop!
  699. boolean border = false
  700. end type
  701. event clicked;call super::clicked;Close(PARENT)
  702. end event
  703. type cb_reflash from uo_imflatbutton within w_aifmb_eb_price
  704. integer width = 151
  705. integer height = 164
  706. integer taborder = 10
  707. string text = "刷新"
  708. string normalpicname = "refresh.BMP"
  709. integer picsize = 16
  710. toolbaralignment pic_align = alignattop!
  711. boolean border = false
  712. end type
  713. event clicked;call super::clicked;parent.triggerevent('ue_retrieve')
  714. end event
  715. type ln_bar from line within w_aifmb_eb_price
  716. long linecolor = 268435456
  717. integer linethickness = 4
  718. integer beginy = 172
  719. integer endx = 2007
  720. integer endy = 172
  721. end type
  722. type ln_bar2 from line within w_aifmb_eb_price
  723. long linecolor = 16777215
  724. integer linethickness = 4
  725. integer beginy = 176
  726. integer endx = 2039
  727. integer endy = 176
  728. end type
  729. type r_bar from rectangle within w_aifmb_eb_price
  730. long linecolor = 16777215
  731. integer linethickness = 4
  732. long fillcolor = 1073741824
  733. integer x = 2139
  734. integer width = 146
  735. integer height = 68
  736. end type
  737. event constructor;this.fillcolor = 14215660
  738. this.linecolor = 14215660
  739. this.x = -1
  740. this.y = -1
  741. this.height = ln_bar.beginy - 5
  742. end event