123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641 |
- $PBExportHeader$w_associat_sptcust_set.srw
- forward
- global type w_associat_sptcust_set from w_publ_base
- end type
- type st_1 from statictext within w_associat_sptcust_set
- end type
- type st_2 from statictext within w_associat_sptcust_set
- end type
- type st_3 from statictext within w_associat_sptcust_set
- end type
- type st_4 from statictext within w_associat_sptcust_set
- end type
- type sle_1 from singlelineedit within w_associat_sptcust_set
- end type
- type sle_2 from singlelineedit within w_associat_sptcust_set
- end type
- type sle_3 from singlelineedit within w_associat_sptcust_set
- end type
- type sle_4 from singlelineedit within w_associat_sptcust_set
- end type
- type cb_1 from uo_imflatbutton within w_associat_sptcust_set
- end type
- type cb_2 from uo_imflatbutton within w_associat_sptcust_set
- end type
- type cb_3 from uo_imflatbutton within w_associat_sptcust_set
- end type
- type cb_4 from uo_imflatbutton within w_associat_sptcust_set
- end type
- type cb_5 from uo_imflatbutton within w_associat_sptcust_set
- end type
- type st_5 from statictext within w_associat_sptcust_set
- end type
- type st_6 from statictext within w_associat_sptcust_set
- end type
- type dw_1 from datawindow within w_associat_sptcust_set
- end type
- type dw_2 from datawindow within w_associat_sptcust_set
- end type
- type sle_5 from singlelineedit within w_associat_sptcust_set
- end type
- type sle_6 from singlelineedit within w_associat_sptcust_set
- end type
- type sle_7 from singlelineedit within w_associat_sptcust_set
- end type
- type sle_8 from singlelineedit within w_associat_sptcust_set
- end type
- end forward
- global type w_associat_sptcust_set from w_publ_base
- integer width = 1847
- integer height = 1048
- string title = "往来对冲相关资料设置"
- st_1 st_1
- st_2 st_2
- st_3 st_3
- st_4 st_4
- sle_1 sle_1
- sle_2 sle_2
- sle_3 sle_3
- sle_4 sle_4
- cb_1 cb_1
- cb_2 cb_2
- cb_3 cb_3
- cb_4 cb_4
- cb_5 cb_5
- st_5 st_5
- st_6 st_6
- dw_1 dw_1
- dw_2 dw_2
- sle_5 sle_5
- sle_6 sle_6
- sle_7 sle_7
- sle_8 sle_8
- end type
- global w_associat_sptcust_set w_associat_sptcust_set
- forward prototypes
- public subroutine wf_getitemid (integer ai_num)
- public subroutine wf_getmtrlid (integer ai_num)
- public function string wf_getname (integer ai_id, integer ai_type)
- end prototypes
- public subroutine wf_getitemid (integer ai_num);String ls_itemcode
- long ll_itemid
-
- if ai_num = 1 then
- // ls_itemcode = sle_1.text
- ll_itemid=long( sle_1.text)
- elseif ai_num =2 then
- // ls_itemcode = sle_2.text
- ll_itemid=long( sle_2.text)
- end if
- IF NOT IsValid(w_itemdef_ch) THEN
- s_edit_index_tran s_ch_tran //传递参数使用
- s_ch_tran.if_retrieve_all = local_retrieve_all //是否一次retrieve所有行
- s_ch_tran.work_mode = 1 //0-单纯编辑模式 1-选择\编辑模式
- s_ch_tran.arg_pkid = 0 //目标定位pkid (备用)
- //s_ch_tran.arg_string_code = ls_itemcode //查询列(物料编码)部分内容,用于初步筛选
-
- OpenWithParm(w_itemdef_ch,s_ch_tran) //调用
-
- s_itemdef s_inscust
- s_inscust = Message.PowerObjectParm //接受返回结构
-
- IF s_inscust.itemid > 0 THEN //正常返回值则可以取以下值
- if ai_num = 1 then
- sle_1.text = string(s_inscust.itemid)
- sle_5.text = string(s_inscust.itemname )
- elseif ai_num =2 then
- sle_2.text = string(s_inscust.itemid)
- sle_6.text = string(s_inscust.itemname )
- end if
-
- // s_inscust.itemcode
- // s_inscust.itemname
-
- END IF
- END IF
- end subroutine
- public subroutine wf_getmtrlid (integer ai_num);Long ls_j
- s_edit_index_tran s_ch_tran //传递参数使用
- s_mtrldef_array S_INSCUST
- if ai_num = 1 then
- IF NOT IsValid(w_expensesdef_spt) THEN
- s_ch_tran.if_retrieve_all = FALSE //是否一次RETRIEVE所有行
- s_ch_tran.work_mode = 1 //0-单纯编辑模式 1-选择\编辑模式
- s_ch_tran.arg_pkid = 0 //目标定位PKID (备用)
- // s_ch_tran.arg_string_code = '' //查询列(物料编码)部分内容,用于初步筛选
- s_ch_tran.if_select_all = TRUE
- s_ch_tran.b_long = -1
- //s_ch_tran.arg_string_code = sle_3.text
- OpenWithParm(w_expensesdef_spt,s_ch_tran)
- S_INSCUST = Message.PowerObjectParm
- FOR ls_j = 1 TO UpperBound(S_INSCUST.mtrlid) //多个取最后一个2018-08-05
- IF S_INSCUST.mtrlid[ls_j] > 0 THEN
- sle_3.text =string( S_INSCUST.mtrlid[ls_j])
- sle_7.text =string( S_INSCUST.mtrlname[ls_j])
- // sle_3.text = S_INSCUST.mtrlcode[ls_j]
- // sle_3.text =S_INSCUST.mtrlname[ls_j]
- END IF
- NEXT
- END IF
- elseif ai_num = 2 then
-
- IF NOT IsValid(w_expensesdef) THEN
- // s_edit_index_tran s_ch_tran //传递参数使用
- s_ch_tran.if_retrieve_all = FALSE //是否一次RETRIEVE所有行
- s_ch_tran.work_mode = 1 //0-单纯编辑模式 1-选择\编辑模式
- s_ch_tran.arg_pkid = 0 //目标定位PKID (备用)
- s_ch_tran.arg_string_code = '' //查询列(物料编码)部分内容,用于初步筛选
- s_ch_tran.if_select_all = TRUE
- s_ch_tran.b_long = -1
- //s_ch_tran.arg_string_code = sle_4.text
- OpenWithParm(w_expensesdef,s_ch_tran)
- // s_mtrldef_array S_INSCUST
- S_INSCUST = Message.PowerObjectParm
- FOR ls_j = 1 TO UpperBound(S_INSCUST.mtrlid)
- IF S_INSCUST.mtrlid[ls_j] > 0 THEN
- sle_4.text = string(S_INSCUST.mtrlid[ls_j])
- sle_8.text =string( S_INSCUST.mtrlname[ls_j])
- // sle_4.text = S_INSCUST.mtrlcode[ls_j]
- // sle_4.text = S_INSCUST.mtrlname[ls_j]
- END IF
- NEXT
- END IF
- end if
- end subroutine
- public function string wf_getname (integer ai_id, integer ai_type);string ls_name
- if ai_type = 1 then
- SELECT
- U_Expenses.ExpensesName into :ls_name
- FROM U_Expenses
- where U_Expenses.Expensestype = 1
- and ExpensesID = :ai_id ;
- elseif ai_type = 0 then
- SELECT
- U_Expenses.ExpensesName into :ls_name
- FROM U_Expenses
- where U_Expenses.Expensestype = 0
- and ExpensesID = :ai_id ;
- else
- SELECT
- u_itemdef.itemname into :ls_name
- FROM u_itemdef
- where u_itemdef.itemid = :ai_id ;
-
- end if
- if isnull(ls_name ) then ls_name = ''
- return ls_name
- end function
- on w_associat_sptcust_set.create
- int iCurrent
- call super::create
- this.st_1=create st_1
- this.st_2=create st_2
- this.st_3=create st_3
- this.st_4=create st_4
- this.sle_1=create sle_1
- this.sle_2=create sle_2
- this.sle_3=create sle_3
- this.sle_4=create sle_4
- this.cb_1=create cb_1
- this.cb_2=create cb_2
- this.cb_3=create cb_3
- this.cb_4=create cb_4
- this.cb_5=create cb_5
- this.st_5=create st_5
- this.st_6=create st_6
- this.dw_1=create dw_1
- this.dw_2=create dw_2
- this.sle_5=create sle_5
- this.sle_6=create sle_6
- this.sle_7=create sle_7
- this.sle_8=create sle_8
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.st_1
- this.Control[iCurrent+2]=this.st_2
- this.Control[iCurrent+3]=this.st_3
- this.Control[iCurrent+4]=this.st_4
- this.Control[iCurrent+5]=this.sle_1
- this.Control[iCurrent+6]=this.sle_2
- this.Control[iCurrent+7]=this.sle_3
- this.Control[iCurrent+8]=this.sle_4
- this.Control[iCurrent+9]=this.cb_1
- this.Control[iCurrent+10]=this.cb_2
- this.Control[iCurrent+11]=this.cb_3
- this.Control[iCurrent+12]=this.cb_4
- this.Control[iCurrent+13]=this.cb_5
- this.Control[iCurrent+14]=this.st_5
- this.Control[iCurrent+15]=this.st_6
- this.Control[iCurrent+16]=this.dw_1
- this.Control[iCurrent+17]=this.dw_2
- this.Control[iCurrent+18]=this.sle_5
- this.Control[iCurrent+19]=this.sle_6
- this.Control[iCurrent+20]=this.sle_7
- this.Control[iCurrent+21]=this.sle_8
- end on
- on w_associat_sptcust_set.destroy
- call super::destroy
- destroy(this.st_1)
- destroy(this.st_2)
- destroy(this.st_3)
- destroy(this.st_4)
- destroy(this.sle_1)
- destroy(this.sle_2)
- destroy(this.sle_3)
- destroy(this.sle_4)
- destroy(this.cb_1)
- destroy(this.cb_2)
- destroy(this.cb_3)
- destroy(this.cb_4)
- destroy(this.cb_5)
- destroy(this.st_5)
- destroy(this.st_6)
- destroy(this.dw_1)
- destroy(this.dw_2)
- destroy(this.sle_5)
- destroy(this.sle_6)
- destroy(this.sle_7)
- destroy(this.sle_8)
- end on
- event open;call super::open;sle_1.text = f_ProfileString(0,spt_itemid, "spt_itemid", '0')
- sle_2.text = f_ProfileString (0,cus_itemid, "cus_itemid", '0')
- sle_3.text = f_ProfileString(0,spt_mtrlid, "spt_mtrlid", '0')
- sle_4.text = f_ProfileString (0,cus_mtrlid, "cus_mtrlid", '0')
- dw_1 .SetTransObject (sqlca)
- dw_2 .SetTransObject (sqlca)
- dw_1.insertrow(0)
- dw_2.insertrow(0)
- dw_1.object.relid[1] =long( f_ProfileString (0,spt_relid, "spt_relid", '0') )
- dw_2.object.relid[1] =long( f_ProfileString (0,cus_relid, "cus_relid", '0') )
-
- sle_5.text = wf_getname(long(sle_1.text) ,3)
- sle_6.text = wf_getname(long(sle_2.text) ,3)
- sle_7.text = wf_getname(long(sle_3.text) ,1)
- sle_8.text = wf_getname(long(sle_4.text) ,0)
- end event
- type cb_func from w_publ_base`cb_func within w_associat_sptcust_set
- boolean visible = false
- end type
- type cb_exit from w_publ_base`cb_exit within w_associat_sptcust_set
- integer x = 1029
- integer y = 804
- end type
- type st_1 from statictext within w_associat_sptcust_set
- integer x = 23
- integer y = 24
- integer width = 521
- integer height = 72
- 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 = "收支项目(供应商)"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type st_2 from statictext within w_associat_sptcust_set
- integer x = 23
- integer y = 156
- integer width = 521
- integer height = 72
- 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 = "收支项目(客户)"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type st_3 from statictext within w_associat_sptcust_set
- integer x = 23
- integer y = 288
- integer width = 521
- integer height = 72
- 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 = "供应商费用项目"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type st_4 from statictext within w_associat_sptcust_set
- integer x = 23
- integer y = 420
- integer width = 521
- integer height = 72
- 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 = "客户费用项目"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type sle_1 from singlelineedit within w_associat_sptcust_set
- boolean visible = false
- integer x = 773
- integer y = 124
- integer width = 731
- integer height = 104
- integer taborder = 20
- boolean bringtotop = true
- integer textsize = -12
- integer weight = 400
- fontcharset fontcharset = ansi!
- fontpitch fontpitch = variable!
- fontfamily fontfamily = swiss!
- string facename = "Arial"
- long textcolor = 33554432
- boolean enabled = false
- borderstyle borderstyle = stylelowered!
- end type
- type sle_2 from singlelineedit within w_associat_sptcust_set
- boolean visible = false
- integer x = 773
- integer y = 252
- integer width = 731
- integer height = 104
- integer taborder = 30
- boolean bringtotop = true
- integer textsize = -12
- integer weight = 400
- fontcharset fontcharset = ansi!
- fontpitch fontpitch = variable!
- fontfamily fontfamily = swiss!
- string facename = "Arial"
- long textcolor = 33554432
- boolean enabled = false
- borderstyle borderstyle = stylelowered!
- end type
- type sle_3 from singlelineedit within w_associat_sptcust_set
- boolean visible = false
- integer x = 773
- integer y = 380
- integer width = 731
- integer height = 104
- integer taborder = 40
- boolean bringtotop = true
- integer textsize = -12
- integer weight = 400
- fontcharset fontcharset = ansi!
- fontpitch fontpitch = variable!
- fontfamily fontfamily = swiss!
- string facename = "Arial"
- long textcolor = 33554432
- boolean enabled = false
- borderstyle borderstyle = stylelowered!
- end type
- type sle_4 from singlelineedit within w_associat_sptcust_set
- boolean visible = false
- integer x = 773
- integer y = 508
- integer width = 731
- integer height = 104
- integer taborder = 40
- boolean bringtotop = true
- integer textsize = -12
- integer weight = 400
- fontcharset fontcharset = ansi!
- fontpitch fontpitch = variable!
- fontfamily fontfamily = swiss!
- string facename = "Arial"
- long textcolor = 33554432
- boolean enabled = false
- borderstyle borderstyle = stylelowered!
- end type
- type cb_1 from uo_imflatbutton within w_associat_sptcust_set
- integer x = 384
- integer y = 804
- integer height = 96
- integer taborder = 20
- boolean bringtotop = true
- end type
- event clicked;call super::clicked;f_SetProfileString(0,spt_itemid, "spt_itemid", sle_1.text )
- f_SetProfileString(0,cus_itemid, "cus_itemid", sle_2.text )
- f_SetProfileString(0,spt_mtrlid, "spt_mtrlid", sle_3.text )
- f_SetProfileString(0,cus_mtrlid, "cus_mtrlid", sle_4.text )
- f_SetProfileString(0,spt_relid, "spt_relid",string(dw_1.object.relid[1]))
- f_SetProfileString(0,cus_relid, "cus_relid",string(dw_2.object.relid[1]))
-
- close(parent)
- end event
- type cb_2 from uo_imflatbutton within w_associat_sptcust_set
- integer x = 1403
- integer y = 12
- integer taborder = 30
- boolean bringtotop = true
- string text = "选择"
- end type
- event clicked;call super::clicked; wf_getitemid(1)
- end event
- type cb_3 from uo_imflatbutton within w_associat_sptcust_set
- integer x = 1403
- integer y = 152
- integer taborder = 40
- boolean bringtotop = true
- string text = "选择"
- end type
- event clicked;call super::clicked; wf_getitemid(2)
- end event
- type cb_4 from uo_imflatbutton within w_associat_sptcust_set
- integer x = 1403
- integer y = 280
- integer taborder = 50
- boolean bringtotop = true
- string text = "选择"
- end type
- event clicked;call super::clicked;wf_getmtrlid(1)
- end event
- type cb_5 from uo_imflatbutton within w_associat_sptcust_set
- integer x = 1403
- integer y = 420
- integer taborder = 50
- boolean bringtotop = true
- string text = "选择"
- end type
- event clicked;call super::clicked;wf_getmtrlid(2)
- end event
- type st_5 from statictext within w_associat_sptcust_set
- integer x = 23
- integer y = 552
- integer width = 521
- integer height = 72
- 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 = "结算方式(客户)"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type st_6 from statictext within w_associat_sptcust_set
- integer x = 23
- integer y = 684
- integer width = 521
- integer height = 72
- 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 = "结算方式(供应商)"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type dw_1 from datawindow within w_associat_sptcust_set
- integer x = 594
- integer y = 544
- integer width = 731
- integer height = 104
- integer taborder = 60
- boolean bringtotop = true
- string title = "none"
- string dataobject = "dw_associat_sptcust_set_relid"
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- type dw_2 from datawindow within w_associat_sptcust_set
- integer x = 594
- integer y = 668
- integer width = 731
- integer height = 104
- integer taborder = 70
- boolean bringtotop = true
- string title = "none"
- string dataobject = "dw_associat_sptcust_set_relid"
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- type sle_5 from singlelineedit within w_associat_sptcust_set
- integer x = 594
- integer y = 8
- integer width = 731
- integer height = 104
- integer taborder = 30
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean enabled = false
- borderstyle borderstyle = stylelowered!
- end type
- type sle_6 from singlelineedit within w_associat_sptcust_set
- integer x = 594
- integer y = 136
- integer width = 731
- integer height = 104
- integer taborder = 40
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean enabled = false
- borderstyle borderstyle = stylelowered!
- end type
- type sle_7 from singlelineedit within w_associat_sptcust_set
- integer x = 594
- integer y = 264
- integer width = 731
- integer height = 104
- integer taborder = 50
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean enabled = false
- borderstyle borderstyle = stylelowered!
- end type
- type sle_8 from singlelineedit within w_associat_sptcust_set
- integer x = 594
- integer y = 392
- integer width = 731
- integer height = 104
- integer taborder = 50
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean enabled = false
- borderstyle borderstyle = stylelowered!
- end type
|