w_add_mxnewprice.srw 25 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028
  1. $PBExportHeader$w_add_mxnewprice.srw
  2. $PBExportComments$手动添加明细价格
  3. forward
  4. global type w_add_mxnewprice from w_publ_base
  5. end type
  6. type st_2 from statictext within w_add_mxnewprice
  7. end type
  8. type sle_outwarecode from singlelineedit within w_add_mxnewprice
  9. end type
  10. type st_4 from statictext within w_add_mxnewprice
  11. end type
  12. type st_6 from statictext within w_add_mxnewprice
  13. end type
  14. type sle_dscrp from singlelineedit within w_add_mxnewprice
  15. end type
  16. type gb_1 from groupbox within w_add_mxnewprice
  17. end type
  18. type st_7 from statictext within w_add_mxnewprice
  19. end type
  20. type st_8 from statictext within w_add_mxnewprice
  21. end type
  22. type st_9 from statictext within w_add_mxnewprice
  23. end type
  24. type st_10 from statictext within w_add_mxnewprice
  25. end type
  26. type em_price from editmask within w_add_mxnewprice
  27. end type
  28. type st_id from statictext within w_add_mxnewprice
  29. end type
  30. type st_12 from statictext within w_add_mxnewprice
  31. end type
  32. type em_zqrate from editmask within w_add_mxnewprice
  33. end type
  34. type st_price from statictext within w_add_mxnewprice
  35. end type
  36. type sle_2 from singlelineedit within w_add_mxnewprice
  37. end type
  38. type sle_1 from singlelineedit within w_add_mxnewprice
  39. end type
  40. type cb_select from uo_imflatbutton within w_add_mxnewprice
  41. end type
  42. type em_opdate from editmask within w_add_mxnewprice
  43. end type
  44. type sle_opemp from singlelineedit within w_add_mxnewprice
  45. end type
  46. type cb_add from uo_imflatbutton within w_add_mxnewprice
  47. end type
  48. type st_1 from statictext within w_add_mxnewprice
  49. end type
  50. type sle_status from dropdownlistbox within w_add_mxnewprice
  51. end type
  52. type st_13 from statictext within w_add_mxnewprice
  53. end type
  54. type ddlb_woodcode from dropdownlistbox within w_add_mxnewprice
  55. end type
  56. type st_14 from statictext within w_add_mxnewprice
  57. end type
  58. type ddlb_pcode from dropdownlistbox within w_add_mxnewprice
  59. end type
  60. type ddlb_money from dropdownlistbox within w_add_mxnewprice
  61. end type
  62. type st_3 from statictext within w_add_mxnewprice
  63. end type
  64. type st_5 from statictext within w_add_mxnewprice
  65. end type
  66. type ddlb_unit from dropdownlistbox within w_add_mxnewprice
  67. end type
  68. type em_rate from editmask within w_add_mxnewprice
  69. end type
  70. type st_11 from statictext within w_add_mxnewprice
  71. end type
  72. end forward
  73. global type w_add_mxnewprice from w_publ_base
  74. integer width = 1778
  75. integer height = 1120
  76. string title = "产品价格修改"
  77. boolean minbox = false
  78. windowtype windowtype = response!
  79. st_2 st_2
  80. sle_outwarecode sle_outwarecode
  81. st_4 st_4
  82. st_6 st_6
  83. sle_dscrp sle_dscrp
  84. gb_1 gb_1
  85. st_7 st_7
  86. st_8 st_8
  87. st_9 st_9
  88. st_10 st_10
  89. em_price em_price
  90. st_id st_id
  91. st_12 st_12
  92. em_zqrate em_zqrate
  93. st_price st_price
  94. sle_2 sle_2
  95. sle_1 sle_1
  96. cb_select cb_select
  97. em_opdate em_opdate
  98. sle_opemp sle_opemp
  99. cb_add cb_add
  100. st_1 st_1
  101. sle_status sle_status
  102. st_13 st_13
  103. ddlb_woodcode ddlb_woodcode
  104. st_14 st_14
  105. ddlb_pcode ddlb_pcode
  106. ddlb_money ddlb_money
  107. st_3 st_3
  108. st_5 st_5
  109. ddlb_unit ddlb_unit
  110. em_rate em_rate
  111. st_11 st_11
  112. end type
  113. global w_add_mxnewprice w_add_mxnewprice
  114. type variables
  115. s_insert_cusprice s_get//接受结构参数
  116. end variables
  117. on w_add_mxnewprice.create
  118. int iCurrent
  119. call super::create
  120. this.st_2=create st_2
  121. this.sle_outwarecode=create sle_outwarecode
  122. this.st_4=create st_4
  123. this.st_6=create st_6
  124. this.sle_dscrp=create sle_dscrp
  125. this.gb_1=create gb_1
  126. this.st_7=create st_7
  127. this.st_8=create st_8
  128. this.st_9=create st_9
  129. this.st_10=create st_10
  130. this.em_price=create em_price
  131. this.st_id=create st_id
  132. this.st_12=create st_12
  133. this.em_zqrate=create em_zqrate
  134. this.st_price=create st_price
  135. this.sle_2=create sle_2
  136. this.sle_1=create sle_1
  137. this.cb_select=create cb_select
  138. this.em_opdate=create em_opdate
  139. this.sle_opemp=create sle_opemp
  140. this.cb_add=create cb_add
  141. this.st_1=create st_1
  142. this.sle_status=create sle_status
  143. this.st_13=create st_13
  144. this.ddlb_woodcode=create ddlb_woodcode
  145. this.st_14=create st_14
  146. this.ddlb_pcode=create ddlb_pcode
  147. this.ddlb_money=create ddlb_money
  148. this.st_3=create st_3
  149. this.st_5=create st_5
  150. this.ddlb_unit=create ddlb_unit
  151. this.em_rate=create em_rate
  152. this.st_11=create st_11
  153. iCurrent=UpperBound(this.Control)
  154. this.Control[iCurrent+1]=this.st_2
  155. this.Control[iCurrent+2]=this.sle_outwarecode
  156. this.Control[iCurrent+3]=this.st_4
  157. this.Control[iCurrent+4]=this.st_6
  158. this.Control[iCurrent+5]=this.sle_dscrp
  159. this.Control[iCurrent+6]=this.gb_1
  160. this.Control[iCurrent+7]=this.st_7
  161. this.Control[iCurrent+8]=this.st_8
  162. this.Control[iCurrent+9]=this.st_9
  163. this.Control[iCurrent+10]=this.st_10
  164. this.Control[iCurrent+11]=this.em_price
  165. this.Control[iCurrent+12]=this.st_id
  166. this.Control[iCurrent+13]=this.st_12
  167. this.Control[iCurrent+14]=this.em_zqrate
  168. this.Control[iCurrent+15]=this.st_price
  169. this.Control[iCurrent+16]=this.sle_2
  170. this.Control[iCurrent+17]=this.sle_1
  171. this.Control[iCurrent+18]=this.cb_select
  172. this.Control[iCurrent+19]=this.em_opdate
  173. this.Control[iCurrent+20]=this.sle_opemp
  174. this.Control[iCurrent+21]=this.cb_add
  175. this.Control[iCurrent+22]=this.st_1
  176. this.Control[iCurrent+23]=this.sle_status
  177. this.Control[iCurrent+24]=this.st_13
  178. this.Control[iCurrent+25]=this.ddlb_woodcode
  179. this.Control[iCurrent+26]=this.st_14
  180. this.Control[iCurrent+27]=this.ddlb_pcode
  181. this.Control[iCurrent+28]=this.ddlb_money
  182. this.Control[iCurrent+29]=this.st_3
  183. this.Control[iCurrent+30]=this.st_5
  184. this.Control[iCurrent+31]=this.ddlb_unit
  185. this.Control[iCurrent+32]=this.em_rate
  186. this.Control[iCurrent+33]=this.st_11
  187. end on
  188. on w_add_mxnewprice.destroy
  189. call super::destroy
  190. destroy(this.st_2)
  191. destroy(this.sle_outwarecode)
  192. destroy(this.st_4)
  193. destroy(this.st_6)
  194. destroy(this.sle_dscrp)
  195. destroy(this.gb_1)
  196. destroy(this.st_7)
  197. destroy(this.st_8)
  198. destroy(this.st_9)
  199. destroy(this.st_10)
  200. destroy(this.em_price)
  201. destroy(this.st_id)
  202. destroy(this.st_12)
  203. destroy(this.em_zqrate)
  204. destroy(this.st_price)
  205. destroy(this.sle_2)
  206. destroy(this.sle_1)
  207. destroy(this.cb_select)
  208. destroy(this.em_opdate)
  209. destroy(this.sle_opemp)
  210. destroy(this.cb_add)
  211. destroy(this.st_1)
  212. destroy(this.sle_status)
  213. destroy(this.st_13)
  214. destroy(this.ddlb_woodcode)
  215. destroy(this.st_14)
  216. destroy(this.ddlb_pcode)
  217. destroy(this.ddlb_money)
  218. destroy(this.st_3)
  219. destroy(this.st_5)
  220. destroy(this.ddlb_unit)
  221. destroy(this.em_rate)
  222. destroy(this.st_11)
  223. end on
  224. event open;call super::open;em_opdate.text=string(now(),'yyyy-mm-dd hh:mm:ss')
  225. //em_outdate.text=string(today(),'yyyy-mm-dd')
  226. s_get=message.powerobjectparm
  227. sle_1.text=s_get.cusname
  228. sle_2.text=s_get.mtrlname
  229. if trim(sle_2.text)='' then
  230. cb_add.enabled=false
  231. end if
  232. st_price.text=string(dec(em_zqrate.text) * dec(em_price.text),'#0.0000')
  233. end event
  234. type cb_func from w_publ_base`cb_func within w_add_mxnewprice
  235. boolean visible = false
  236. integer x = 101
  237. integer y = 756
  238. integer taborder = 110
  239. end type
  240. type cb_exit from w_publ_base`cb_exit within w_add_mxnewprice
  241. integer x = 1440
  242. integer y = 916
  243. integer width = 274
  244. integer taborder = 130
  245. end type
  246. type st_2 from statictext within w_add_mxnewprice
  247. integer x = 46
  248. integer y = 268
  249. integer width = 270
  250. integer height = 56
  251. boolean bringtotop = true
  252. integer textsize = -9
  253. integer weight = 400
  254. fontcharset fontcharset = gb2312charset!
  255. fontpitch fontpitch = variable!
  256. string facename = "宋体"
  257. long textcolor = 16711680
  258. long backcolor = 134217739
  259. boolean enabled = false
  260. string text = "凭证号码:"
  261. alignment alignment = right!
  262. boolean focusrectangle = false
  263. end type
  264. type sle_outwarecode from singlelineedit within w_add_mxnewprice
  265. integer x = 329
  266. integer y = 248
  267. integer width = 521
  268. integer height = 92
  269. integer taborder = 10
  270. boolean bringtotop = true
  271. integer textsize = -9
  272. integer weight = 400
  273. fontcharset fontcharset = gb2312charset!
  274. fontpitch fontpitch = variable!
  275. string facename = "宋体"
  276. long textcolor = 16711680
  277. boolean autohscroll = false
  278. borderstyle borderstyle = stylelowered!
  279. end type
  280. type st_4 from statictext within w_add_mxnewprice
  281. integer x = 155
  282. integer y = 548
  283. integer width = 160
  284. integer height = 56
  285. boolean bringtotop = true
  286. integer textsize = -9
  287. integer weight = 400
  288. fontcharset fontcharset = gb2312charset!
  289. fontpitch fontpitch = variable!
  290. string facename = "宋体"
  291. long textcolor = 16711680
  292. long backcolor = 134217739
  293. boolean enabled = false
  294. string text = "单价:"
  295. alignment alignment = right!
  296. boolean focusrectangle = false
  297. end type
  298. type st_6 from statictext within w_add_mxnewprice
  299. integer x = 46
  300. integer y = 656
  301. integer width = 270
  302. integer height = 56
  303. boolean bringtotop = true
  304. integer textsize = -9
  305. integer weight = 400
  306. fontcharset fontcharset = gb2312charset!
  307. fontpitch fontpitch = variable!
  308. string facename = "宋体"
  309. long textcolor = 16711680
  310. long backcolor = 134217739
  311. boolean enabled = false
  312. string text = "备 注:"
  313. alignment alignment = right!
  314. boolean focusrectangle = false
  315. end type
  316. type sle_dscrp from singlelineedit within w_add_mxnewprice
  317. integer x = 329
  318. integer y = 640
  319. integer width = 1344
  320. integer height = 92
  321. integer taborder = 80
  322. boolean bringtotop = true
  323. integer textsize = -9
  324. integer weight = 400
  325. fontcharset fontcharset = gb2312charset!
  326. fontpitch fontpitch = variable!
  327. string facename = "宋体"
  328. long textcolor = 16711680
  329. string text = "手动添加"
  330. boolean autohscroll = false
  331. borderstyle borderstyle = stylelowered!
  332. end type
  333. type gb_1 from groupbox within w_add_mxnewprice
  334. integer x = 14
  335. integer y = 196
  336. integer width = 1710
  337. integer height = 708
  338. integer taborder = 20
  339. integer textsize = -9
  340. integer weight = 400
  341. fontcharset fontcharset = gb2312charset!
  342. fontpitch fontpitch = variable!
  343. string facename = "宋体"
  344. long textcolor = 16711680
  345. long backcolor = 134217739
  346. string text = "参数输入"
  347. end type
  348. type st_7 from statictext within w_add_mxnewprice
  349. integer x = 46
  350. integer y = 788
  351. integer width = 270
  352. integer height = 56
  353. boolean bringtotop = true
  354. integer textsize = -9
  355. integer weight = 400
  356. fontcharset fontcharset = gb2312charset!
  357. fontpitch fontpitch = variable!
  358. string facename = "宋体"
  359. long backcolor = 134217739
  360. boolean enabled = false
  361. string text = "登记时间:"
  362. alignment alignment = right!
  363. boolean focusrectangle = false
  364. end type
  365. type st_8 from statictext within w_add_mxnewprice
  366. integer x = 942
  367. integer y = 788
  368. integer width = 201
  369. integer height = 56
  370. boolean bringtotop = true
  371. integer textsize = -9
  372. integer weight = 400
  373. fontcharset fontcharset = gb2312charset!
  374. fontpitch fontpitch = variable!
  375. string facename = "宋体"
  376. long backcolor = 134217739
  377. boolean enabled = false
  378. string text = "登记人:"
  379. alignment alignment = right!
  380. boolean focusrectangle = false
  381. end type
  382. type st_9 from statictext within w_add_mxnewprice
  383. integer x = 46
  384. integer y = 20
  385. integer width = 270
  386. integer height = 56
  387. boolean bringtotop = true
  388. integer textsize = -9
  389. integer weight = 400
  390. fontcharset fontcharset = gb2312charset!
  391. fontpitch fontpitch = variable!
  392. string facename = "宋体"
  393. long textcolor = 33554432
  394. long backcolor = 134217739
  395. boolean enabled = false
  396. string text = "当前客户:"
  397. alignment alignment = right!
  398. boolean focusrectangle = false
  399. end type
  400. type st_10 from statictext within w_add_mxnewprice
  401. integer x = 46
  402. integer y = 112
  403. integer width = 270
  404. integer height = 56
  405. boolean bringtotop = true
  406. integer textsize = -9
  407. integer weight = 400
  408. fontcharset fontcharset = gb2312charset!
  409. fontpitch fontpitch = variable!
  410. string facename = "宋体"
  411. long textcolor = 33554432
  412. long backcolor = 134217739
  413. boolean enabled = false
  414. string text = "当前产品:"
  415. alignment alignment = right!
  416. boolean focusrectangle = false
  417. end type
  418. type em_price from editmask within w_add_mxnewprice
  419. integer x = 329
  420. integer y = 532
  421. integer width = 521
  422. integer height = 92
  423. integer taborder = 30
  424. boolean bringtotop = true
  425. integer textsize = -9
  426. integer weight = 400
  427. fontcharset fontcharset = gb2312charset!
  428. fontpitch fontpitch = variable!
  429. string facename = "宋体"
  430. long textcolor = 16711680
  431. alignment alignment = right!
  432. borderstyle borderstyle = stylelowered!
  433. string mask = "#,###0.00########"
  434. end type
  435. event modified;st_price.text=string(dec(em_zqrate.text) * dec(em_price.text),'#0.0000')
  436. end event
  437. event losefocus;st_price.text=string(dec(em_zqrate.text) * dec(em_price.text),'#0.0000')
  438. end event
  439. type st_id from statictext within w_add_mxnewprice
  440. boolean visible = false
  441. integer x = 453
  442. integer y = 764
  443. integer width = 247
  444. integer height = 76
  445. boolean bringtotop = true
  446. integer textsize = -9
  447. integer weight = 400
  448. fontcharset fontcharset = gb2312charset!
  449. fontpitch fontpitch = variable!
  450. string facename = "宋体"
  451. long textcolor = 33554432
  452. long backcolor = 67108864
  453. boolean enabled = false
  454. boolean focusrectangle = false
  455. end type
  456. type st_12 from statictext within w_add_mxnewprice
  457. integer x = 987
  458. integer y = 548
  459. integer width = 155
  460. integer height = 56
  461. boolean bringtotop = true
  462. integer textsize = -9
  463. integer weight = 400
  464. fontcharset fontcharset = gb2312charset!
  465. fontpitch fontpitch = variable!
  466. string facename = "宋体"
  467. long textcolor = 16711680
  468. long backcolor = 134217739
  469. boolean enabled = false
  470. string text = "折扣:"
  471. alignment alignment = right!
  472. boolean focusrectangle = false
  473. end type
  474. type em_zqrate from editmask within w_add_mxnewprice
  475. integer x = 1147
  476. integer y = 532
  477. integer width = 521
  478. integer height = 92
  479. integer taborder = 50
  480. boolean bringtotop = true
  481. integer textsize = -9
  482. integer weight = 400
  483. fontcharset fontcharset = gb2312charset!
  484. fontpitch fontpitch = variable!
  485. string facename = "宋体"
  486. long textcolor = 16711680
  487. string text = "1"
  488. alignment alignment = right!
  489. borderstyle borderstyle = stylelowered!
  490. string mask = "#,###0.0000"
  491. end type
  492. event modified;st_price.text=string(dec(em_zqrate.text) * dec(em_price.text),'#0.0000')
  493. end event
  494. event losefocus;st_price.text=string(dec(em_zqrate.text) * dec(em_price.text),'#0.0000')
  495. end event
  496. type st_price from statictext within w_add_mxnewprice
  497. integer x = 937
  498. integer y = 268
  499. integer width = 494
  500. integer height = 76
  501. boolean bringtotop = true
  502. integer textsize = -9
  503. integer weight = 400
  504. fontcharset fontcharset = gb2312charset!
  505. fontpitch fontpitch = variable!
  506. string facename = "宋体"
  507. long textcolor = 33554432
  508. long backcolor = 134217739
  509. boolean enabled = false
  510. alignment alignment = right!
  511. boolean focusrectangle = false
  512. end type
  513. type sle_2 from singlelineedit within w_add_mxnewprice
  514. integer x = 329
  515. integer y = 100
  516. integer width = 1033
  517. integer height = 92
  518. integer taborder = 160
  519. boolean bringtotop = true
  520. integer textsize = -9
  521. integer weight = 400
  522. fontcharset fontcharset = gb2312charset!
  523. fontpitch fontpitch = variable!
  524. string facename = "宋体"
  525. long backcolor = 16777215
  526. boolean displayonly = true
  527. borderstyle borderstyle = stylelowered!
  528. end type
  529. type sle_1 from singlelineedit within w_add_mxnewprice
  530. integer x = 329
  531. integer y = 4
  532. integer width = 1298
  533. integer height = 92
  534. integer taborder = 100
  535. boolean bringtotop = true
  536. integer textsize = -9
  537. integer weight = 400
  538. fontcharset fontcharset = gb2312charset!
  539. fontpitch fontpitch = variable!
  540. string facename = "宋体"
  541. long backcolor = 16777215
  542. boolean displayonly = true
  543. borderstyle borderstyle = stylelowered!
  544. end type
  545. type cb_select from uo_imflatbutton within w_add_mxnewprice
  546. integer x = 1367
  547. integer y = 96
  548. integer width = 274
  549. integer height = 96
  550. integer taborder = 180
  551. boolean bringtotop = true
  552. string text = "产品选择"
  553. end type
  554. event clicked;call super::clicked;s_edit_index_tran s_ch_tran //传递参数使用
  555. s_ch_tran.if_retrieve_all=false //是否一次RETRIEVE所有行
  556. s_ch_tran.work_mode=1 //0-单纯编辑模式 1-选择\编辑模式
  557. s_ch_tran.arg_pkid=0 //目标定位PKID (备用)
  558. //查询列(物料编码)部分内容,用于初步筛选
  559. OPENwithparm(w_mtrldef_edit,s_ch_tran) //调用
  560. s_mtrldef_array S_INSCUST
  561. S_INSCUST=Message.PowerObjectParm //接受返回结构
  562. iF S_INSCUST.mtrlid[1]>0 THEN
  563. sle_2.text=S_INSCUST.mtrlname[1]
  564. st_id.text=string(S_INSCUST.mtrlid[1])
  565. em_price.text=string(S_INSCUST.lmsaleprice[1])
  566. cb_add.enabled=true
  567. end if
  568. end event
  569. type em_opdate from editmask within w_add_mxnewprice
  570. integer x = 329
  571. integer y = 772
  572. integer width = 521
  573. integer height = 92
  574. integer taborder = 140
  575. boolean bringtotop = true
  576. integer textsize = -9
  577. integer weight = 400
  578. fontcharset fontcharset = gb2312charset!
  579. fontpitch fontpitch = variable!
  580. string facename = "宋体"
  581. long backcolor = 16777215
  582. boolean displayonly = true
  583. maskdatatype maskdatatype = datetimemask!
  584. string mask = "yyyy-mm-dd hh:mm"
  585. end type
  586. type sle_opemp from singlelineedit within w_add_mxnewprice
  587. integer x = 1152
  588. integer y = 772
  589. integer width = 521
  590. integer height = 92
  591. integer taborder = 170
  592. boolean bringtotop = true
  593. integer textsize = -9
  594. integer weight = 400
  595. fontcharset fontcharset = gb2312charset!
  596. fontpitch fontpitch = variable!
  597. string facename = "宋体"
  598. long backcolor = 16777215
  599. string text = "系统管理员"
  600. boolean displayonly = true
  601. end type
  602. type cb_add from uo_imflatbutton within w_add_mxnewprice
  603. integer x = 1093
  604. integer y = 916
  605. integer width = 274
  606. integer height = 96
  607. integer taborder = 150
  608. boolean bringtotop = true
  609. end type
  610. event clicked;call super::clicked;Long l_cusid
  611. Long l_mtrlid
  612. DateTime d_outdate
  613. String ls_mtrlcode,ls_status,ls_woodcode,ls_pcode,ls_unit
  614. String err_msg
  615. String arg_outwarecode
  616. Dec arg_price,arg_zqrate,arg_rate
  617. Long flag = 0
  618. long moneyid
  619. uo_cusprice uo_insertcusprice
  620. uo_insertcusprice = CREATE uo_cusprice
  621. d_outdate = DateTime(Today(),Time(0))
  622. l_cusid = s_get.cusid
  623. IF Trim(st_id.Text) <> '' THEN
  624. l_mtrlid = Long(st_id.Text)
  625. ELSE
  626. l_mtrlid = s_get.mtrlid
  627. END IF
  628. ls_mtrlcode = Trim(sle_2.Text)
  629. ls_status = Trim(sle_status.Text)
  630. ls_woodcode = Trim(ddlb_woodcode.Text)
  631. ls_pcode = Trim(ddlb_pcode.Text)
  632. ls_unit = Trim(ddlb_unit.text)
  633. arg_outwarecode = Trim(sle_outwarecode.Text)
  634. arg_price = Dec(em_price.Text)
  635. arg_zqrate = Dec(em_zqrate.Text)
  636. arg_rate = Dec(em_rate.Text)
  637. long spos,epos
  638. spos=pos(ddlb_money.text,'[')
  639. epos=pos(ddlb_money.text,']')
  640. moneyid=long(mid(ddlb_money.text,spos+1,epos - spos - 1 ))
  641. if moneyid = 0 or isnull(moneyid) then
  642. messagebox('提示','请选择币种',information!,ok!)
  643. return
  644. end if
  645. if trim(ls_unit) = '' or isnull(ls_unit) then
  646. messagebox('提示','请选择单位',information!,ok!)
  647. return
  648. end if
  649. //调用插入函数
  650. IF uo_insertcusprice.uf_update_custprice(0,0,l_cusid,l_mtrlid,ls_mtrlcode,ls_woodcode,ls_status,ls_pcode,0,arg_outwarecode,d_outdate,arg_price,arg_zqrate,0,1,sle_dscrp.Text,0,moneyid,TRUE,err_msg,arg_rate,Round(arg_price/arg_rate,10),ls_unit) = 0 THEN
  651. MessageBox('错误',err_msg,stopsign!,ok!)
  652. RETURN
  653. ELSE
  654. MessageBox('提示','添加成功',information!,ok!)
  655. Close(PARENT)
  656. END IF
  657. end event
  658. type st_1 from statictext within w_add_mxnewprice
  659. integer x = 942
  660. integer y = 268
  661. integer width = 201
  662. integer height = 48
  663. boolean bringtotop = true
  664. integer textsize = -9
  665. integer weight = 400
  666. fontcharset fontcharset = gb2312charset!
  667. fontpitch fontpitch = variable!
  668. string facename = "宋体"
  669. long textcolor = 16711680
  670. long backcolor = 134217739
  671. string text = "属性:"
  672. alignment alignment = right!
  673. boolean focusrectangle = false
  674. end type
  675. event constructor;if sys_option_change_status<>'' then this.text=sys_option_change_status
  676. end event
  677. type sle_status from dropdownlistbox within w_add_mxnewprice
  678. integer x = 1147
  679. integer y = 248
  680. integer width = 521
  681. integer height = 592
  682. integer taborder = 120
  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. boolean allowedit = true
  691. boolean sorted = false
  692. boolean vscrollbar = true
  693. borderstyle borderstyle = stylelowered!
  694. end type
  695. event constructor;String ls_colorname
  696. DECLARE cur_color CURSOR FOR
  697. SELECT u_color.colorname
  698. FROM u_color
  699. Order By u_color.colorname ;
  700. OPEN cur_color;
  701. FETCH cur_color INTO :ls_colorname;
  702. DO WHILE sqlca.SQLCode = 0
  703. THIS.AddItem(ls_colorname)
  704. FETCH cur_color INTO :ls_colorname;
  705. LOOP
  706. CLOSE cur_color;
  707. end event
  708. type st_13 from statictext within w_add_mxnewprice
  709. integer x = 59
  710. integer y = 360
  711. integer width = 270
  712. integer height = 48
  713. boolean bringtotop = true
  714. integer textsize = -9
  715. integer weight = 400
  716. fontcharset fontcharset = gb2312charset!
  717. fontpitch fontpitch = variable!
  718. string facename = "宋体"
  719. long textcolor = 16711680
  720. long backcolor = 134217739
  721. string text = "属性1:"
  722. alignment alignment = right!
  723. boolean focusrectangle = false
  724. end type
  725. event constructor;if sys_option_change_woodcode<>'' then this.text=sys_option_change_woodcode
  726. end event
  727. type ddlb_woodcode from dropdownlistbox within w_add_mxnewprice
  728. integer x = 329
  729. integer y = 340
  730. integer width = 526
  731. integer height = 712
  732. integer taborder = 40
  733. boolean bringtotop = true
  734. integer textsize = -9
  735. integer weight = 400
  736. fontcharset fontcharset = gb2312charset!
  737. fontpitch fontpitch = variable!
  738. string facename = "宋体"
  739. long textcolor = 33554432
  740. boolean allowedit = true
  741. boolean sorted = false
  742. boolean vscrollbar = true
  743. borderstyle borderstyle = stylelowered!
  744. end type
  745. event constructor;String ls_colorname_woodcode
  746. DECLARE cur_color_woodcode CURSOR FOR
  747. SELECT u_color_wood.woodcode
  748. FROM u_color_wood
  749. Order By u_color_wood.woodcode ;
  750. OPEN cur_color_woodcode;
  751. FETCH cur_color_woodcode INTO :ls_colorname_woodcode;
  752. DO WHILE sqlca.SQLCode = 0
  753. THIS.AddItem(ls_colorname_woodcode)
  754. FETCH cur_color_woodcode INTO :ls_colorname_woodcode;
  755. LOOP
  756. CLOSE cur_color_woodcode;
  757. end event
  758. type st_14 from statictext within w_add_mxnewprice
  759. integer x = 887
  760. integer y = 360
  761. integer width = 256
  762. integer height = 48
  763. boolean bringtotop = true
  764. integer textsize = -9
  765. integer weight = 400
  766. fontcharset fontcharset = gb2312charset!
  767. fontpitch fontpitch = variable!
  768. string facename = "宋体"
  769. long textcolor = 16711680
  770. long backcolor = 134217739
  771. string text = "属性2:"
  772. alignment alignment = right!
  773. boolean focusrectangle = false
  774. end type
  775. event constructor;if sys_option_change_pcode<>'' then this.text=sys_option_change_pcode
  776. end event
  777. type ddlb_pcode from dropdownlistbox within w_add_mxnewprice
  778. integer x = 1147
  779. integer y = 340
  780. integer width = 521
  781. integer height = 700
  782. integer taborder = 60
  783. boolean bringtotop = true
  784. integer textsize = -9
  785. integer weight = 400
  786. fontcharset fontcharset = gb2312charset!
  787. fontpitch fontpitch = variable!
  788. string facename = "宋体"
  789. long textcolor = 33554432
  790. boolean allowedit = true
  791. boolean sorted = false
  792. boolean vscrollbar = true
  793. borderstyle borderstyle = stylelowered!
  794. end type
  795. event constructor;String ls_colorname_pcode
  796. DECLARE cur_color_pcode CURSOR FOR
  797. SELECT u_color_pcode.pcode
  798. FROM u_color_pcode
  799. Order By u_color_pcode.pcode ;
  800. OPEN cur_color_pcode;
  801. FETCH cur_color_pcode INTO :ls_colorname_pcode;
  802. DO WHILE sqlca.SQLCode = 0
  803. THIS.AddItem(ls_colorname_pcode)
  804. FETCH cur_color_pcode INTO :ls_colorname_pcode;
  805. LOOP
  806. CLOSE cur_color_pcode;
  807. end event
  808. type ddlb_money from dropdownlistbox within w_add_mxnewprice
  809. integer x = 329
  810. integer y = 432
  811. integer width = 526
  812. integer height = 580
  813. integer taborder = 70
  814. boolean bringtotop = true
  815. integer textsize = -9
  816. integer weight = 400
  817. fontcharset fontcharset = gb2312charset!
  818. fontpitch fontpitch = variable!
  819. string facename = "宋体"
  820. long textcolor = 16711680
  821. boolean sorted = false
  822. boolean vscrollbar = true
  823. borderstyle borderstyle = stylelowered!
  824. end type
  825. event constructor;String ls_name
  826. long ll_id
  827. DECLARE cur_name CURSOR FOR
  828. SELECT cw_currency.name,moneyid
  829. FROM cw_currency
  830. Order By cw_currency.moneyid ;
  831. OPEN cur_name;
  832. FETCH cur_name INTO :ls_name,:ll_id;
  833. DO WHILE sqlca.SQLCode = 0
  834. THIS.AddItem(ls_name+fill(' ',50)+'['+string(ll_id)+']')
  835. FETCH cur_name INTO :ls_name,:ll_id;
  836. LOOP
  837. CLOSE cur_name;
  838. end event
  839. type st_3 from statictext within w_add_mxnewprice
  840. integer x = 155
  841. integer y = 448
  842. integer width = 160
  843. integer height = 56
  844. boolean bringtotop = true
  845. integer textsize = -9
  846. integer weight = 400
  847. fontcharset fontcharset = gb2312charset!
  848. fontpitch fontpitch = variable!
  849. string facename = "宋体"
  850. long textcolor = 16711680
  851. long backcolor = 134217739
  852. boolean enabled = false
  853. string text = "币种:"
  854. alignment alignment = right!
  855. boolean focusrectangle = false
  856. end type
  857. type st_5 from statictext within w_add_mxnewprice
  858. integer x = 878
  859. integer y = 448
  860. integer width = 160
  861. integer height = 56
  862. boolean bringtotop = true
  863. integer textsize = -9
  864. integer weight = 400
  865. fontcharset fontcharset = gb2312charset!
  866. fontpitch fontpitch = variable!
  867. string facename = "宋体"
  868. long textcolor = 16711680
  869. long backcolor = 134217739
  870. boolean enabled = false
  871. string text = "单位:"
  872. alignment alignment = right!
  873. boolean focusrectangle = false
  874. end type
  875. type ddlb_unit from dropdownlistbox within w_add_mxnewprice
  876. integer x = 1042
  877. integer y = 432
  878. integer width = 233
  879. integer height = 580
  880. integer taborder = 80
  881. boolean bringtotop = true
  882. integer textsize = -9
  883. integer weight = 400
  884. fontcharset fontcharset = gb2312charset!
  885. fontpitch fontpitch = variable!
  886. string facename = "宋体"
  887. long textcolor = 16711680
  888. boolean sorted = false
  889. boolean vscrollbar = true
  890. borderstyle borderstyle = stylelowered!
  891. end type
  892. event constructor;String ls_name
  893. long ll_id
  894. DECLARE cur_name CURSOR FOR
  895. SELECT unit FROM u_unit_def
  896. union
  897. SELECT unit FROM u_mtrldef;
  898. OPEN cur_name;
  899. FETCH cur_name INTO :ls_name;
  900. DO WHILE sqlca.SQLCode = 0
  901. THIS.AddItem(ls_name)
  902. FETCH cur_name INTO :ls_name;
  903. LOOP
  904. CLOSE cur_name;
  905. end event
  906. type em_rate from editmask within w_add_mxnewprice
  907. integer x = 1431
  908. integer y = 428
  909. integer width = 238
  910. integer height = 92
  911. integer taborder = 60
  912. boolean bringtotop = true
  913. integer textsize = -9
  914. integer weight = 400
  915. fontcharset fontcharset = gb2312charset!
  916. fontpitch fontpitch = variable!
  917. string facename = "宋体"
  918. long textcolor = 16711680
  919. string text = "1"
  920. alignment alignment = right!
  921. borderstyle borderstyle = stylelowered!
  922. string mask = "#,###0.00##"
  923. end type
  924. type st_11 from statictext within w_add_mxnewprice
  925. integer x = 1285
  926. integer y = 448
  927. integer width = 142
  928. integer height = 48
  929. boolean bringtotop = true
  930. integer textsize = -9
  931. integer weight = 400
  932. fontcharset fontcharset = gb2312charset!
  933. fontpitch fontpitch = variable!
  934. string facename = "宋体"
  935. long textcolor = 16711680
  936. long backcolor = 134217739
  937. boolean enabled = false
  938. string text = "比率:"
  939. alignment alignment = right!
  940. boolean focusrectangle = false
  941. end type