w_choose.srw 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  1. $PBExportHeader$w_choose.srw
  2. forward
  3. global type w_choose from w_publ_base
  4. end type
  5. type cb_1 from uo_imflatbutton within w_choose
  6. end type
  7. type cbx_enamt_notax_edit from checkbox within w_choose
  8. end type
  9. type cbx_enamt_edit from checkbox within w_choose
  10. end type
  11. type cbx_zk from checkbox within w_choose
  12. end type
  13. type cbx_auto_qty from checkbox within w_choose
  14. end type
  15. type st_weishu from statictext within w_choose
  16. end type
  17. type ddlb_weishu from dropdownlistbox within w_choose
  18. end type
  19. type gb_1 from groupbox within w_choose
  20. end type
  21. end forward
  22. global type w_choose from w_publ_base
  23. integer width = 2606
  24. integer height = 864
  25. string title = ""
  26. boolean minbox = false
  27. windowtype windowtype = response!
  28. cb_1 cb_1
  29. cbx_enamt_notax_edit cbx_enamt_notax_edit
  30. cbx_enamt_edit cbx_enamt_edit
  31. cbx_zk cbx_zk
  32. cbx_auto_qty cbx_auto_qty
  33. st_weishu st_weishu
  34. ddlb_weishu ddlb_weishu
  35. gb_1 gb_1
  36. end type
  37. global w_choose w_choose
  38. type variables
  39. s_choose s_c1
  40. end variables
  41. on w_choose.create
  42. int iCurrent
  43. call super::create
  44. this.cb_1=create cb_1
  45. this.cbx_enamt_notax_edit=create cbx_enamt_notax_edit
  46. this.cbx_enamt_edit=create cbx_enamt_edit
  47. this.cbx_zk=create cbx_zk
  48. this.cbx_auto_qty=create cbx_auto_qty
  49. this.st_weishu=create st_weishu
  50. this.ddlb_weishu=create ddlb_weishu
  51. this.gb_1=create gb_1
  52. iCurrent=UpperBound(this.Control)
  53. this.Control[iCurrent+1]=this.cb_1
  54. this.Control[iCurrent+2]=this.cbx_enamt_notax_edit
  55. this.Control[iCurrent+3]=this.cbx_enamt_edit
  56. this.Control[iCurrent+4]=this.cbx_zk
  57. this.Control[iCurrent+5]=this.cbx_auto_qty
  58. this.Control[iCurrent+6]=this.st_weishu
  59. this.Control[iCurrent+7]=this.ddlb_weishu
  60. this.Control[iCurrent+8]=this.gb_1
  61. end on
  62. on w_choose.destroy
  63. call super::destroy
  64. destroy(this.cb_1)
  65. destroy(this.cbx_enamt_notax_edit)
  66. destroy(this.cbx_enamt_edit)
  67. destroy(this.cbx_zk)
  68. destroy(this.cbx_auto_qty)
  69. destroy(this.st_weishu)
  70. destroy(this.ddlb_weishu)
  71. destroy(this.gb_1)
  72. end on
  73. event close;call super::close;closewithreturn(this, s_c1)
  74. end event
  75. event open;call super::open;s_c1.ifok = false
  76. end event
  77. type cb_func from w_publ_base`cb_func within w_choose
  78. boolean visible = false
  79. end type
  80. type cb_exit from w_publ_base`cb_exit within w_choose
  81. integer x = 1458
  82. integer y = 600
  83. string text = "取消"
  84. end type
  85. event cb_exit::clicked;call super::clicked;Close(w_choose)
  86. end event
  87. type cb_1 from uo_imflatbutton within w_choose
  88. integer x = 750
  89. integer y = 600
  90. integer width = 311
  91. integer height = 96
  92. integer taborder = 20
  93. boolean bringtotop = true
  94. string normalpicname = "ok.bmp"
  95. end type
  96. event clicked;call super::clicked;s_c1.ifok = true
  97. s_c1.amt_price = cbx_enamt_edit.Checked
  98. s_c1.amt_zk = cbx_zk.Checked
  99. s_c1.notax_price = cbx_enamt_notax_edit.Checked
  100. s_c1.ifauto = cbx_auto_qty.Checked
  101. s_c1.weishu = ddlb_weishu.text
  102. close(parent)
  103. end event
  104. type cbx_enamt_notax_edit from checkbox within w_choose
  105. integer x = 105
  106. integer y = 156
  107. integer width = 677
  108. integer height = 80
  109. boolean bringtotop = true
  110. integer textsize = -9
  111. integer weight = 400
  112. fontcharset fontcharset = gb2312charset!
  113. fontpitch fontpitch = variable!
  114. string facename = "宋体"
  115. long textcolor = 33554432
  116. long backcolor = 134217739
  117. string text = "录入不含税单价"
  118. end type
  119. event clicked;Int ifchecked
  120. IF THIS.Checked THEN
  121. ifchecked = 1
  122. this.weight = 700
  123. this.textcolor = 255
  124. ELSE
  125. ifchecked = 0
  126. this.weight = 400
  127. this.textcolor = 0
  128. END IF
  129. f_SetProfileString (sys_empid,'w_choose', "cbx_enamt_notax_edit", String(ifchecked))
  130. end event
  131. event constructor;Int ifchecked
  132. ifchecked = Integer(f_ProfileString (sys_empid,'w_choose', "cbx_enamt_notax_edit", '0'))
  133. IF ifchecked = 0 THEN
  134. THIS.checked = FALSE
  135. this.weight = 400
  136. this.textcolor = 0
  137. ELSE
  138. THIS.checked = TRUE
  139. this.weight = 700
  140. this.textcolor = 255
  141. END IF
  142. end event
  143. type cbx_enamt_edit from checkbox within w_choose
  144. integer x = 105
  145. integer y = 72
  146. integer width = 677
  147. integer height = 80
  148. boolean bringtotop = true
  149. integer textsize = -9
  150. integer weight = 400
  151. fontcharset fontcharset = gb2312charset!
  152. fontpitch fontpitch = variable!
  153. string facename = "宋体"
  154. long textcolor = 33554432
  155. long backcolor = 134217739
  156. string text = "录入金额计算单价"
  157. end type
  158. event clicked;Int ifchecked
  159. IF THIS.Checked THEN
  160. ifchecked = 1
  161. this.weight = 700
  162. this.textcolor = 255
  163. ELSE
  164. ifchecked = 0
  165. this.weight = 400
  166. this.textcolor = 0
  167. END IF
  168. f_SetProfileString (sys_empid,'w_choose', "cbx_enamt_edit", String(ifchecked))
  169. //cb_1.triggerevent(clicked!)
  170. end event
  171. event constructor;Int ifchecked
  172. ifchecked = Integer(f_ProfileString (sys_empid,'w_choose', "cbx_enamt_edit", '0'))
  173. IF ifchecked = 0 THEN
  174. THIS.checked = FALSE
  175. this.weight = 400
  176. this.textcolor = 0
  177. ELSE
  178. THIS.checked = TRUE
  179. this.weight = 700
  180. this.textcolor = 255
  181. END IF
  182. end event
  183. type cbx_zk from checkbox within w_choose
  184. integer x = 818
  185. integer y = 72
  186. integer width = 677
  187. integer height = 80
  188. boolean bringtotop = true
  189. integer textsize = -9
  190. integer weight = 400
  191. fontcharset fontcharset = gb2312charset!
  192. fontpitch fontpitch = variable!
  193. string facename = "宋体"
  194. long textcolor = 33554432
  195. long backcolor = 134217739
  196. string text = "录入金额计算折扣"
  197. end type
  198. event clicked;Int ifchecked
  199. IF THIS.Checked THEN
  200. ifchecked = 1
  201. this.weight = 700
  202. this.textcolor = 255
  203. ELSE
  204. ifchecked = 0
  205. this.weight = 400
  206. this.textcolor = 0
  207. END IF
  208. f_SetProfileString (sys_empid,'w_choose', "cbx_zk", String(ifchecked))
  209. end event
  210. event constructor;Int ifchecked
  211. ifchecked = Integer(f_ProfileString (sys_empid,'w_choose', "cbx_zk", '0'))
  212. IF ifchecked = 0 THEN
  213. THIS.checked = FALSE
  214. this.weight = 400
  215. this.textcolor = 0
  216. ELSE
  217. THIS.checked = TRUE
  218. this.weight = 700
  219. this.textcolor = 255
  220. END IF
  221. end event
  222. type cbx_auto_qty from checkbox within w_choose
  223. integer x = 1541
  224. integer y = 72
  225. integer width = 1015
  226. integer height = 80
  227. boolean bringtotop = true
  228. integer textsize = -9
  229. integer weight = 400
  230. fontcharset fontcharset = gb2312charset!
  231. fontpitch fontpitch = variable!
  232. string facename = "宋体"
  233. long textcolor = 33554432
  234. long backcolor = 134217739
  235. string text = "自动按数量和单价公式计算数量和单价"
  236. end type
  237. event clicked;Int ifchecked
  238. IF THIS.Checked THEN
  239. ifchecked = 1
  240. this.weight = 700
  241. this.textcolor = 255
  242. ddlb_weishu.visible=true
  243. st_weishu.visible=true
  244. ELSE
  245. ifchecked = 0
  246. this.weight = 400
  247. this.textcolor = 0
  248. ddlb_weishu.visible=false
  249. st_weishu.visible=false
  250. END IF
  251. f_SetProfileString (sys_empid,'w_choose', "cbx_auto_qty", String(ifchecked))
  252. end event
  253. event constructor;Int ifchecked
  254. ifchecked = Integer(f_ProfileString (sys_empid,'w_choose', "cbx_auto_qty", '0'))
  255. IF ifchecked = 0 THEN
  256. THIS.checked = FALSE
  257. this.weight = 400
  258. this.textcolor = 0
  259. ddlb_weishu.visible=false
  260. st_weishu.visible=false
  261. ELSE
  262. THIS.checked = TRUE
  263. this.weight = 700
  264. this.textcolor = 255
  265. ddlb_weishu.visible=true
  266. st_weishu.visible=true
  267. END IF
  268. end event
  269. type st_weishu from statictext within w_choose
  270. integer x = 1536
  271. integer y = 156
  272. integer width = 672
  273. integer height = 68
  274. boolean bringtotop = true
  275. integer textsize = -9
  276. integer weight = 400
  277. fontcharset fontcharset = gb2312charset!
  278. fontpitch fontpitch = variable!
  279. string facename = "宋体"
  280. long textcolor = 33554432
  281. long backcolor = 134217739
  282. string text = "自动计算数量保留小数位数"
  283. boolean focusrectangle = false
  284. end type
  285. type ddlb_weishu from dropdownlistbox within w_choose
  286. integer x = 2222
  287. integer y = 156
  288. integer width = 251
  289. integer height = 568
  290. integer taborder = 110
  291. boolean bringtotop = true
  292. integer textsize = -9
  293. integer weight = 400
  294. fontcharset fontcharset = gb2312charset!
  295. fontpitch fontpitch = variable!
  296. string facename = "宋体"
  297. long textcolor = 33554432
  298. string text = "2"
  299. string item[] = {"0","1","2","3","4","5"}
  300. borderstyle borderstyle = stylelowered!
  301. end type
  302. event constructor;dec li_autobj
  303. li_autobj = dec(f_ProfileString (sys_empid,'w_choose', "ddlb_weishu", '2'))
  304. IF li_autobj > 0 THEN
  305. This.Text = String(li_autobj)
  306. ELSE
  307. This.Text = String('2')
  308. END IF
  309. end event
  310. event destructor;f_SetProfileString (sys_empid,'w_choose', "ddlb_weishu", String(this.text))
  311. end event
  312. type gb_1 from groupbox within w_choose
  313. integer width = 2583
  314. integer height = 772
  315. integer taborder = 30
  316. integer textsize = -9
  317. integer weight = 400
  318. fontcharset fontcharset = gb2312charset!
  319. fontpitch fontpitch = variable!
  320. string facename = "宋体"
  321. long textcolor = 33554432
  322. long backcolor = 67108864
  323. end type