123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546 |
- $PBExportHeader$w_spt_ecomm_edit.srw
- forward
- global type w_spt_ecomm_edit from w_publ_easyq
- end type
- type cbx_1 from checkbox within w_spt_ecomm_edit
- end type
- type cb_save from uo_imflatbutton within w_spt_ecomm_edit
- end type
- type cb_edit from uo_imflatbutton within w_spt_ecomm_edit
- end type
- type cb_p from uo_imflatbutton within w_spt_ecomm_edit
- end type
- type dw_2 from u_dw_rbtnfilter within w_spt_ecomm_edit
- end type
- end forward
- global type w_spt_ecomm_edit from w_publ_easyq
- string title = "供应商电子商务设置"
- event ue_p_check ( )
- event ue_p_nocheck ( )
- cbx_1 cbx_1
- cb_save cb_save
- cb_edit cb_edit
- cb_p cb_p
- dw_2 dw_2
- end type
- global w_spt_ecomm_edit w_spt_ecomm_edit
- type variables
- int ins_spttypeid
- end variables
- forward prototypes
- public function integer wf_face ()
- end prototypes
- 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
- public function integer wf_face ();cb_1.Enabled = Not dw_edit_mode
- cb_save.Enabled = dw_edit_mode
- cb_p.Enabled = dw_edit_mode
- cb_func.Enabled = Not dw_edit_mode
- cb_psetup.Enabled = Not dw_edit_mode
- cb_2.Enabled = Not dw_edit_mode
- cbx_yl.Enabled = Not dw_edit_mode
- cbx_1.Enabled = Not dw_edit_mode
- Int ls_i
- IF dw_edit_mode THEN
-
- dw_1.SetTabOrder('u_spt_ifecomm',10)
- dw_1.SetTabOrder('u_spt_commsccode',20)
-
- cb_edit.Text = '放弃'
- cb_edit.normalpicname = 'Undo.bmp'
- ELSE
- dw_1.SetTabOrder('u_spt_ifecomm',0)
- dw_1.SetTabOrder('u_spt_commsccode',0)
-
- cb_edit.Text = '修改'
- cb_edit.normalpicname = 'OPEN.bmp'
- END IF
- cb_edit.of_init_draw()
- cb_edit.of_paint()
- cb_edit.TriggerEvent('ue_textchange')
- RETURN 1
- end function
- on w_spt_ecomm_edit.create
- int iCurrent
- call super::create
- this.cbx_1=create cbx_1
- this.cb_save=create cb_save
- this.cb_edit=create cb_edit
- this.cb_p=create cb_p
- this.dw_2=create dw_2
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.cbx_1
- this.Control[iCurrent+2]=this.cb_save
- this.Control[iCurrent+3]=this.cb_edit
- this.Control[iCurrent+4]=this.cb_p
- this.Control[iCurrent+5]=this.dw_2
- end on
- on w_spt_ecomm_edit.destroy
- call super::destroy
- destroy(this.cbx_1)
- destroy(this.cb_save)
- destroy(this.cb_edit)
- destroy(this.cb_p)
- destroy(this.dw_2)
- 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
- type cb_func from w_publ_easyq`cb_func within w_spt_ecomm_edit
- integer x = 457
- end type
- type cb_exit from w_publ_easyq`cb_exit within w_spt_ecomm_edit
- integer x = 759
- end type
- type cb_2 from w_publ_easyq`cb_2 within w_spt_ecomm_edit
- 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_edit
- integer x = 1723
- integer y = 444
- boolean bringtotop = true
- end type
- type cb_1 from w_publ_easyq`cb_1 within w_spt_ecomm_edit
- boolean bringtotop = true
- end type
- event cb_1::clicked;call super::clicked;Int li_isuse
- IF cbx_1.Checked THEN
- li_isuse = 1
- ELSE
- li_isuse = -1
- END IF
- dw_1.Retrieve(li_isuse,sys_user_spttype,ins_spttypeid)
- end event
- type st_3 from w_publ_easyq`st_3 within w_spt_ecomm_edit
- boolean visible = false
- integer x = 1641
- integer y = 648
- end type
- type st_4 from w_publ_easyq`st_4 within w_spt_ecomm_edit
- boolean visible = false
- integer x = 1655
- integer y = 552
- end type
- type em_1 from w_publ_easyq`em_1 within w_spt_ecomm_edit
- 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_edit
- 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_edit
- integer x = 1723
- integer y = 584
- end type
- type cbx_yl from w_publ_easyq`cbx_yl within w_spt_ecomm_edit
- integer x = 1792
- integer y = 444
- end type
- type dw_1 from w_publ_easyq`dw_1 within w_spt_ecomm_edit
- integer x = 809
- integer y = 288
- integer width = 2898
- integer height = 1332
- string dataobject = "dw_spt_ecomm_edit"
- end type
- event dw_1::clicked;call super::clicked;
- IF row > 0 THEN
- THIS.SelectRow(0,FALSE)
- THIS.SetRow(row)
- THIS.SelectRow(row,TRUE)
- END IF
- end event
- event dw_1::doubleclicked;call super::doubleclicked;IF Not dw_edit_mode THEN RETURN
- Long ll_row
- ll_row = dw_1.GetRow()
- IF ll_row <= 0 THEN RETURN
- OpenWithParm(w_cuscomm_list_ch,1)
- s_cuscomm_ljfieb INS_RT_STRU
- INS_RT_STRU = Message.PowerObjectParm
- dw_1.Object.u_spt_ifecomm[ll_row] = 1
- dw_1.Object.u_spt_commcode[ll_row] = INS_RT_STRU.CusCode
- dw_1.accepttext()
- end event
- type sle_mtrl from w_publ_easyq`sle_mtrl within w_spt_ecomm_edit
- end type
- type sle_cust from w_publ_easyq`sle_cust within w_spt_ecomm_edit
- end type
- type st_mtrl from w_publ_easyq`st_mtrl within w_spt_ecomm_edit
- end type
- type st_cust from w_publ_easyq`st_cust within w_spt_ecomm_edit
- end type
- type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_spt_ecomm_edit
- end type
- type pb_em1 from w_publ_easyq`pb_em1 within w_spt_ecomm_edit
- boolean visible = false
- end type
- type pb_em2 from w_publ_easyq`pb_em2 within w_spt_ecomm_edit
- boolean visible = false
- end type
- type pb_2 from w_publ_easyq`pb_2 within w_spt_ecomm_edit
- boolean visible = false
- end type
- type cb_help from w_publ_easyq`cb_help within w_spt_ecomm_edit
- integer x = 608
- end type
- type cb_copyself from w_publ_easyq`cb_copyself within w_spt_ecomm_edit
- boolean visible = false
- end type
- type gb_1 from w_publ_easyq`gb_1 within w_spt_ecomm_edit
- integer x = 1463
- integer y = 476
- integer width = 183
- end type
- type ln_bar from w_publ_easyq`ln_bar within w_spt_ecomm_edit
- end type
- type ln_bar2 from w_publ_easyq`ln_bar2 within w_spt_ecomm_edit
- end type
- type r_bar from w_publ_easyq`r_bar within w_spt_ecomm_edit
- integer x = 2455
- integer y = 28
- end type
- type ln_1 from w_publ_easyq`ln_1 within w_spt_ecomm_edit
- integer beginy = 280
- integer endy = 280
- end type
- type ln_2 from w_publ_easyq`ln_2 within w_spt_ecomm_edit
- integer beginy = 284
- integer endy = 284
- end type
- type ln_3 from w_publ_easyq`ln_3 within w_spt_ecomm_edit
- boolean visible = false
- end type
- type ln_4 from w_publ_easyq`ln_4 within w_spt_ecomm_edit
- boolean visible = false
- end type
- type cbx_1 from checkbox within w_spt_ecomm_edit
- integer x = 23
- integer y = 200
- integer width = 402
- integer height = 60
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- string text = "只显示有效"
- boolean checked = true
- end type
- event clicked;cb_1.triggerevent(clicked!)
- end event
- type cb_save from uo_imflatbutton within w_spt_ecomm_edit
- integer x = 151
- integer width = 151
- integer height = 164
- integer taborder = 30
- boolean bringtotop = true
- boolean enabled = false
- string text = "保存"
- string normalpicname = "save.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;
- IF NOT f_power_ind(1563) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- Long ll_cnt
- Long ll_i
- String commcode,commsccode
- //dw_1.AcceptText()
- //
- //
- FOR ll_i = 1 To dw_1.RowCount()
- IF dw_1.Object.u_spt_ifecomm[ll_i] = 0 THEN
- dw_1.Object.u_spt_commcode[ll_i] = ''
- dw_1.Object.u_spt_commsccode[ll_i] = ''
- CONTINUE
- END IF
-
- // commcode = dw_1.Object.u_spt_commcode[ll_i]
- // commsccode = dw_1.Object.u_spt_commsccode[ll_i]
- //
- // IF Trim(commcode) = '' THEN
- // MessageBox('Error','供应商:'+String(dw_1.Object.sptcode[ll_i])+',使用电子商务功能,请选择对应的企业编号')
- // RETURN
- // END IF
- //
- // SELECT count(*)
- // INTO :ll_cnt
- // FROM u_spt
- // WHERE commcode = :commcode
- // And commsccode = :commsccode;
- // IF sqlca.SQLCode <> 0 THEN
- // MessageBox('Error','供应商:'+String(dw_1.Object.sptcode[ll_i])+',查询企业编号是否有重复失败,'+sqlca.SQLErrText)
- // RETURN
- // END IF
- //
- // IF ll_cnt > 1 THEN
- // MessageBox('系统提示','企业代码:'+commcode+',分部代号:'+commsccode+',已被使用,不能重复指定')
- // RETURN
- // END IF
- NEXT
- dw_1.AcceptText()
- IF dw_1.Update() <> 1 THEN
- ROLLBACK;
- MessageBox('提示','保存失败')
- RETURN
- END IF
- COMMIT;
- string arg_msg
- f_setsysoplog('供应商电子商务属性修改','供应商电子商务属性修改',arg_msg,true)
- MessageBox('提示','保存成功!')
- dw_edit_mode = NOT dw_edit_mode
- wf_face()
- cb_1.TriggerEvent(Clicked!)
- end event
- type cb_edit from uo_imflatbutton within w_spt_ecomm_edit
- integer x = 302
- integer width = 151
- integer height = 164
- integer taborder = 50
- boolean bringtotop = true
- string text = "修改"
- string normalpicname = "open.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;IF sys_email_sqlca.DBHandle() = 0 THEN
- MessageBox('Error','电子商务数据库连接失败,请检查')
- RETURN
- END IF
- IF Not f_power_ind(1563) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- Long ll_row_cnt
- ll_row_cnt = dw_1.RowCount()
- IF ll_row_cnt <= 0 THEN
- MessageBox('系统提示','没有可修改的资料!')
- RETURN
- END IF
- dw_edit_mode = Not dw_edit_mode
- wf_face()
- end event
- type cb_p from uo_imflatbutton within w_spt_ecomm_edit
- 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_edit
- integer y = 288
- integer width = 809
- integer height = 1340
- integer taborder = 90
- boolean bringtotop = true
- string dataobject = "dw_spttype_index"
- 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
|