123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473 |
- $PBExportHeader$w_taobao_fy_input.srw
- forward
- global type w_taobao_fy_input from w_publ_base
- end type
- type cb_ok from uo_imflatbutton within w_taobao_fy_input
- end type
- type sle_transcode from singlelineedit within w_taobao_fy_input
- end type
- type cb_add from commandbutton within w_taobao_fy_input
- end type
- type dw_uc from u_dw_uc_rbtnfilter within w_taobao_fy_input
- end type
- type st_1 from statictext within w_taobao_fy_input
- end type
- type sle_itemtype from singlelineedit within w_taobao_fy_input
- end type
- type sle_itemname from singlelineedit within w_taobao_fy_input
- end type
- type st_4 from statictext within w_taobao_fy_input
- end type
- type st_3 from statictext within w_taobao_fy_input
- end type
- type cb_1 from uo_imflatbutton within w_taobao_fy_input
- end type
- type sle_itemcode from singlelineedit within w_taobao_fy_input
- end type
- type st_2 from statictext within w_taobao_fy_input
- end type
- end forward
- global type w_taobao_fy_input from w_publ_base
- integer width = 2089
- integer height = 1392
- string title = "网店运输单运费录入"
- boolean minbox = false
- windowtype windowtype = response!
- boolean center = true
- event ue_find ( )
- event ue_f8 ( )
- cb_ok cb_ok
- sle_transcode sle_transcode
- cb_add cb_add
- dw_uc dw_uc
- st_1 st_1
- sle_itemtype sle_itemtype
- sle_itemname sle_itemname
- st_4 st_4
- st_3 st_3
- cb_1 cb_1
- sle_itemcode sle_itemcode
- st_2 st_2
- end type
- global w_taobao_fy_input w_taobao_fy_input
- type variables
- long ins_itemid = 0
- end variables
- forward prototypes
- public subroutine wf_reset ()
- public function integer wf_save (ref string arg_msg)
- end prototypes
- event ue_find();String ls_transcode
- ls_transcode = sle_transcode.Text
- IF ls_transcode = '' THEN
- MessageBox('提示', '请输入运输单号')
- RETURN
- END IF
- Long cnt
- cnt = dw_uc.Retrieve(ls_transcode)
- IF cnt <= 0 THEN
- wf_reset()
- MessageBox('提示', '找不到运输单号' + ls_transcode)
- RETURN
- END IF
- dw_uc.SetColumn('amt')
- dw_uc.Setfocus()
- end event
- event ue_f8();Long itemid
- String itemcode,itemname, itemtype, arg_msg = ''
- IF uo_saletask_spi.wf_itemdef_ch(Ref itemid, Ref itemcode, Ref itemname, Ref itemtype, Ref arg_msg) <> 1 THEN
- IF arg_msg <> '' THEN
- MessageBox('ERROR', arg_msg)
- END IF
- RETURN
- END IF
- ins_itemid = itemid
- sle_itemcode.Text = itemcode
- sle_itemname.Text = itemname
- sle_itemtype.Text = itemtype
- end event
- public subroutine wf_reset ();dw_uc.Reset()
- dw_uc.insertRow(0)
- sle_transcode.Text = ''
- sle_transcode.SetFocus()
- end subroutine
- public function integer wf_save (ref string arg_msg);Int rslt = 1
- uo_taobao_outware uo_taobao
- uo_taobao = Create uo_taobao_outware
- dw_uc.AcceptText()
- IF ins_itemid <= 0 THEN
- rslt = 0
- arg_msg = '请选择费用项目'
- sle_itemcode.SetFocus()
- GOTO ext
- END IF
- IF dw_uc.Object.amt[1] <= 0 THEN
- rslt = 0
- arg_msg = '运费必须大于0'
- GOTO ext
- END IF
- IF uo_taobao.add_tranfy(dw_uc.Object.scid[1], dw_uc.Object.outwareid[1], ins_itemid, dw_uc.Object.amt[1], arg_msg, true) <> 1 THEN
- rslt = 0
- GOTO ext
- END IF
- ext:
- Destroy uo_taobao
- RETURN rslt
- end function
- on w_taobao_fy_input.create
- int iCurrent
- call super::create
- this.cb_ok=create cb_ok
- this.sle_transcode=create sle_transcode
- this.cb_add=create cb_add
- this.dw_uc=create dw_uc
- this.st_1=create st_1
- this.sle_itemtype=create sle_itemtype
- this.sle_itemname=create sle_itemname
- this.st_4=create st_4
- this.st_3=create st_3
- this.cb_1=create cb_1
- this.sle_itemcode=create sle_itemcode
- this.st_2=create st_2
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.cb_ok
- this.Control[iCurrent+2]=this.sle_transcode
- this.Control[iCurrent+3]=this.cb_add
- this.Control[iCurrent+4]=this.dw_uc
- this.Control[iCurrent+5]=this.st_1
- this.Control[iCurrent+6]=this.sle_itemtype
- this.Control[iCurrent+7]=this.sle_itemname
- this.Control[iCurrent+8]=this.st_4
- this.Control[iCurrent+9]=this.st_3
- this.Control[iCurrent+10]=this.cb_1
- this.Control[iCurrent+11]=this.sle_itemcode
- this.Control[iCurrent+12]=this.st_2
- end on
- on w_taobao_fy_input.destroy
- call super::destroy
- destroy(this.cb_ok)
- destroy(this.sle_transcode)
- destroy(this.cb_add)
- destroy(this.dw_uc)
- destroy(this.st_1)
- destroy(this.sle_itemtype)
- destroy(this.sle_itemname)
- destroy(this.st_4)
- destroy(this.st_3)
- destroy(this.cb_1)
- destroy(this.sle_itemcode)
- destroy(this.st_2)
- end on
- event open;call super::open;dw_uc.SetTransObject(sqlca)
- wf_reset()
- ins_itemid = Long(f_profilestring(sys_empid, This.ClassName(), 'ins_itemid', '0'))
- String ls_itemcode, ls_itemname, ls_itemtype
- SELECT top 1
- itemcode,
- itemname,
- itemtype
- INTO
- :ls_itemcode,
- :ls_itemname,
- :ls_itemtype
- FROM u_itemdef
- Where itemid = :ins_itemid;
- IF sqlca.SQLCode <> 0 THEN
- ins_itemid = 0
- TriggerEvent('ue_f8')
- RETURN
- END IF
- sle_itemcode.Text = ls_itemcode
- sle_itemname.Text = ls_itemname
- sle_itemtype.Text = ls_itemtype
- end event
- event close;call super::close;f_setprofilestring(sys_empid, This.ClassName(), 'ins_itemid', string(ins_itemid))
- end event
- type cb_func from w_publ_base`cb_func within w_taobao_fy_input
- boolean visible = false
- end type
- type cb_exit from w_publ_base`cb_exit within w_taobao_fy_input
- integer x = 1669
- integer y = 1184
- end type
- type cb_ok from uo_imflatbutton within w_taobao_fy_input
- integer x = 1326
- integer y = 1184
- integer width = 311
- integer height = 96
- integer taborder = 30
- boolean bringtotop = true
- string normalpicname = "save.bmp"
- end type
- event clicked;call super::clicked;String arg_msg
- IF wf_save(arg_msg) <> 1 THEN
- MessageBox('提示', arg_msg)
- RETURN
- END IF
- wf_reset()
- MessageBox('OK', '保存成功')
- end event
- type sle_transcode from singlelineedit within w_taobao_fy_input
- event ue_keydown pbm_keydown
- integer x = 306
- integer y = 172
- integer width = 709
- integer height = 84
- integer taborder = 30
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- borderstyle borderstyle = stylelowered!
- end type
- event ue_keydown;IF Key = keyenter! THEN
- cb_add.TriggerEvent(Clicked!)
- END IF
- end event
- type cb_add from commandbutton within w_taobao_fy_input
- integer x = 1019
- integer y = 172
- integer width = 192
- integer height = 84
- integer taborder = 40
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "查找"
- end type
- event clicked;parent.TriggerEvent('ue_find')
- end event
- type dw_uc from u_dw_uc_rbtnfilter within w_taobao_fy_input
- event ue_scroll pbm_vscroll
- integer x = 64
- integer y = 284
- integer width = 1947
- integer height = 872
- integer taborder = 110
- boolean bringtotop = true
- string dataobject = "dw_taobao_fy_input_uc"
- boolean livescroll = false
- end type
- event ue_scroll;RETURN 1
- end event
- event dwnkey;PARENT.TriggerEvent('user_key')
- IF Key = KeyDownArrow! THEN RETURN 1
- IF Key = KeyEnter! AND dw_uc.GetColumnName() = 'amt' THEN //
- cb_ok.TriggerEvent(clicked!)
- RETURN 1
- END IF
- end event
- type st_1 from statictext within w_taobao_fy_input
- integer x = 73
- integer y = 188
- integer width = 233
- integer height = 48
- 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 focusrectangle = false
- end type
- type sle_itemtype from singlelineedit within w_taobao_fy_input
- event ue_keyup pbm_keyup
- integer x = 1554
- integer y = 64
- integer width = 306
- integer height = 84
- integer taborder = 70
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean displayonly = true
- borderstyle borderstyle = stylelowered!
- end type
- type sle_itemname from singlelineedit within w_taobao_fy_input
- event ue_keyup pbm_keyup
- integer x = 983
- integer y = 64
- integer width = 306
- integer height = 84
- integer taborder = 80
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean displayonly = true
- borderstyle borderstyle = stylelowered!
- end type
- type st_4 from statictext within w_taobao_fy_input
- integer x = 1317
- integer y = 80
- integer width = 233
- integer height = 48
- 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 focusrectangle = false
- end type
- type st_3 from statictext within w_taobao_fy_input
- integer x = 750
- integer y = 80
- integer width = 233
- integer height = 48
- 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 focusrectangle = false
- end type
- type cb_1 from uo_imflatbutton within w_taobao_fy_input
- integer x = 613
- integer y = 56
- integer width = 105
- integer height = 96
- integer taborder = 60
- boolean bringtotop = true
- string text = ""
- string normalpicname = "find.bmp"
- end type
- event clicked;call super::clicked;Parent.TriggerEvent('ue_f8')
- end event
- type sle_itemcode from singlelineedit within w_taobao_fy_input
- event ue_keyup pbm_keyup
- integer x = 306
- integer y = 64
- integer width = 306
- integer height = 84
- integer taborder = 80
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 8388608
- borderstyle borderstyle = stylelowered!
- end type
- event ue_keyup;String ls_itemcode
- Long ll_itemid
- String ls_itemname, ls_itemtype
- IF Key = keyenter! THEN
- ls_itemcode = This.Text
- SELECT itemid,
- itemname,
- itemtype
- INTO :ll_itemid,
- :ls_itemname,
- :ls_itemtype
- FROM u_itemdef
- Where itemcode = :ls_itemcode;
- IF sqlca.SQLCode <> 0 THEN
- Parent.TriggerEvent('ue_f8')
- RETURN
- END IF
- ins_itemid = ll_itemid
- sle_itemname.Text = ls_itemname
- sle_itemtype.Text = ls_itemtype
- END IF
- end event
- type st_2 from statictext within w_taobao_fy_input
- integer x = 73
- integer y = 80
- integer width = 233
- integer height = 48
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 8388608
- long backcolor = 134217739
- string text = "项目编号"
- boolean focusrectangle = false
- end type
|