w_add_mxnewprice_spt.srw 25 KB

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