w_p_quote_com.srw 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. $PBExportHeader$w_p_quote_com.srw
  2. forward
  3. global type w_p_quote_com from w_publ_base
  4. end type
  5. type st_1 from statictext within w_p_quote_com
  6. end type
  7. type ddlb_1 from dropdownlistbox within w_p_quote_com
  8. end type
  9. type em_1 from editmask within w_p_quote_com
  10. end type
  11. type st_2 from statictext within w_p_quote_com
  12. end type
  13. type ddlb_2 from dropdownlistbox within w_p_quote_com
  14. end type
  15. type st_3 from statictext within w_p_quote_com
  16. end type
  17. type cb_1 from uo_imflatbutton within w_p_quote_com
  18. end type
  19. end forward
  20. global type w_p_quote_com from w_publ_base
  21. integer width = 1335
  22. integer height = 656
  23. string title = "按公式批设定单价"
  24. boolean minbox = false
  25. windowtype windowtype = response!
  26. st_1 st_1
  27. ddlb_1 ddlb_1
  28. em_1 em_1
  29. st_2 st_2
  30. ddlb_2 ddlb_2
  31. st_3 st_3
  32. cb_1 cb_1
  33. end type
  34. global w_p_quote_com w_p_quote_com
  35. type variables
  36. s_edit_index_tran s_tran
  37. end variables
  38. on w_p_quote_com.create
  39. int iCurrent
  40. call super::create
  41. this.st_1=create st_1
  42. this.ddlb_1=create ddlb_1
  43. this.em_1=create em_1
  44. this.st_2=create st_2
  45. this.ddlb_2=create ddlb_2
  46. this.st_3=create st_3
  47. this.cb_1=create cb_1
  48. iCurrent=UpperBound(this.Control)
  49. this.Control[iCurrent+1]=this.st_1
  50. this.Control[iCurrent+2]=this.ddlb_1
  51. this.Control[iCurrent+3]=this.em_1
  52. this.Control[iCurrent+4]=this.st_2
  53. this.Control[iCurrent+5]=this.ddlb_2
  54. this.Control[iCurrent+6]=this.st_3
  55. this.Control[iCurrent+7]=this.cb_1
  56. end on
  57. on w_p_quote_com.destroy
  58. call super::destroy
  59. destroy(this.st_1)
  60. destroy(this.ddlb_1)
  61. destroy(this.em_1)
  62. destroy(this.st_2)
  63. destroy(this.ddlb_2)
  64. destroy(this.st_3)
  65. destroy(this.cb_1)
  66. end on
  67. event close;call super::close;closewithreturn(this,s_tran)
  68. end event
  69. type cb_func from w_publ_base`cb_func within w_p_quote_com
  70. boolean visible = false
  71. end type
  72. type cb_exit from w_publ_base`cb_exit within w_p_quote_com
  73. integer x = 795
  74. integer y = 388
  75. end type
  76. event cb_exit::clicked;s_tran.b_long = 0
  77. Close(PARENT)
  78. end event
  79. type st_1 from statictext within w_p_quote_com
  80. integer x = 59
  81. integer y = 88
  82. integer width = 507
  83. integer height = 48
  84. boolean bringtotop = true
  85. integer textsize = -9
  86. integer weight = 400
  87. fontcharset fontcharset = gb2312charset!
  88. fontpitch fontpitch = variable!
  89. string facename = "宋体"
  90. long textcolor = 33554432
  91. long backcolor = 134217739
  92. string text = "新单价 = 原单价 "
  93. boolean focusrectangle = false
  94. end type
  95. type ddlb_1 from dropdownlistbox within w_p_quote_com
  96. integer x = 535
  97. integer y = 76
  98. integer width = 242
  99. integer height = 300
  100. integer taborder = 30
  101. boolean bringtotop = true
  102. integer textsize = -9
  103. integer weight = 400
  104. fontcharset fontcharset = gb2312charset!
  105. fontpitch fontpitch = variable!
  106. string facename = "宋体"
  107. long textcolor = 33554432
  108. string text = "×"
  109. boolean sorted = false
  110. string item[] = {"×","÷","+","-"}
  111. borderstyle borderstyle = stylelowered!
  112. end type
  113. type em_1 from editmask within w_p_quote_com
  114. integer x = 800
  115. integer y = 80
  116. integer width = 338
  117. integer height = 84
  118. integer taborder = 40
  119. boolean bringtotop = true
  120. integer textsize = -9
  121. integer weight = 400
  122. fontcharset fontcharset = gb2312charset!
  123. fontpitch fontpitch = variable!
  124. string facename = "宋体"
  125. long textcolor = 33554432
  126. string text = "1.00"
  127. borderstyle borderstyle = stylelowered!
  128. string mask = "###,###.00###"
  129. end type
  130. type st_2 from statictext within w_p_quote_com
  131. integer x = 64
  132. integer y = 204
  133. integer width = 562
  134. integer height = 48
  135. boolean bringtotop = true
  136. integer textsize = -9
  137. integer weight = 400
  138. fontcharset fontcharset = gb2312charset!
  139. fontpitch fontpitch = variable!
  140. string facename = "宋体"
  141. long textcolor = 33554432
  142. long backcolor = 134217739
  143. string text = "最终结果保留小数点后"
  144. boolean focusrectangle = false
  145. end type
  146. type ddlb_2 from dropdownlistbox within w_p_quote_com
  147. integer x = 631
  148. integer y = 192
  149. integer width = 174
  150. integer height = 356
  151. integer taborder = 50
  152. boolean bringtotop = true
  153. integer textsize = -9
  154. integer weight = 400
  155. fontcharset fontcharset = gb2312charset!
  156. fontpitch fontpitch = variable!
  157. string facename = "宋体"
  158. long textcolor = 33554432
  159. string text = "2"
  160. boolean sorted = false
  161. string item[] = {"0","1","2","3","4","5"}
  162. borderstyle borderstyle = stylelowered!
  163. end type
  164. type st_3 from statictext within w_p_quote_com
  165. integer x = 814
  166. integer y = 204
  167. integer width = 101
  168. integer height = 48
  169. boolean bringtotop = true
  170. integer textsize = -9
  171. integer weight = 400
  172. fontcharset fontcharset = gb2312charset!
  173. fontpitch fontpitch = variable!
  174. string facename = "宋体"
  175. long textcolor = 33554432
  176. long backcolor = 134217739
  177. string text = "位"
  178. boolean focusrectangle = false
  179. end type
  180. type cb_1 from uo_imflatbutton within w_p_quote_com
  181. integer x = 256
  182. integer y = 388
  183. integer width = 311
  184. integer height = 96
  185. integer taborder = 20
  186. boolean bringtotop = true
  187. end type
  188. event clicked;call super::clicked;IF ddlb_1.Text = '÷' AND Dec(em_1.Text) <= 0 THEN
  189. MessageBox('系统提示','执行除法时,参数不能为0!')
  190. em_1.SetFocus()
  191. RETURN
  192. END IF
  193. IF ddlb_1.Text = '×' THEN
  194. s_tran.b_long = 1
  195. ELSEIF ddlb_1.Text = '÷' THEN
  196. s_tran.b_long = 2
  197. ELSEIF ddlb_1.Text = '+' THEN
  198. s_tran.b_long = 3
  199. ELSEIF ddlb_1.Text = '-' THEN
  200. s_tran.b_long = 4
  201. END IF
  202. s_tran.c_long = Long(ddlb_2.Text)
  203. s_tran.c_decimal = Dec(em_1.Text)
  204. Close(PARENT)
  205. end event