w_cbformula_set.srw 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068
  1. $PBExportHeader$w_cbformula_set.srw
  2. forward
  3. global type w_cbformula_set from w_publ_base
  4. end type
  5. type cb_1 from uo_imflatbutton within w_cbformula_set
  6. end type
  7. type st_3 from statictext within w_cbformula_set
  8. end type
  9. type em_1 from editmask within w_cbformula_set
  10. end type
  11. type cb_2 from commandbutton within w_cbformula_set
  12. end type
  13. type cb_3 from commandbutton within w_cbformula_set
  14. end type
  15. type cb_4 from commandbutton within w_cbformula_set
  16. end type
  17. type cb_5 from commandbutton within w_cbformula_set
  18. end type
  19. type cb_6 from commandbutton within w_cbformula_set
  20. end type
  21. type cb_7 from commandbutton within w_cbformula_set
  22. end type
  23. type cb_8 from commandbutton within w_cbformula_set
  24. end type
  25. type cb_9 from commandbutton within w_cbformula_set
  26. end type
  27. type cb_10 from commandbutton within w_cbformula_set
  28. end type
  29. type cb_11 from commandbutton within w_cbformula_set
  30. end type
  31. type cb_13 from commandbutton within w_cbformula_set
  32. end type
  33. type cb_14 from commandbutton within w_cbformula_set
  34. end type
  35. type cb_15 from commandbutton within w_cbformula_set
  36. end type
  37. type cb_16 from commandbutton within w_cbformula_set
  38. end type
  39. type cb_17 from commandbutton within w_cbformula_set
  40. end type
  41. type cb_12 from commandbutton within w_cbformula_set
  42. end type
  43. type st_1 from statictext within w_cbformula_set
  44. end type
  45. type cb_18 from commandbutton within w_cbformula_set
  46. end type
  47. type cb_19 from commandbutton within w_cbformula_set
  48. end type
  49. type cb_20 from commandbutton within w_cbformula_set
  50. end type
  51. type cb_21 from commandbutton within w_cbformula_set
  52. end type
  53. type sle_2 from editmask within w_cbformula_set
  54. end type
  55. type rb_1 from radiobutton within w_cbformula_set
  56. end type
  57. type rb_2 from radiobutton within w_cbformula_set
  58. end type
  59. type em_2 from editmask within w_cbformula_set
  60. end type
  61. type st_2 from statictext within w_cbformula_set
  62. end type
  63. type sle_1 from u_sleedit within w_cbformula_set
  64. end type
  65. type cb_25 from commandbutton within w_cbformula_set
  66. end type
  67. type cb_26 from commandbutton within w_cbformula_set
  68. end type
  69. type st_4 from statictext within w_cbformula_set
  70. end type
  71. type st_5 from statictext within w_cbformula_set
  72. end type
  73. type cb_22 from commandbutton within w_cbformula_set
  74. end type
  75. end forward
  76. global type w_cbformula_set from w_publ_base
  77. integer width = 1824
  78. integer height = 1140
  79. string title = "公式设定"
  80. boolean minbox = false
  81. windowtype windowtype = response!
  82. cb_1 cb_1
  83. st_3 st_3
  84. em_1 em_1
  85. cb_2 cb_2
  86. cb_3 cb_3
  87. cb_4 cb_4
  88. cb_5 cb_5
  89. cb_6 cb_6
  90. cb_7 cb_7
  91. cb_8 cb_8
  92. cb_9 cb_9
  93. cb_10 cb_10
  94. cb_11 cb_11
  95. cb_13 cb_13
  96. cb_14 cb_14
  97. cb_15 cb_15
  98. cb_16 cb_16
  99. cb_17 cb_17
  100. cb_12 cb_12
  101. st_1 st_1
  102. cb_18 cb_18
  103. cb_19 cb_19
  104. cb_20 cb_20
  105. cb_21 cb_21
  106. sle_2 sle_2
  107. rb_1 rb_1
  108. rb_2 rb_2
  109. em_2 em_2
  110. st_2 st_2
  111. sle_1 sle_1
  112. cb_25 cb_25
  113. cb_26 cb_26
  114. st_4 st_4
  115. st_5 st_5
  116. cb_22 cb_22
  117. end type
  118. global w_cbformula_set w_cbformula_set
  119. type variables
  120. s_cmpl_qty s_cmpl
  121. string ls_value
  122. decimal Nprice
  123. end variables
  124. forward prototypes
  125. public subroutine wf_cmp ()
  126. end prototypes
  127. public subroutine wf_cmp ();
  128. String ls_msg
  129. s_cmpl_qty arg_cmpl
  130. decimal ld_qty
  131. arg_cmpl = s_cmpl
  132. arg_cmpl.formula = sle_1.Text
  133. arg_cmpl.num = dec(em_1.Text)
  134. arg_cmpl.flag = rb_1.Checked
  135. arg_cmpl.addvalue = Dec(em_2.Text)
  136. ld_qty = 0
  137. if f_cmpl_qty(arg_cmpl,ld_qty,ls_msg) = 0 then
  138. MessageBox('提示',ls_msg, Information!, OK! )
  139. RETURN
  140. END IF
  141. sle_2.Text = String(ld_qty,'###,####,###0.######')
  142. end subroutine
  143. on w_cbformula_set.create
  144. int iCurrent
  145. call super::create
  146. this.cb_1=create cb_1
  147. this.st_3=create st_3
  148. this.em_1=create em_1
  149. this.cb_2=create cb_2
  150. this.cb_3=create cb_3
  151. this.cb_4=create cb_4
  152. this.cb_5=create cb_5
  153. this.cb_6=create cb_6
  154. this.cb_7=create cb_7
  155. this.cb_8=create cb_8
  156. this.cb_9=create cb_9
  157. this.cb_10=create cb_10
  158. this.cb_11=create cb_11
  159. this.cb_13=create cb_13
  160. this.cb_14=create cb_14
  161. this.cb_15=create cb_15
  162. this.cb_16=create cb_16
  163. this.cb_17=create cb_17
  164. this.cb_12=create cb_12
  165. this.st_1=create st_1
  166. this.cb_18=create cb_18
  167. this.cb_19=create cb_19
  168. this.cb_20=create cb_20
  169. this.cb_21=create cb_21
  170. this.sle_2=create sle_2
  171. this.rb_1=create rb_1
  172. this.rb_2=create rb_2
  173. this.em_2=create em_2
  174. this.st_2=create st_2
  175. this.sle_1=create sle_1
  176. this.cb_25=create cb_25
  177. this.cb_26=create cb_26
  178. this.st_4=create st_4
  179. this.st_5=create st_5
  180. this.cb_22=create cb_22
  181. iCurrent=UpperBound(this.Control)
  182. this.Control[iCurrent+1]=this.cb_1
  183. this.Control[iCurrent+2]=this.st_3
  184. this.Control[iCurrent+3]=this.em_1
  185. this.Control[iCurrent+4]=this.cb_2
  186. this.Control[iCurrent+5]=this.cb_3
  187. this.Control[iCurrent+6]=this.cb_4
  188. this.Control[iCurrent+7]=this.cb_5
  189. this.Control[iCurrent+8]=this.cb_6
  190. this.Control[iCurrent+9]=this.cb_7
  191. this.Control[iCurrent+10]=this.cb_8
  192. this.Control[iCurrent+11]=this.cb_9
  193. this.Control[iCurrent+12]=this.cb_10
  194. this.Control[iCurrent+13]=this.cb_11
  195. this.Control[iCurrent+14]=this.cb_13
  196. this.Control[iCurrent+15]=this.cb_14
  197. this.Control[iCurrent+16]=this.cb_15
  198. this.Control[iCurrent+17]=this.cb_16
  199. this.Control[iCurrent+18]=this.cb_17
  200. this.Control[iCurrent+19]=this.cb_12
  201. this.Control[iCurrent+20]=this.st_1
  202. this.Control[iCurrent+21]=this.cb_18
  203. this.Control[iCurrent+22]=this.cb_19
  204. this.Control[iCurrent+23]=this.cb_20
  205. this.Control[iCurrent+24]=this.cb_21
  206. this.Control[iCurrent+25]=this.sle_2
  207. this.Control[iCurrent+26]=this.rb_1
  208. this.Control[iCurrent+27]=this.rb_2
  209. this.Control[iCurrent+28]=this.em_2
  210. this.Control[iCurrent+29]=this.st_2
  211. this.Control[iCurrent+30]=this.sle_1
  212. this.Control[iCurrent+31]=this.cb_25
  213. this.Control[iCurrent+32]=this.cb_26
  214. this.Control[iCurrent+33]=this.st_4
  215. this.Control[iCurrent+34]=this.st_5
  216. this.Control[iCurrent+35]=this.cb_22
  217. end on
  218. on w_cbformula_set.destroy
  219. call super::destroy
  220. destroy(this.cb_1)
  221. destroy(this.st_3)
  222. destroy(this.em_1)
  223. destroy(this.cb_2)
  224. destroy(this.cb_3)
  225. destroy(this.cb_4)
  226. destroy(this.cb_5)
  227. destroy(this.cb_6)
  228. destroy(this.cb_7)
  229. destroy(this.cb_8)
  230. destroy(this.cb_9)
  231. destroy(this.cb_10)
  232. destroy(this.cb_11)
  233. destroy(this.cb_13)
  234. destroy(this.cb_14)
  235. destroy(this.cb_15)
  236. destroy(this.cb_16)
  237. destroy(this.cb_17)
  238. destroy(this.cb_12)
  239. destroy(this.st_1)
  240. destroy(this.cb_18)
  241. destroy(this.cb_19)
  242. destroy(this.cb_20)
  243. destroy(this.cb_21)
  244. destroy(this.sle_2)
  245. destroy(this.rb_1)
  246. destroy(this.rb_2)
  247. destroy(this.em_2)
  248. destroy(this.st_2)
  249. destroy(this.sle_1)
  250. destroy(this.cb_25)
  251. destroy(this.cb_26)
  252. destroy(this.st_4)
  253. destroy(this.st_5)
  254. destroy(this.cb_22)
  255. end on
  256. event close;call super::close;closewithreturn(this,s_cmpl)
  257. end event
  258. event open;call super::open;String ls_num
  259. //cb_status.Text = sys_option_change_status
  260. //cb_woodcode.Text = sys_option_change_woodcode
  261. //cb_pcode.Text = sys_option_change_pcode
  262. //
  263. //cb_mtrlsectype.Text = sys_option_change_mtrlsectype
  264. //cb_zxmtrlmode.Text = sys_option_change_zxmtrlmode
  265. //
  266. //IF Len(sys_option_change_status) > 5 THEN
  267. // cb_status.Width = 33 * Len(sys_option_change_status)
  268. //END IF
  269. //
  270. //IF Len(sys_option_change_woodcode) > 5 THEN
  271. // cb_woodcode.Width = 33 * Len(sys_option_change_woodcode)
  272. //END IF
  273. //
  274. //IF Len(sys_option_change_pcode) > 5 THEN
  275. // cb_pcode.Width = 33 * Len(sys_option_change_pcode)
  276. //END IF
  277. //
  278. //IF Len(sys_option_change_mtrlsectype) > 5 THEN
  279. // cb_mtrlsectype.Width = 33 * Len(sys_option_change_mtrlsectype)
  280. //END IF
  281. //
  282. //IF Len(sys_option_change_zxmtrlmode) > 5 THEN
  283. // cb_zxmtrlmode.Width = 33 * Len(sys_option_change_zxmtrlmode)
  284. //END IF
  285. //
  286. //cb_woodcode.x = cb_status.x + cb_status.width + 57
  287. //cb_pcode.x = cb_woodcode.x + cb_woodcode.width + 57
  288. //cb_mtrlsectype.x = cb_pcode.x + cb_pcode.width + 57
  289. //cb_zxmtrlmode.x = cb_mtrlsectype.x + cb_mtrlsectype.width + 57
  290. s_cmpl = Message.PowerObjectParm
  291. ls_value = f_ProfileString (sys_empid,this.classname(), "value",'1')
  292. ls_num = f_ProfileString (sys_empid,this.classname(), "num",'5')
  293. IF ls_num > '5' THEN
  294. ls_num = '5'
  295. END IF
  296. //addqty = s_cmpl.addqty
  297. //price = s_cmpl.price
  298. //IF s_cmpl.ifnorebate = 0 THEN
  299. // rebate = s_cmpl.rebate
  300. //ELSE
  301. // cb_24.Visible = FALSE
  302. //END IF
  303. em_1.Text = ls_num
  304. sle_1.Text = s_cmpl.formula
  305. sle_2.Text = String(s_cmpl.qty,'####,###,###0.#######')
  306. em_2.Text = ls_value
  307. sle_1.SetFocus()
  308. end event
  309. type cb_func from w_publ_base`cb_func within w_cbformula_set
  310. boolean visible = false
  311. end type
  312. type cb_exit from w_publ_base`cb_exit within w_cbformula_set
  313. integer x = 1275
  314. integer y = 832
  315. integer width = 343
  316. integer taborder = 50
  317. end type
  318. type cb_1 from uo_imflatbutton within w_cbformula_set
  319. integer x = 1275
  320. integer y = 696
  321. integer width = 343
  322. integer height = 96
  323. integer taborder = 40
  324. boolean bringtotop = true
  325. string normalpicname = "ok.bmp"
  326. end type
  327. event clicked;call super::clicked;string ls_num
  328. wf_cmp()
  329. ls_num = em_1.text
  330. ls_value = em_2.text
  331. f_SetProfileString (sys_empid,"w_cmpl_qty_ch", "num", ls_num)
  332. f_SetProfileString (sys_empid,"w_cmpl_qty_ch", "value", ls_value)
  333. s_cmpl.formula = sle_1.text
  334. s_cmpl.qty = dec(sle_2.text)
  335. close(parent)
  336. end event
  337. type st_3 from statictext within w_cbformula_set
  338. integer x = 709
  339. integer y = 296
  340. integer width = 201
  341. integer height = 64
  342. boolean bringtotop = true
  343. integer textsize = -9
  344. integer weight = 400
  345. fontcharset fontcharset = gb2312charset!
  346. fontpitch fontpitch = variable!
  347. string facename = "宋体"
  348. long textcolor = 33554432
  349. long backcolor = 134217738
  350. string text = "小数位:"
  351. alignment alignment = right!
  352. boolean focusrectangle = false
  353. end type
  354. type em_1 from editmask within w_cbformula_set
  355. integer x = 928
  356. integer y = 288
  357. integer width = 165
  358. integer height = 84
  359. integer taborder = 60
  360. boolean bringtotop = true
  361. integer textsize = -9
  362. integer weight = 400
  363. fontcharset fontcharset = gb2312charset!
  364. fontpitch fontpitch = variable!
  365. string facename = "宋体"
  366. long textcolor = 33554432
  367. alignment alignment = right!
  368. borderstyle borderstyle = stylelowered!
  369. string mask = "###0"
  370. boolean spin = true
  371. double increment = 1
  372. string minmax = "0~~5"
  373. end type
  374. event modified;cb_12.SetFocus()
  375. end event
  376. type cb_2 from commandbutton within w_cbformula_set
  377. integer x = 41
  378. integer y = 416
  379. integer width = 165
  380. integer height = 104
  381. integer taborder = 70
  382. boolean bringtotop = true
  383. integer textsize = -9
  384. integer weight = 400
  385. fontcharset fontcharset = gb2312charset!
  386. fontpitch fontpitch = variable!
  387. string facename = "宋体"
  388. string text = "7"
  389. end type
  390. event clicked;string ls_temp
  391. ls_temp = this.text
  392. sle_1.replacetext(ls_temp)
  393. sle_1.setfocus()
  394. end event
  395. type cb_3 from commandbutton within w_cbformula_set
  396. integer x = 261
  397. integer y = 416
  398. integer width = 165
  399. integer height = 104
  400. integer taborder = 80
  401. boolean bringtotop = true
  402. integer textsize = -9
  403. integer weight = 400
  404. fontcharset fontcharset = gb2312charset!
  405. fontpitch fontpitch = variable!
  406. string facename = "宋体"
  407. string text = "8"
  408. end type
  409. event clicked;string ls_temp
  410. ls_temp = this.text
  411. sle_1.replacetext(ls_temp)
  412. sle_1.setfocus()
  413. end event
  414. type cb_4 from commandbutton within w_cbformula_set
  415. integer x = 261
  416. integer y = 556
  417. integer width = 165
  418. integer height = 104
  419. integer taborder = 130
  420. boolean bringtotop = true
  421. integer textsize = -9
  422. integer weight = 400
  423. fontcharset fontcharset = gb2312charset!
  424. fontpitch fontpitch = variable!
  425. string facename = "宋体"
  426. string text = "5"
  427. end type
  428. event clicked;string ls_temp
  429. ls_temp = this.text
  430. sle_1.replacetext(ls_temp)
  431. sle_1.setfocus()
  432. end event
  433. type cb_5 from commandbutton within w_cbformula_set
  434. integer x = 41
  435. integer y = 556
  436. integer width = 165
  437. integer height = 104
  438. integer taborder = 90
  439. boolean bringtotop = true
  440. integer textsize = -9
  441. integer weight = 400
  442. fontcharset fontcharset = gb2312charset!
  443. fontpitch fontpitch = variable!
  444. string facename = "宋体"
  445. string text = "4"
  446. end type
  447. event clicked;string ls_temp
  448. ls_temp = this.text
  449. sle_1.replacetext(ls_temp)
  450. sle_1.setfocus()
  451. end event
  452. type cb_6 from commandbutton within w_cbformula_set
  453. integer x = 480
  454. integer y = 416
  455. integer width = 165
  456. integer height = 104
  457. integer taborder = 100
  458. boolean bringtotop = true
  459. integer textsize = -9
  460. integer weight = 400
  461. fontcharset fontcharset = gb2312charset!
  462. fontpitch fontpitch = variable!
  463. string facename = "宋体"
  464. string text = "9"
  465. end type
  466. event clicked;string ls_temp
  467. ls_temp = this.text
  468. sle_1.replacetext(ls_temp)
  469. sle_1.setfocus()
  470. end event
  471. type cb_7 from commandbutton within w_cbformula_set
  472. integer x = 704
  473. integer y = 416
  474. integer width = 165
  475. integer height = 104
  476. integer taborder = 140
  477. boolean bringtotop = true
  478. integer textsize = -9
  479. integer weight = 400
  480. fontcharset fontcharset = gb2312charset!
  481. fontpitch fontpitch = variable!
  482. string facename = "宋体"
  483. string text = "/"
  484. end type
  485. event clicked;string ls_temp
  486. ls_temp = this.text
  487. sle_1.replacetext(ls_temp)
  488. sle_1.setfocus()
  489. end event
  490. type cb_8 from commandbutton within w_cbformula_set
  491. integer x = 704
  492. integer y = 556
  493. integer width = 165
  494. integer height = 104
  495. integer taborder = 200
  496. boolean bringtotop = true
  497. integer textsize = -9
  498. integer weight = 400
  499. fontcharset fontcharset = gb2312charset!
  500. fontpitch fontpitch = variable!
  501. string facename = "宋体"
  502. string text = "*"
  503. end type
  504. event clicked;string ls_temp
  505. ls_temp = this.text
  506. sle_1.replacetext(ls_temp)
  507. sle_1.setfocus()
  508. end event
  509. type cb_9 from commandbutton within w_cbformula_set
  510. integer x = 480
  511. integer y = 556
  512. integer width = 165
  513. integer height = 104
  514. integer taborder = 150
  515. boolean bringtotop = true
  516. integer textsize = -9
  517. integer weight = 400
  518. fontcharset fontcharset = gb2312charset!
  519. fontpitch fontpitch = variable!
  520. string facename = "宋体"
  521. string text = "6"
  522. end type
  523. event clicked;string ls_temp
  524. ls_temp = this.text
  525. sle_1.replacetext(ls_temp)
  526. sle_1.setfocus()
  527. end event
  528. type cb_10 from commandbutton within w_cbformula_set
  529. integer x = 41
  530. integer y = 692
  531. integer width = 165
  532. integer height = 104
  533. integer taborder = 110
  534. boolean bringtotop = true
  535. integer textsize = -9
  536. integer weight = 400
  537. fontcharset fontcharset = gb2312charset!
  538. fontpitch fontpitch = variable!
  539. string facename = "宋体"
  540. string text = "1"
  541. end type
  542. event clicked;string ls_temp
  543. ls_temp = this.text
  544. sle_1.replacetext(ls_temp)
  545. sle_1.setfocus()
  546. end event
  547. type cb_11 from commandbutton within w_cbformula_set
  548. integer x = 261
  549. integer y = 692
  550. integer width = 165
  551. integer height = 104
  552. integer taborder = 160
  553. boolean bringtotop = true
  554. integer textsize = -9
  555. integer weight = 400
  556. fontcharset fontcharset = gb2312charset!
  557. fontpitch fontpitch = variable!
  558. string facename = "宋体"
  559. string text = "2"
  560. end type
  561. event clicked;string ls_temp
  562. ls_temp = this.text
  563. sle_1.replacetext(ls_temp)
  564. sle_1.setfocus()
  565. end event
  566. type cb_13 from commandbutton within w_cbformula_set
  567. integer x = 41
  568. integer y = 832
  569. integer width = 165
  570. integer height = 104
  571. integer taborder = 170
  572. boolean bringtotop = true
  573. integer textsize = -9
  574. integer weight = 400
  575. fontcharset fontcharset = gb2312charset!
  576. fontpitch fontpitch = variable!
  577. string facename = "宋体"
  578. string text = "0"
  579. end type
  580. event clicked;string ls_temp
  581. ls_temp = this.text
  582. sle_1.replacetext(ls_temp)
  583. sle_1.setfocus()
  584. end event
  585. type cb_14 from commandbutton within w_cbformula_set
  586. integer x = 480
  587. integer y = 692
  588. integer width = 165
  589. integer height = 104
  590. integer taborder = 180
  591. boolean bringtotop = true
  592. integer textsize = -9
  593. integer weight = 400
  594. fontcharset fontcharset = gb2312charset!
  595. fontpitch fontpitch = variable!
  596. string facename = "宋体"
  597. string text = "3"
  598. end type
  599. event clicked;string ls_temp
  600. ls_temp = this.text
  601. sle_1.replacetext(ls_temp)
  602. sle_1.setfocus()
  603. end event
  604. type cb_15 from commandbutton within w_cbformula_set
  605. integer x = 704
  606. integer y = 692
  607. integer width = 165
  608. integer height = 104
  609. integer taborder = 210
  610. boolean bringtotop = true
  611. integer textsize = -9
  612. integer weight = 400
  613. fontcharset fontcharset = gb2312charset!
  614. fontpitch fontpitch = variable!
  615. string facename = "宋体"
  616. string text = "-"
  617. end type
  618. event clicked;string ls_temp
  619. ls_temp = this.text
  620. sle_1.replacetext(ls_temp)
  621. sle_1.setfocus()
  622. end event
  623. type cb_16 from commandbutton within w_cbformula_set
  624. integer x = 704
  625. integer y = 832
  626. integer width = 165
  627. integer height = 104
  628. integer taborder = 250
  629. boolean bringtotop = true
  630. integer textsize = -9
  631. integer weight = 400
  632. fontcharset fontcharset = gb2312charset!
  633. fontpitch fontpitch = variable!
  634. string facename = "宋体"
  635. string text = "+"
  636. end type
  637. event clicked;string ls_temp
  638. ls_temp = this.text
  639. sle_1.replacetext(ls_temp)
  640. sle_1.setfocus()
  641. end event
  642. type cb_17 from commandbutton within w_cbformula_set
  643. integer x = 261
  644. integer y = 832
  645. integer width = 165
  646. integer height = 104
  647. integer taborder = 220
  648. boolean bringtotop = true
  649. integer textsize = -9
  650. integer weight = 400
  651. fontcharset fontcharset = gb2312charset!
  652. fontpitch fontpitch = variable!
  653. string facename = "宋体"
  654. string text = "."
  655. end type
  656. event clicked;string ls_temp
  657. ls_temp = this.text
  658. sle_1.replacetext(ls_temp)
  659. sle_1.setfocus()
  660. end event
  661. type cb_12 from commandbutton within w_cbformula_set
  662. integer x = 933
  663. integer y = 832
  664. integer width = 165
  665. integer height = 104
  666. integer taborder = 30
  667. boolean bringtotop = true
  668. integer textsize = -9
  669. integer weight = 400
  670. fontcharset fontcharset = gb2312charset!
  671. fontpitch fontpitch = variable!
  672. string facename = "宋体"
  673. string text = "="
  674. end type
  675. event clicked;wf_cmp()
  676. cb_1.SetFocus()
  677. end event
  678. type st_1 from statictext within w_cbformula_set
  679. integer x = 1134
  680. integer y = 580
  681. integer width = 206
  682. integer height = 64
  683. boolean bringtotop = true
  684. integer textsize = -9
  685. integer weight = 400
  686. fontcharset fontcharset = gb2312charset!
  687. fontpitch fontpitch = variable!
  688. string facename = "宋体"
  689. long textcolor = 33554432
  690. long backcolor = 134217738
  691. string text = "结 果:"
  692. alignment alignment = right!
  693. boolean focusrectangle = false
  694. end type
  695. type cb_18 from commandbutton within w_cbformula_set
  696. integer x = 933
  697. integer y = 556
  698. integer width = 165
  699. integer height = 104
  700. integer taborder = 260
  701. boolean bringtotop = true
  702. integer textsize = -9
  703. integer weight = 400
  704. fontcharset fontcharset = gb2312charset!
  705. fontpitch fontpitch = variable!
  706. string facename = "宋体"
  707. string text = "("
  708. end type
  709. event clicked;string ls_temp
  710. ls_temp = this.text
  711. sle_1.replacetext(ls_temp)
  712. sle_1.setfocus()
  713. end event
  714. type cb_19 from commandbutton within w_cbformula_set
  715. integer x = 933
  716. integer y = 692
  717. integer width = 165
  718. integer height = 104
  719. integer taborder = 290
  720. boolean bringtotop = true
  721. integer textsize = -9
  722. integer weight = 400
  723. fontcharset fontcharset = gb2312charset!
  724. fontpitch fontpitch = variable!
  725. string facename = "宋体"
  726. string text = ")"
  727. end type
  728. event clicked;string ls_temp
  729. ls_temp = this.text
  730. sle_1.replacetext(ls_temp)
  731. sle_1.setfocus()
  732. end event
  733. type cb_20 from commandbutton within w_cbformula_set
  734. integer x = 933
  735. integer y = 416
  736. integer width = 165
  737. integer height = 104
  738. integer taborder = 230
  739. boolean bringtotop = true
  740. integer textsize = -9
  741. integer weight = 400
  742. fontcharset fontcharset = gb2312charset!
  743. fontpitch fontpitch = variable!
  744. string facename = "宋体"
  745. string text = "C"
  746. end type
  747. event clicked;sle_1.text = ''
  748. end event
  749. type cb_21 from commandbutton within w_cbformula_set
  750. integer x = 480
  751. integer y = 832
  752. integer width = 165
  753. integer height = 104
  754. integer taborder = 270
  755. boolean bringtotop = true
  756. integer textsize = -9
  757. integer weight = 400
  758. fontcharset fontcharset = gb2312charset!
  759. fontpitch fontpitch = variable!
  760. string facename = "宋体"
  761. string text = "BS"
  762. end type
  763. event clicked;sle_1.text = mid(sle_1.text,1,len(sle_1.text) - 1)
  764. end event
  765. type sle_2 from editmask within w_cbformula_set
  766. integer x = 1358
  767. integer y = 564
  768. integer width = 421
  769. integer height = 84
  770. integer taborder = 280
  771. boolean bringtotop = true
  772. integer textsize = -9
  773. integer weight = 400
  774. fontcharset fontcharset = gb2312charset!
  775. fontpitch fontpitch = variable!
  776. string facename = "宋体"
  777. long textcolor = 33554432
  778. alignment alignment = right!
  779. boolean displayonly = true
  780. borderstyle borderstyle = stylelowered!
  781. string mask = "#########0.##########"
  782. end type
  783. type rb_1 from radiobutton within w_cbformula_set
  784. integer x = 1175
  785. integer y = 400
  786. integer width = 155
  787. integer height = 60
  788. boolean bringtotop = true
  789. integer textsize = -9
  790. integer weight = 400
  791. fontcharset fontcharset = gb2312charset!
  792. fontpitch fontpitch = variable!
  793. string facename = "宋体"
  794. long textcolor = 33554432
  795. long backcolor = 134217738
  796. string text = "*"
  797. boolean checked = true
  798. end type
  799. type rb_2 from radiobutton within w_cbformula_set
  800. integer x = 1175
  801. integer y = 480
  802. integer width = 160
  803. integer height = 56
  804. boolean bringtotop = true
  805. integer textsize = -9
  806. integer weight = 400
  807. fontcharset fontcharset = gb2312charset!
  808. fontpitch fontpitch = variable!
  809. string facename = "宋体"
  810. long textcolor = 33554432
  811. long backcolor = 134217738
  812. string text = "/"
  813. end type
  814. type em_2 from editmask within w_cbformula_set
  815. integer x = 1358
  816. integer y = 428
  817. integer width = 421
  818. integer height = 84
  819. integer taborder = 300
  820. boolean bringtotop = true
  821. integer textsize = -9
  822. integer weight = 400
  823. fontcharset fontcharset = gb2312charset!
  824. fontpitch fontpitch = variable!
  825. string facename = "宋体"
  826. long textcolor = 33554432
  827. alignment alignment = right!
  828. borderstyle borderstyle = stylelowered!
  829. string mask = "#########0.##########"
  830. end type
  831. event modified;cb_12.SetFocus()
  832. end event
  833. type st_2 from statictext within w_cbformula_set
  834. integer x = 1175
  835. integer y = 300
  836. integer width = 535
  837. integer height = 60
  838. boolean bringtotop = true
  839. integer textsize = -9
  840. integer weight = 400
  841. fontcharset fontcharset = gb2312charset!
  842. fontpitch fontpitch = variable!
  843. string facename = "宋体"
  844. long textcolor = 255
  845. long backcolor = 134217739
  846. string text = "说明:C-清除,BS-退格"
  847. boolean focusrectangle = false
  848. end type
  849. type sle_1 from u_sleedit within w_cbformula_set
  850. integer x = 41
  851. integer y = 180
  852. integer width = 1755
  853. integer taborder = 20
  854. boolean bringtotop = true
  855. end type
  856. type cb_25 from commandbutton within w_cbformula_set
  857. integer x = 41
  858. integer width = 165
  859. integer height = 88
  860. integer taborder = 140
  861. boolean bringtotop = true
  862. integer textsize = -9
  863. integer weight = 400
  864. fontcharset fontcharset = gb2312charset!
  865. fontpitch fontpitch = variable!
  866. string facename = "宋体"
  867. string text = "选择"
  868. end type
  869. event clicked;Open(w_formula_edit)
  870. String ls_temp
  871. ls_temp = Message.StringParm
  872. IF ls_temp <> '' THEN
  873. sle_1.Text = ls_temp
  874. END IF
  875. end event
  876. type cb_26 from commandbutton within w_cbformula_set
  877. integer x = 206
  878. integer width = 165
  879. integer height = 88
  880. integer taborder = 150
  881. boolean bringtotop = true
  882. integer textsize = -9
  883. integer weight = 400
  884. fontcharset fontcharset = gb2312charset!
  885. fontpitch fontpitch = variable!
  886. string facename = "宋体"
  887. string text = "保存"
  888. end type
  889. event clicked;Long ll_newid
  890. String ls_formula,errmsg
  891. Long rslt = 1
  892. ls_formula = Trim(sle_1.Text)
  893. ll_newid = f_sys_scidentity(0,"u_formula_def","formulaid",errmsg,FALSE,sqlca)
  894. IF ll_newid <= 0 THEN
  895. rslt = 0
  896. GOTO ext
  897. ELSE
  898. INSERT INTO u_formula_def
  899. ( formulaid,
  900. content )
  901. VALUES ( :ll_newid,
  902. :ls_formula ) ;
  903. IF sqlca.SQLCode <> 0 THEN
  904. errmsg = '插入公式失败'
  905. rslt = 0
  906. GOTO ext
  907. END IF
  908. END IF
  909. ext:
  910. IF rslt = 0 THEN
  911. ROLLBACK;
  912. MessageBox('错误',errmsg,stopsign!,OK!)
  913. ELSE
  914. COMMIT;
  915. MessageBox('提示',"保存成功!", Information!, OK! )
  916. END IF
  917. end event
  918. type st_4 from statictext within w_cbformula_set
  919. integer x = 50
  920. integer y = 976
  921. integer width = 2318
  922. integer height = 48
  923. boolean bringtotop = true
  924. integer textsize = -9
  925. integer weight = 400
  926. fontcharset fontcharset = gb2312charset!
  927. fontpitch fontpitch = variable!
  928. string facename = "宋体"
  929. long textcolor = 33554432
  930. long backcolor = 134217739
  931. string text = "行情成本=材料成本+人力成本+设备成本+加工成本+费用成本"
  932. boolean focusrectangle = false
  933. end type
  934. type st_5 from statictext within w_cbformula_set
  935. integer x = 50
  936. integer y = 112
  937. integer width = 425
  938. integer height = 48
  939. boolean bringtotop = true
  940. integer textsize = -9
  941. integer weight = 400
  942. fontcharset fontcharset = gb2312charset!
  943. fontpitch fontpitch = variable!
  944. string facename = "宋体"
  945. long textcolor = 33554432
  946. long backcolor = 134217739
  947. string text = "材料成本公式 = "
  948. boolean focusrectangle = false
  949. end type
  950. type cb_22 from commandbutton within w_cbformula_set
  951. integer x = 41
  952. integer y = 284
  953. integer width = 439
  954. integer height = 88
  955. integer taborder = 30
  956. boolean bringtotop = true
  957. integer textsize = -9
  958. integer weight = 400
  959. fontcharset fontcharset = gb2312charset!
  960. fontpitch fontpitch = variable!
  961. string facename = "宋体"
  962. string text = "主行情材料成本"
  963. end type
  964. event clicked;string ls_temp
  965. ls_temp = "[" + this.text + "]"
  966. sle_1.replacetext(ls_temp)
  967. sle_1.setfocus()
  968. end event