w_spt_ecomm_ch.srw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512
  1. $PBExportHeader$w_spt_ecomm_ch.srw
  2. forward
  3. global type w_spt_ecomm_ch from w_publ_easyq
  4. end type
  5. type cb_p from uo_imflatbutton within w_spt_ecomm_ch
  6. end type
  7. type dw_2 from u_dw_rbtnfilter within w_spt_ecomm_ch
  8. end type
  9. type cbx_all from checkbox within w_spt_ecomm_ch
  10. end type
  11. type cbx_mlselect from checkbox within w_spt_ecomm_ch
  12. end type
  13. type cb_ch from uo_imflatbutton within w_spt_ecomm_ch
  14. end type
  15. end forward
  16. global type w_spt_ecomm_ch from w_publ_easyq
  17. integer width = 3611
  18. integer height = 2380
  19. string title = "供应商电子商务设置"
  20. boolean minbox = false
  21. boolean maxbox = false
  22. boolean resizable = false
  23. windowtype windowtype = response!
  24. event ue_p_check ( )
  25. event ue_p_nocheck ( )
  26. cb_p cb_p
  27. dw_2 dw_2
  28. cbx_all cbx_all
  29. cbx_mlselect cbx_mlselect
  30. cb_ch cb_ch
  31. end type
  32. global w_spt_ecomm_ch w_spt_ecomm_ch
  33. type variables
  34. int ins_spttypeid
  35. Boolean if_changeselect = TRUE
  36. Int if_mlselect = 0
  37. s_custom_arr ins_rt_stru
  38. end variables
  39. event ue_p_check();IF MessageBox(publ_operator,'是否要确定要批设定限价', question!, YesNo!, 2) = 2 THEN
  40. RETURN
  41. END IF
  42. Long ll_i
  43. dw_1.AcceptText()
  44. dw_1.SetRedraw(False)
  45. FOR ll_i = 1 To dw_1.RowCount()
  46. dw_1.Object.u_spt_ifnocheck[ll_i] = 0
  47. NEXT
  48. dw_1.SetRedraw(True)
  49. end event
  50. event ue_p_nocheck();IF MessageBox(publ_operator,'是否要确定要批设定不限价', question!, YesNo!, 2) = 2 THEN
  51. RETURN
  52. END IF
  53. Long ll_i
  54. dw_1.AcceptText()
  55. dw_1.SetRedraw(False)
  56. FOR ll_i = 1 To dw_1.RowCount()
  57. dw_1.Object.u_spt_ifnocheck[ll_i] = 1
  58. NEXT
  59. dw_1.SetRedraw(True)
  60. end event
  61. on w_spt_ecomm_ch.create
  62. int iCurrent
  63. call super::create
  64. this.cb_p=create cb_p
  65. this.dw_2=create dw_2
  66. this.cbx_all=create cbx_all
  67. this.cbx_mlselect=create cbx_mlselect
  68. this.cb_ch=create cb_ch
  69. iCurrent=UpperBound(this.Control)
  70. this.Control[iCurrent+1]=this.cb_p
  71. this.Control[iCurrent+2]=this.dw_2
  72. this.Control[iCurrent+3]=this.cbx_all
  73. this.Control[iCurrent+4]=this.cbx_mlselect
  74. this.Control[iCurrent+5]=this.cb_ch
  75. end on
  76. on w_spt_ecomm_ch.destroy
  77. call super::destroy
  78. destroy(this.cb_p)
  79. destroy(this.dw_2)
  80. destroy(this.cbx_all)
  81. destroy(this.cbx_mlselect)
  82. destroy(this.cb_ch)
  83. end on
  84. event resize;ln_bar.EndX = This.Width
  85. ln_bar2.EndX = This.Width
  86. ln_1.EndX = This.Width
  87. ln_2.EndX = This.Width
  88. r_bar.Width = This.Width
  89. dw_1.Width = This.Width - dw_1.X - 40
  90. dw_1.Height = This.Height - dw_1.Y - 150
  91. dw_2.height = dw_1.height
  92. end event
  93. event open;call super::open;dw_2.retrieve()
  94. cb_1.triggerevent(clicked!)
  95. end event
  96. event ue_before_open;call super::ue_before_open;if_ue_retr = TRUE
  97. if_ue_filter = TRUE
  98. if_ue_sort = TRUE
  99. if_ue_sentdataout = TRUE
  100. dw_2.settransobject(sqlca)
  101. end event
  102. event close;call super::close;closewithreturn(this,INS_RT_STRU)
  103. end event
  104. type cb_func from w_publ_easyq`cb_func within w_spt_ecomm_ch
  105. integer x = 146
  106. end type
  107. type cb_exit from w_publ_easyq`cb_exit within w_spt_ecomm_ch
  108. integer x = 466
  109. end type
  110. type cb_2 from w_publ_easyq`cb_2 within w_spt_ecomm_ch
  111. integer x = 1847
  112. integer y = 468
  113. integer width = 165
  114. integer taborder = 100
  115. boolean bringtotop = true
  116. end type
  117. type cb_psetup from w_publ_easyq`cb_psetup within w_spt_ecomm_ch
  118. integer x = 1723
  119. integer y = 444
  120. boolean bringtotop = true
  121. end type
  122. type cb_1 from w_publ_easyq`cb_1 within w_spt_ecomm_ch
  123. boolean bringtotop = true
  124. end type
  125. event cb_1::clicked;call super::clicked;dw_1.Retrieve(sys_user_spttype,ins_spttypeid)
  126. end event
  127. type st_3 from w_publ_easyq`st_3 within w_spt_ecomm_ch
  128. boolean visible = false
  129. integer x = 1641
  130. integer y = 648
  131. end type
  132. type st_4 from w_publ_easyq`st_4 within w_spt_ecomm_ch
  133. boolean visible = false
  134. integer x = 1655
  135. integer y = 552
  136. end type
  137. type em_1 from w_publ_easyq`em_1 within w_spt_ecomm_ch
  138. boolean visible = false
  139. integer x = 1221
  140. integer y = 480
  141. integer taborder = 110
  142. end type
  143. type em_2 from w_publ_easyq`em_2 within w_spt_ecomm_ch
  144. boolean visible = false
  145. integer x = 1275
  146. integer y = 448
  147. integer taborder = 140
  148. end type
  149. type ddlb_yl from w_publ_easyq`ddlb_yl within w_spt_ecomm_ch
  150. integer x = 1723
  151. integer y = 584
  152. end type
  153. type cbx_yl from w_publ_easyq`cbx_yl within w_spt_ecomm_ch
  154. integer x = 1792
  155. integer y = 444
  156. end type
  157. type dw_1 from w_publ_easyq`dw_1 within w_spt_ecomm_ch
  158. integer x = 809
  159. integer y = 288
  160. integer width = 2898
  161. integer height = 1332
  162. string dataobject = "dw_spt_ecomm_ch"
  163. end type
  164. event dw_1::clicked;call super::clicked;
  165. IF row > 0 THEN
  166. THIS.SetRow(row)
  167. IF if_mlselect = 1 THEN
  168. IF if_changeselect THEN
  169. THIS.SelectRow(row,NOT THIS.IsSelected(row))
  170. ELSE
  171. if_changeselect = TRUE
  172. END IF
  173. ELSE
  174. THIS.SelectRow(0,FALSE)
  175. THIS.SelectRow(row,TRUE)
  176. END IF
  177. END IF
  178. end event
  179. event dw_1::doubleclicked;call super::doubleclicked;cb_ch.TriggerEvent(Clicked!)
  180. end event
  181. event dw_1::rowfocuschanged;IF if_mlselect = 1 THEN
  182. IF currentrow <= 0 THEN RETURN
  183. IF KeyDown(keycontrol!) THEN
  184. IF THIS.IsSelected(currentrow) THEN
  185. THIS.SelectRow(currentrow,FALSE)
  186. if_changeselect = FALSE
  187. ELSE
  188. if_changeselect = TRUE
  189. END IF
  190. ELSE
  191. IF NOT THIS.IsSelected(currentrow) THEN
  192. THIS.SelectRow(currentrow,TRUE)
  193. if_changeselect = FALSE
  194. ELSE
  195. if_changeselect = TRUE
  196. END IF
  197. END IF
  198. ELSE
  199. IF dw_edit_mode THEN RETURN
  200. IF currentrow <= 0 THEN RETURN
  201. THIS.SelectRow(0,FALSE)
  202. THIS.SelectRow(currentrow,TRUE)
  203. END IF
  204. end event
  205. type sle_mtrl from w_publ_easyq`sle_mtrl within w_spt_ecomm_ch
  206. end type
  207. type sle_cust from w_publ_easyq`sle_cust within w_spt_ecomm_ch
  208. end type
  209. type st_mtrl from w_publ_easyq`st_mtrl within w_spt_ecomm_ch
  210. end type
  211. type st_cust from w_publ_easyq`st_cust within w_spt_ecomm_ch
  212. end type
  213. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_spt_ecomm_ch
  214. end type
  215. type pb_em1 from w_publ_easyq`pb_em1 within w_spt_ecomm_ch
  216. boolean visible = false
  217. end type
  218. type pb_em2 from w_publ_easyq`pb_em2 within w_spt_ecomm_ch
  219. boolean visible = false
  220. end type
  221. type pb_2 from w_publ_easyq`pb_2 within w_spt_ecomm_ch
  222. boolean visible = false
  223. end type
  224. type cb_help from w_publ_easyq`cb_help within w_spt_ecomm_ch
  225. boolean visible = false
  226. integer x = 608
  227. end type
  228. type cb_copyself from w_publ_easyq`cb_copyself within w_spt_ecomm_ch
  229. boolean visible = false
  230. end type
  231. type gb_1 from w_publ_easyq`gb_1 within w_spt_ecomm_ch
  232. integer x = 1463
  233. integer y = 476
  234. integer width = 183
  235. end type
  236. type ln_bar from w_publ_easyq`ln_bar within w_spt_ecomm_ch
  237. end type
  238. type ln_bar2 from w_publ_easyq`ln_bar2 within w_spt_ecomm_ch
  239. end type
  240. type r_bar from w_publ_easyq`r_bar within w_spt_ecomm_ch
  241. integer x = 2455
  242. integer y = 28
  243. end type
  244. type ln_1 from w_publ_easyq`ln_1 within w_spt_ecomm_ch
  245. integer beginy = 280
  246. integer endy = 280
  247. end type
  248. type ln_2 from w_publ_easyq`ln_2 within w_spt_ecomm_ch
  249. integer beginy = 284
  250. integer endy = 284
  251. end type
  252. type ln_3 from w_publ_easyq`ln_3 within w_spt_ecomm_ch
  253. boolean visible = false
  254. end type
  255. type ln_4 from w_publ_easyq`ln_4 within w_spt_ecomm_ch
  256. boolean visible = false
  257. end type
  258. type cb_p from uo_imflatbutton within w_spt_ecomm_ch
  259. boolean visible = false
  260. integer x = 453
  261. integer width = 219
  262. integer height = 164
  263. integer taborder = 40
  264. boolean bringtotop = true
  265. boolean enabled = false
  266. string text = "批设置"
  267. string normalpicname = "open.bmp"
  268. integer picsize = 16
  269. toolbaralignment pic_align = alignattop!
  270. boolean border = false
  271. end type
  272. event clicked;call super::clicked;m_Dfc_Control_PopupMenu dmPopupMenu
  273. String menustr
  274. menustr = "Text=批设限价~tEvent=ue_p_check"
  275. menustr = menustr + "|" + "Text=-"
  276. menustr = menustr + "|" + "Text=批设不限价~tEvent=ue_p_nocheck"
  277. IF Len(Trim(menustr)) <> 0 THEN
  278. dmPopupMenu = CREATE m_Dfc_Control_PopupMenu
  279. dmPopupMenu.mf_BuildMenu(THIS, menustr)
  280. dmPopupMenu.mf_PopMenu()
  281. DESTROY dmPopupMenu
  282. END IF
  283. end event
  284. type dw_2 from u_dw_rbtnfilter within w_spt_ecomm_ch
  285. integer y = 288
  286. integer width = 809
  287. integer height = 1340
  288. integer taborder = 90
  289. boolean bringtotop = true
  290. string dataobject = "dw_ljfieb_spttype_index_ch"
  291. boolean hscrollbar = true
  292. boolean vscrollbar = true
  293. end type
  294. event rowfocuschanged;call super::rowfocuschanged;IF dw_edit_mode THEN RETURN
  295. IF dw_2.GetRow() <= 0 THEN
  296. ins_spttypeid = 0
  297. ELSE
  298. ins_spttypeid = dw_2.Object.spttypeid[dw_2.GetRow()]
  299. END IF
  300. IF currentrow > 0 THEN
  301. THIS.SelectRow(0,FALSE)
  302. THIS.SelectRow(currentrow,TRUE)
  303. END IF
  304. cb_1.triggerevent(clicked!)
  305. end event
  306. event rowfocuschanging;call super::rowfocuschanging;IF dw_edit_mode THEN RETURN
  307. end event
  308. type cbx_all from checkbox within w_spt_ecomm_ch
  309. integer x = 311
  310. integer y = 192
  311. integer width = 251
  312. integer height = 64
  313. boolean bringtotop = true
  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. boolean enabled = false
  322. string text = "全选"
  323. end type
  324. event clicked;IF dw_1.RowCount() <= 0 THEN RETURN
  325. Long li
  326. IF THIS.Checked THEN
  327. FOR li = 1 TO dw_1.RowCount()
  328. dw_1.SelectRow(li,TRUE)
  329. NEXT
  330. ELSE
  331. FOR li = 1 TO dw_1.RowCount()
  332. dw_1.SelectRow(li,FALSE)
  333. NEXT
  334. END IF
  335. end event
  336. type cbx_mlselect from checkbox within w_spt_ecomm_ch
  337. integer x = 37
  338. integer y = 192
  339. integer width = 256
  340. integer height = 64
  341. boolean bringtotop = true
  342. integer textsize = -9
  343. integer weight = 400
  344. fontcharset fontcharset = gb2312charset!
  345. fontpitch fontpitch = variable!
  346. string facename = "宋体"
  347. long backcolor = 134217739
  348. string text = "多选"
  349. end type
  350. event clicked;IF THIS.Checked THEN
  351. if_mlselect = 1
  352. cbx_all.Enabled = TRUE
  353. // cbx_all.Checked = TRUE
  354. ELSE
  355. if_mlselect = 0
  356. cbx_all.Enabled = FALSE
  357. cbx_all.Checked = FALSE
  358. Long li
  359. FOR li = 1 TO dw_1.RowCount()
  360. dw_1.SelectRow(li,FALSE)
  361. NEXT
  362. END IF
  363. f_SetProfileString (sys_empid,dw_1.DataObject, "if_mlselect", String(if_mlselect))
  364. end event
  365. event constructor;if_mlselect=integer(f_ProfileString (sys_empid,dw_1.DATAOBJECT, "if_mlselect", '0'))
  366. if if_mlselect =0 then
  367. this.checked=false
  368. else
  369. this.checked=true
  370. cbx_all.enabled = true
  371. end if
  372. end event
  373. type cb_ch from uo_imflatbutton within w_spt_ecomm_ch
  374. integer x = 297
  375. integer width = 165
  376. integer height = 164
  377. integer taborder = 40
  378. boolean bringtotop = true
  379. string text = "选定"
  380. boolean default = true
  381. string normalpicname = "ok.bmp"
  382. integer picsize = 16
  383. toolbaralignment pic_align = alignattop!
  384. boolean border = false
  385. end type
  386. event clicked;call super::clicked;Long ROW,ls_i = 0,chC = 0
  387. dw_1.AcceptText()
  388. ROW = dw_1.RowCount()
  389. IF ROW <= 0 THEN
  390. MessageBox('系统提示','请先选择目标行!',StopSign!)
  391. RETURN
  392. END IF
  393. FOR ls_i = 1 To dw_1.RowCount()
  394. IF dw_1.IsSelected(ls_i) THEN
  395. chC++
  396. INS_RT_STRU.cusid[chC] = dw_1.Object.sptid[ls_i]
  397. INS_RT_STRU.Name[chC] = dw_1.Object.Name[ls_i]
  398. INS_RT_STRU.cuscode[chC] = dw_1.Object.sptcode[ls_i]
  399. INS_RT_STRU.commcode[chC] = dw_1.Object.u_spt_commcode[ls_i]
  400. INS_RT_STRU.commsccode[chC] = dw_1.Object.u_spt_commsccode[ls_i]
  401. END IF
  402. NEXT
  403. IF chC = 0 THEN
  404. MessageBox('系统提示','请选择目标行')
  405. RETURN
  406. END IF
  407. Close(Parent)
  408. end event