$PBExportHeader$w_spt_ecomm_ch.srw forward global type w_spt_ecomm_ch from w_publ_easyq end type type cb_p from uo_imflatbutton within w_spt_ecomm_ch end type type dw_2 from u_dw_rbtnfilter within w_spt_ecomm_ch end type type cbx_all from checkbox within w_spt_ecomm_ch end type type cbx_mlselect from checkbox within w_spt_ecomm_ch end type type cb_ch from uo_imflatbutton within w_spt_ecomm_ch end type end forward global type w_spt_ecomm_ch from w_publ_easyq integer width = 3611 integer height = 2380 string title = "供应商电子商务设置" boolean minbox = false boolean maxbox = false boolean resizable = false windowtype windowtype = response! event ue_p_check ( ) event ue_p_nocheck ( ) cb_p cb_p dw_2 dw_2 cbx_all cbx_all cbx_mlselect cbx_mlselect cb_ch cb_ch end type global w_spt_ecomm_ch w_spt_ecomm_ch type variables int ins_spttypeid Boolean if_changeselect = TRUE Int if_mlselect = 0 s_custom_arr ins_rt_stru end variables event ue_p_check();IF MessageBox(publ_operator,'是否要确定要批设定限价', question!, YesNo!, 2) = 2 THEN RETURN END IF Long ll_i dw_1.AcceptText() dw_1.SetRedraw(False) FOR ll_i = 1 To dw_1.RowCount() dw_1.Object.u_spt_ifnocheck[ll_i] = 0 NEXT dw_1.SetRedraw(True) end event event ue_p_nocheck();IF MessageBox(publ_operator,'是否要确定要批设定不限价', question!, YesNo!, 2) = 2 THEN RETURN END IF Long ll_i dw_1.AcceptText() dw_1.SetRedraw(False) FOR ll_i = 1 To dw_1.RowCount() dw_1.Object.u_spt_ifnocheck[ll_i] = 1 NEXT dw_1.SetRedraw(True) end event on w_spt_ecomm_ch.create int iCurrent call super::create this.cb_p=create cb_p this.dw_2=create dw_2 this.cbx_all=create cbx_all this.cbx_mlselect=create cbx_mlselect this.cb_ch=create cb_ch iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.cb_p this.Control[iCurrent+2]=this.dw_2 this.Control[iCurrent+3]=this.cbx_all this.Control[iCurrent+4]=this.cbx_mlselect this.Control[iCurrent+5]=this.cb_ch end on on w_spt_ecomm_ch.destroy call super::destroy destroy(this.cb_p) destroy(this.dw_2) destroy(this.cbx_all) destroy(this.cbx_mlselect) destroy(this.cb_ch) end on event resize;ln_bar.EndX = This.Width ln_bar2.EndX = This.Width ln_1.EndX = This.Width ln_2.EndX = This.Width r_bar.Width = This.Width dw_1.Width = This.Width - dw_1.X - 40 dw_1.Height = This.Height - dw_1.Y - 150 dw_2.height = dw_1.height end event event open;call super::open;dw_2.retrieve() cb_1.triggerevent(clicked!) end event event ue_before_open;call super::ue_before_open;if_ue_retr = TRUE if_ue_filter = TRUE if_ue_sort = TRUE if_ue_sentdataout = TRUE dw_2.settransobject(sqlca) end event event close;call super::close;closewithreturn(this,INS_RT_STRU) end event type cb_func from w_publ_easyq`cb_func within w_spt_ecomm_ch integer x = 146 end type type cb_exit from w_publ_easyq`cb_exit within w_spt_ecomm_ch integer x = 466 end type type cb_2 from w_publ_easyq`cb_2 within w_spt_ecomm_ch integer x = 1847 integer y = 468 integer width = 165 integer taborder = 100 boolean bringtotop = true end type type cb_psetup from w_publ_easyq`cb_psetup within w_spt_ecomm_ch integer x = 1723 integer y = 444 boolean bringtotop = true end type type cb_1 from w_publ_easyq`cb_1 within w_spt_ecomm_ch boolean bringtotop = true end type event cb_1::clicked;call super::clicked;dw_1.Retrieve(sys_user_spttype,ins_spttypeid) end event type st_3 from w_publ_easyq`st_3 within w_spt_ecomm_ch boolean visible = false integer x = 1641 integer y = 648 end type type st_4 from w_publ_easyq`st_4 within w_spt_ecomm_ch boolean visible = false integer x = 1655 integer y = 552 end type type em_1 from w_publ_easyq`em_1 within w_spt_ecomm_ch boolean visible = false integer x = 1221 integer y = 480 integer taborder = 110 end type type em_2 from w_publ_easyq`em_2 within w_spt_ecomm_ch boolean visible = false integer x = 1275 integer y = 448 integer taborder = 140 end type type ddlb_yl from w_publ_easyq`ddlb_yl within w_spt_ecomm_ch integer x = 1723 integer y = 584 end type type cbx_yl from w_publ_easyq`cbx_yl within w_spt_ecomm_ch integer x = 1792 integer y = 444 end type type dw_1 from w_publ_easyq`dw_1 within w_spt_ecomm_ch integer x = 809 integer y = 288 integer width = 2898 integer height = 1332 string dataobject = "dw_spt_ecomm_ch" end type event dw_1::clicked;call super::clicked; IF row > 0 THEN THIS.SetRow(row) IF if_mlselect = 1 THEN IF if_changeselect THEN THIS.SelectRow(row,NOT THIS.IsSelected(row)) ELSE if_changeselect = TRUE END IF ELSE THIS.SelectRow(0,FALSE) THIS.SelectRow(row,TRUE) END IF END IF end event event dw_1::doubleclicked;call super::doubleclicked;cb_ch.TriggerEvent(Clicked!) end event event dw_1::rowfocuschanged;IF if_mlselect = 1 THEN IF currentrow <= 0 THEN RETURN IF KeyDown(keycontrol!) THEN IF THIS.IsSelected(currentrow) THEN THIS.SelectRow(currentrow,FALSE) if_changeselect = FALSE ELSE if_changeselect = TRUE END IF ELSE IF NOT THIS.IsSelected(currentrow) THEN THIS.SelectRow(currentrow,TRUE) if_changeselect = FALSE ELSE if_changeselect = TRUE END IF END IF ELSE IF dw_edit_mode THEN RETURN IF currentrow <= 0 THEN RETURN THIS.SelectRow(0,FALSE) THIS.SelectRow(currentrow,TRUE) END IF end event type sle_mtrl from w_publ_easyq`sle_mtrl within w_spt_ecomm_ch end type type sle_cust from w_publ_easyq`sle_cust within w_spt_ecomm_ch end type type st_mtrl from w_publ_easyq`st_mtrl within w_spt_ecomm_ch end type type st_cust from w_publ_easyq`st_cust within w_spt_ecomm_ch end type type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_spt_ecomm_ch end type type pb_em1 from w_publ_easyq`pb_em1 within w_spt_ecomm_ch boolean visible = false end type type pb_em2 from w_publ_easyq`pb_em2 within w_spt_ecomm_ch boolean visible = false end type type pb_2 from w_publ_easyq`pb_2 within w_spt_ecomm_ch boolean visible = false end type type cb_help from w_publ_easyq`cb_help within w_spt_ecomm_ch boolean visible = false integer x = 608 end type type cb_copyself from w_publ_easyq`cb_copyself within w_spt_ecomm_ch boolean visible = false end type type gb_1 from w_publ_easyq`gb_1 within w_spt_ecomm_ch integer x = 1463 integer y = 476 integer width = 183 end type type ln_bar from w_publ_easyq`ln_bar within w_spt_ecomm_ch end type type ln_bar2 from w_publ_easyq`ln_bar2 within w_spt_ecomm_ch end type type r_bar from w_publ_easyq`r_bar within w_spt_ecomm_ch integer x = 2455 integer y = 28 end type type ln_1 from w_publ_easyq`ln_1 within w_spt_ecomm_ch integer beginy = 280 integer endy = 280 end type type ln_2 from w_publ_easyq`ln_2 within w_spt_ecomm_ch integer beginy = 284 integer endy = 284 end type type ln_3 from w_publ_easyq`ln_3 within w_spt_ecomm_ch boolean visible = false end type type ln_4 from w_publ_easyq`ln_4 within w_spt_ecomm_ch boolean visible = false end type type cb_p from uo_imflatbutton within w_spt_ecomm_ch boolean visible = false integer x = 453 integer width = 219 integer height = 164 integer taborder = 40 boolean bringtotop = true boolean enabled = false string text = "批设置" string normalpicname = "open.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;m_Dfc_Control_PopupMenu dmPopupMenu String menustr menustr = "Text=批设限价~tEvent=ue_p_check" menustr = menustr + "|" + "Text=-" menustr = menustr + "|" + "Text=批设不限价~tEvent=ue_p_nocheck" IF Len(Trim(menustr)) <> 0 THEN dmPopupMenu = CREATE m_Dfc_Control_PopupMenu dmPopupMenu.mf_BuildMenu(THIS, menustr) dmPopupMenu.mf_PopMenu() DESTROY dmPopupMenu END IF end event type dw_2 from u_dw_rbtnfilter within w_spt_ecomm_ch integer y = 288 integer width = 809 integer height = 1340 integer taborder = 90 boolean bringtotop = true string dataobject = "dw_ljfieb_spttype_index_ch" boolean hscrollbar = true boolean vscrollbar = true end type event rowfocuschanged;call super::rowfocuschanged;IF dw_edit_mode THEN RETURN IF dw_2.GetRow() <= 0 THEN ins_spttypeid = 0 ELSE ins_spttypeid = dw_2.Object.spttypeid[dw_2.GetRow()] END IF IF currentrow > 0 THEN THIS.SelectRow(0,FALSE) THIS.SelectRow(currentrow,TRUE) END IF cb_1.triggerevent(clicked!) end event event rowfocuschanging;call super::rowfocuschanging;IF dw_edit_mode THEN RETURN end event type cbx_all from checkbox within w_spt_ecomm_ch integer x = 311 integer y = 192 integer width = 251 integer height = 64 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 boolean enabled = false string text = "全选" end type event clicked;IF dw_1.RowCount() <= 0 THEN RETURN Long li IF THIS.Checked THEN FOR li = 1 TO dw_1.RowCount() dw_1.SelectRow(li,TRUE) NEXT ELSE FOR li = 1 TO dw_1.RowCount() dw_1.SelectRow(li,FALSE) NEXT END IF end event type cbx_mlselect from checkbox within w_spt_ecomm_ch integer x = 37 integer y = 192 integer width = 256 integer height = 64 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long backcolor = 134217739 string text = "多选" end type event clicked;IF THIS.Checked THEN if_mlselect = 1 cbx_all.Enabled = TRUE // cbx_all.Checked = TRUE ELSE if_mlselect = 0 cbx_all.Enabled = FALSE cbx_all.Checked = FALSE Long li FOR li = 1 TO dw_1.RowCount() dw_1.SelectRow(li,FALSE) NEXT END IF f_SetProfileString (sys_empid,dw_1.DataObject, "if_mlselect", String(if_mlselect)) end event event constructor;if_mlselect=integer(f_ProfileString (sys_empid,dw_1.DATAOBJECT, "if_mlselect", '0')) if if_mlselect =0 then this.checked=false else this.checked=true cbx_all.enabled = true end if end event type cb_ch from uo_imflatbutton within w_spt_ecomm_ch integer x = 297 integer width = 165 integer height = 164 integer taborder = 40 boolean bringtotop = true string text = "选定" boolean default = true string normalpicname = "ok.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;Long ROW,ls_i = 0,chC = 0 dw_1.AcceptText() ROW = dw_1.RowCount() IF ROW <= 0 THEN MessageBox('系统提示','请先选择目标行!',StopSign!) RETURN END IF FOR ls_i = 1 To dw_1.RowCount() IF dw_1.IsSelected(ls_i) THEN chC++ INS_RT_STRU.cusid[chC] = dw_1.Object.sptid[ls_i] INS_RT_STRU.Name[chC] = dw_1.Object.Name[ls_i] INS_RT_STRU.cuscode[chC] = dw_1.Object.sptcode[ls_i] INS_RT_STRU.commcode[chC] = dw_1.Object.u_spt_commcode[ls_i] INS_RT_STRU.commsccode[chC] = dw_1.Object.u_spt_commsccode[ls_i] END IF NEXT IF chC = 0 THEN MessageBox('系统提示','请选择目标行') RETURN END IF Close(Parent) end event