w_mtrldef_default.srw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528
  1. $PBExportHeader$w_mtrldef_default.srw
  2. forward
  3. global type w_mtrldef_default from w_publ_base
  4. end type
  5. type cbx_name from checkbox within w_mtrldef_default
  6. end type
  7. type cbx_type from checkbox within w_mtrldef_default
  8. end type
  9. type cbx_sectype from checkbox within w_mtrldef_default
  10. end type
  11. type cbx_mode from checkbox within w_mtrldef_default
  12. end type
  13. type cbx_unit from checkbox within w_mtrldef_default
  14. end type
  15. type cbx_packgcode from checkbox within w_mtrldef_default
  16. end type
  17. type cbx_packgqty from checkbox within w_mtrldef_default
  18. end type
  19. type gb_3 from groupbox within w_mtrldef_default
  20. end type
  21. type gb_2 from groupbox within w_mtrldef_default
  22. end type
  23. type gb_1 from groupbox within w_mtrldef_default
  24. end type
  25. type cbx_code from checkbox within w_mtrldef_default
  26. end type
  27. type em_code from editmask within w_mtrldef_default
  28. end type
  29. type st_2 from statictext within w_mtrldef_default
  30. end type
  31. type lb_1 from listbox within w_mtrldef_default
  32. end type
  33. type lb_2 from listbox within w_mtrldef_default
  34. end type
  35. type cb_1 from uo_imflatbutton within w_mtrldef_default
  36. end type
  37. type cbx_mtrlorigin from checkbox within w_mtrldef_default
  38. end type
  39. end forward
  40. global type w_mtrldef_default from w_publ_base
  41. integer width = 1728
  42. integer height = 1312
  43. string title = "物料定义默认值"
  44. boolean minbox = false
  45. windowtype windowtype = response!
  46. cbx_name cbx_name
  47. cbx_type cbx_type
  48. cbx_sectype cbx_sectype
  49. cbx_mode cbx_mode
  50. cbx_unit cbx_unit
  51. cbx_packgcode cbx_packgcode
  52. cbx_packgqty cbx_packgqty
  53. gb_3 gb_3
  54. gb_2 gb_2
  55. gb_1 gb_1
  56. cbx_code cbx_code
  57. em_code em_code
  58. st_2 st_2
  59. lb_1 lb_1
  60. lb_2 lb_2
  61. cb_1 cb_1
  62. cbx_mtrlorigin cbx_mtrlorigin
  63. end type
  64. global w_mtrldef_default w_mtrldef_default
  65. type variables
  66. s_setdef_mtrl s_checkdef
  67. string s_default
  68. end variables
  69. on w_mtrldef_default.create
  70. int iCurrent
  71. call super::create
  72. this.cbx_name=create cbx_name
  73. this.cbx_type=create cbx_type
  74. this.cbx_sectype=create cbx_sectype
  75. this.cbx_mode=create cbx_mode
  76. this.cbx_unit=create cbx_unit
  77. this.cbx_packgcode=create cbx_packgcode
  78. this.cbx_packgqty=create cbx_packgqty
  79. this.gb_3=create gb_3
  80. this.gb_2=create gb_2
  81. this.gb_1=create gb_1
  82. this.cbx_code=create cbx_code
  83. this.em_code=create em_code
  84. this.st_2=create st_2
  85. this.lb_1=create lb_1
  86. this.lb_2=create lb_2
  87. this.cb_1=create cb_1
  88. this.cbx_mtrlorigin=create cbx_mtrlorigin
  89. iCurrent=UpperBound(this.Control)
  90. this.Control[iCurrent+1]=this.cbx_name
  91. this.Control[iCurrent+2]=this.cbx_type
  92. this.Control[iCurrent+3]=this.cbx_sectype
  93. this.Control[iCurrent+4]=this.cbx_mode
  94. this.Control[iCurrent+5]=this.cbx_unit
  95. this.Control[iCurrent+6]=this.cbx_packgcode
  96. this.Control[iCurrent+7]=this.cbx_packgqty
  97. this.Control[iCurrent+8]=this.gb_3
  98. this.Control[iCurrent+9]=this.gb_2
  99. this.Control[iCurrent+10]=this.gb_1
  100. this.Control[iCurrent+11]=this.cbx_code
  101. this.Control[iCurrent+12]=this.em_code
  102. this.Control[iCurrent+13]=this.st_2
  103. this.Control[iCurrent+14]=this.lb_1
  104. this.Control[iCurrent+15]=this.lb_2
  105. this.Control[iCurrent+16]=this.cb_1
  106. this.Control[iCurrent+17]=this.cbx_mtrlorigin
  107. end on
  108. on w_mtrldef_default.destroy
  109. call super::destroy
  110. destroy(this.cbx_name)
  111. destroy(this.cbx_type)
  112. destroy(this.cbx_sectype)
  113. destroy(this.cbx_mode)
  114. destroy(this.cbx_unit)
  115. destroy(this.cbx_packgcode)
  116. destroy(this.cbx_packgqty)
  117. destroy(this.gb_3)
  118. destroy(this.gb_2)
  119. destroy(this.gb_1)
  120. destroy(this.cbx_code)
  121. destroy(this.em_code)
  122. destroy(this.st_2)
  123. destroy(this.lb_1)
  124. destroy(this.lb_2)
  125. destroy(this.cb_1)
  126. destroy(this.cbx_mtrlorigin)
  127. end on
  128. event open;call super::open;s_checkdef=Message.PowerObjectParm
  129. lb_1.additem('商品编码含['+s_checkdef.defmtrlcode+']')
  130. lb_1.additem('商品名称['+s_checkdef.defmtrlname+']')
  131. lb_1.additem('类别['+string(s_checkdef.defmtrltype)+']')
  132. lb_1.additem('二级类别['+s_checkdef.defsecmtrltype+']')
  133. lb_1.additem('规格['+ s_checkdef.defmtrlmode+']')
  134. lb_1.additem('库存单位['+s_checkdef.defunit+']')
  135. lb_1.additem('包装单位['+ s_checkdef.defPrdpackcode+']')
  136. lb_1.additem('包装件数['+string(s_checkdef.defpackqty)+']')
  137. lb_1.additem('来源['+string(s_checkdef.defmtrlorigin)+']')
  138. end event
  139. event close;IF cbx_name.Checked = FALSE THEN
  140. s_checkdef.defmtrlname = ''
  141. END IF
  142. IF cbx_mode.Checked = FALSE THEN
  143. s_checkdef.defmtrlmode = ''
  144. END IF
  145. IF cbx_type.Checked = FALSE THEN
  146. s_checkdef.defmtrltype = 0
  147. END IF
  148. IF cbx_sectype.Checked = FALSE THEN
  149. s_checkdef.defsecmtrltype = ''
  150. END IF
  151. IF cbx_packgcode.Checked = FALSE THEN
  152. s_checkdef.defPrdpackcode = ''
  153. END IF
  154. IF cbx_packgqty.Checked = FALSE THEN
  155. s_checkdef.defpackqty = 0
  156. END IF
  157. IF cbx_unit.Checked = FALSE THEN
  158. s_checkdef.defunit = ''
  159. END IF
  160. IF cbx_code.Checked = FALSE THEN
  161. s_checkdef.defmtrlcode = ''
  162. ELSE
  163. s_checkdef.defmtrlcode = Mid(s_checkdef.defmtrlcode,0,Integer(em_code.Text))
  164. END IF
  165. IF cbx_mtrlorigin.Checked = FALSE THEN
  166. s_checkdef.defmtrlorigin = 0
  167. END IF
  168. CloseWithReturn(w_mtrldef_default,s_checkdef)
  169. end event
  170. type cb_func from w_publ_base`cb_func within w_mtrldef_default
  171. boolean visible = false
  172. integer x = 1330
  173. integer y = 268
  174. boolean enabled = false
  175. end type
  176. type cb_exit from w_publ_base`cb_exit within w_mtrldef_default
  177. integer x = 1330
  178. integer y = 164
  179. string text = "返回"
  180. end type
  181. type cbx_name from checkbox within w_mtrldef_default
  182. integer x = 91
  183. integer y = 92
  184. integer width = 302
  185. integer height = 76
  186. boolean bringtotop = true
  187. integer textsize = -9
  188. integer weight = 400
  189. fontcharset fontcharset = gb2312charset!
  190. fontpitch fontpitch = variable!
  191. string facename = "宋体"
  192. long textcolor = 16711680
  193. long backcolor = 134217739
  194. string text = "物料名称"
  195. boolean checked = true
  196. end type
  197. type cbx_type from checkbox within w_mtrldef_default
  198. integer x = 645
  199. integer y = 92
  200. integer width = 302
  201. integer height = 76
  202. boolean bringtotop = true
  203. integer textsize = -9
  204. integer weight = 400
  205. fontcharset fontcharset = gb2312charset!
  206. fontpitch fontpitch = variable!
  207. string facename = "宋体"
  208. long textcolor = 16711680
  209. long backcolor = 134217739
  210. string text = "物料类别"
  211. boolean checked = true
  212. end type
  213. type cbx_sectype from checkbox within w_mtrldef_default
  214. integer x = 91
  215. integer y = 176
  216. integer width = 411
  217. integer height = 76
  218. boolean bringtotop = true
  219. integer textsize = -9
  220. integer weight = 400
  221. fontcharset fontcharset = gb2312charset!
  222. fontpitch fontpitch = variable!
  223. string facename = "宋体"
  224. long textcolor = 16711680
  225. long backcolor = 134217739
  226. string text = "物料二级类别"
  227. boolean checked = true
  228. end type
  229. type cbx_mode from checkbox within w_mtrldef_default
  230. integer x = 645
  231. integer y = 176
  232. integer width = 302
  233. integer height = 76
  234. boolean bringtotop = true
  235. integer textsize = -9
  236. integer weight = 400
  237. fontcharset fontcharset = gb2312charset!
  238. fontpitch fontpitch = variable!
  239. string facename = "宋体"
  240. long textcolor = 16711680
  241. long backcolor = 134217739
  242. string text = "物料规格"
  243. boolean checked = true
  244. end type
  245. type cbx_unit from checkbox within w_mtrldef_default
  246. integer x = 91
  247. integer y = 260
  248. integer width = 302
  249. integer height = 76
  250. boolean bringtotop = true
  251. integer textsize = -9
  252. integer weight = 400
  253. fontcharset fontcharset = gb2312charset!
  254. fontpitch fontpitch = variable!
  255. string facename = "宋体"
  256. long textcolor = 16711680
  257. long backcolor = 134217739
  258. string text = "库存单位"
  259. boolean checked = true
  260. end type
  261. type cbx_packgcode from checkbox within w_mtrldef_default
  262. integer x = 645
  263. integer y = 260
  264. integer width = 302
  265. integer height = 76
  266. boolean bringtotop = true
  267. integer textsize = -9
  268. integer weight = 400
  269. fontcharset fontcharset = gb2312charset!
  270. fontpitch fontpitch = variable!
  271. string facename = "宋体"
  272. long textcolor = 16711680
  273. long backcolor = 134217739
  274. string text = "包装单位"
  275. boolean checked = true
  276. end type
  277. type cbx_packgqty from checkbox within w_mtrldef_default
  278. integer x = 91
  279. integer y = 344
  280. integer width = 302
  281. integer height = 76
  282. boolean bringtotop = true
  283. integer textsize = -9
  284. integer weight = 400
  285. fontcharset fontcharset = gb2312charset!
  286. fontpitch fontpitch = variable!
  287. string facename = "宋体"
  288. long textcolor = 16711680
  289. long backcolor = 134217739
  290. string text = "包装数量"
  291. boolean checked = true
  292. end type
  293. type gb_3 from groupbox within w_mtrldef_default
  294. integer x = 859
  295. integer y = 548
  296. integer width = 832
  297. integer height = 664
  298. integer taborder = 70
  299. integer textsize = -9
  300. integer weight = 400
  301. fontcharset fontcharset = gb2312charset!
  302. fontpitch fontpitch = variable!
  303. string facename = "宋体"
  304. long textcolor = 33554432
  305. long backcolor = 134217739
  306. string text = "改变后的设定如下:"
  307. end type
  308. type gb_2 from groupbox within w_mtrldef_default
  309. integer x = 9
  310. integer y = 548
  311. integer width = 837
  312. integer height = 664
  313. integer taborder = 80
  314. integer textsize = -9
  315. integer weight = 400
  316. fontcharset fontcharset = gb2312charset!
  317. fontpitch fontpitch = variable!
  318. string facename = "宋体"
  319. long textcolor = 33554432
  320. long backcolor = 134217739
  321. string text = "商品原定义如下:"
  322. end type
  323. type gb_1 from groupbox within w_mtrldef_default
  324. integer x = 5
  325. integer y = 24
  326. integer width = 1243
  327. integer height = 504
  328. integer taborder = 20
  329. integer textsize = -9
  330. integer weight = 400
  331. fontcharset fontcharset = gb2312charset!
  332. fontpitch fontpitch = variable!
  333. string facename = "宋体"
  334. long backcolor = 134217739
  335. string text = "选择要设定默认值的项[已经全部选定]"
  336. end type
  337. type cbx_code from checkbox within w_mtrldef_default
  338. integer x = 645
  339. integer y = 344
  340. integer width = 302
  341. integer height = 76
  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 = 16711680
  349. long backcolor = 134217739
  350. string text = "取编码前"
  351. boolean checked = true
  352. end type
  353. type em_code from editmask within w_mtrldef_default
  354. integer x = 951
  355. integer y = 340
  356. integer width = 192
  357. integer height = 84
  358. integer taborder = 60
  359. boolean bringtotop = true
  360. integer textsize = -9
  361. integer weight = 400
  362. fontcharset fontcharset = gb2312charset!
  363. fontpitch fontpitch = variable!
  364. string facename = "宋体"
  365. long textcolor = 16711680
  366. string text = "4"
  367. alignment alignment = right!
  368. borderstyle borderstyle = stylelowered!
  369. string mask = "####"
  370. boolean spin = true
  371. end type
  372. type st_2 from statictext within w_mtrldef_default
  373. integer x = 1152
  374. integer y = 356
  375. integer width = 69
  376. integer height = 76
  377. boolean bringtotop = true
  378. integer textsize = -9
  379. integer weight = 400
  380. fontcharset fontcharset = gb2312charset!
  381. fontpitch fontpitch = variable!
  382. string facename = "宋体"
  383. long textcolor = 16711680
  384. long backcolor = 134217739
  385. boolean enabled = false
  386. string text = "位"
  387. boolean focusrectangle = false
  388. end type
  389. type lb_1 from listbox within w_mtrldef_default
  390. integer x = 27
  391. integer y = 608
  392. integer width = 791
  393. integer height = 568
  394. integer taborder = 90
  395. boolean bringtotop = true
  396. integer textsize = -9
  397. integer weight = 400
  398. fontcharset fontcharset = gb2312charset!
  399. fontpitch fontpitch = variable!
  400. string facename = "宋体"
  401. long textcolor = 33554432
  402. boolean hscrollbar = true
  403. boolean vscrollbar = true
  404. borderstyle borderstyle = stylelowered!
  405. end type
  406. type lb_2 from listbox within w_mtrldef_default
  407. integer x = 878
  408. integer y = 608
  409. integer width = 791
  410. integer height = 568
  411. integer taborder = 30
  412. boolean bringtotop = true
  413. integer textsize = -9
  414. integer weight = 400
  415. fontcharset fontcharset = gb2312charset!
  416. fontpitch fontpitch = variable!
  417. string facename = "宋体"
  418. long textcolor = 16711935
  419. boolean hscrollbar = true
  420. boolean vscrollbar = true
  421. borderstyle borderstyle = stylelowered!
  422. end type
  423. type cb_1 from uo_imflatbutton within w_mtrldef_default
  424. integer x = 1330
  425. integer y = 56
  426. integer width = 311
  427. integer taborder = 30
  428. boolean bringtotop = true
  429. boolean default = true
  430. string normalpicname = "ok.bmp"
  431. end type
  432. event clicked;call super::clicked;lb_2.reset()
  433. if cbx_code.checked=true then
  434. lb_2.additem('商品编码含['+mid(s_checkdef.defmtrlcode,0,integer(em_code.text))+']')
  435. end if
  436. if cbx_name.checked =true then
  437. lb_2.additem('商品名称['+s_checkdef.defmtrlname+']')
  438. end if
  439. if cbx_type.checked=true then
  440. lb_2.additem('类别['+string(s_checkdef.defmtrltype)+']')
  441. end if
  442. if cbx_sectype.checked=true then
  443. lb_2.additem('二级类别['+s_checkdef.defsecmtrltype+']')
  444. end if
  445. if cbx_mode.checked=true then
  446. lb_2.additem('规格['+ s_checkdef.defmtrlmode+']')
  447. end if
  448. if cbx_packgcode.checked=true then
  449. lb_2.additem('包装单位['+s_checkdef.defPrdpackcode+']')
  450. end if
  451. if cbx_packgqty.checked=true then
  452. lb_2.additem('包装数量['+string(s_checkdef.defpackqty)+']')
  453. end if
  454. if cbx_unit.checked=true then
  455. lb_2.additem('库存单位['+s_checkdef.defunit+']')
  456. end if
  457. if cbx_mtrlorigin.checked=true then
  458. lb_2.additem('来源['+string(s_checkdef.defmtrlorigin)+']')
  459. end if
  460. end event
  461. type cbx_mtrlorigin from checkbox within w_mtrldef_default
  462. integer x = 91
  463. integer y = 436
  464. integer width = 302
  465. integer height = 60
  466. boolean bringtotop = true
  467. integer textsize = -9
  468. integer weight = 400
  469. fontcharset fontcharset = gb2312charset!
  470. fontpitch fontpitch = variable!
  471. string facename = "宋体"
  472. long textcolor = 16711680
  473. long backcolor = 134217739
  474. string text = "来源"
  475. boolean checked = true
  476. end type