123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529 |
- $PBExportHeader$w_aifmb_addcuscomm_request2.srw
- forward
- global type w_aifmb_addcuscomm_request2 from window
- end type
- type cbx_3 from checkbox within w_aifmb_addcuscomm_request2
- end type
- type cbx_2 from checkbox within w_aifmb_addcuscomm_request2
- end type
- type cbx_1 from checkbox within w_aifmb_addcuscomm_request2
- end type
- type cb_6 from commandbutton within w_aifmb_addcuscomm_request2
- end type
- type em_1 from editmask within w_aifmb_addcuscomm_request2
- end type
- type cb_5 from commandbutton within w_aifmb_addcuscomm_request2
- end type
- type em_2 from editmask within w_aifmb_addcuscomm_request2
- end type
- type cb_4 from commandbutton within w_aifmb_addcuscomm_request2
- end type
- type cb_3 from commandbutton within w_aifmb_addcuscomm_request2
- end type
- type cb_2 from commandbutton within w_aifmb_addcuscomm_request2
- end type
- type cb_1 from commandbutton within w_aifmb_addcuscomm_request2
- end type
- type dw_1 from u_dw_rbtnfilter within w_aifmb_addcuscomm_request2
- end type
- end forward
- global type w_aifmb_addcuscomm_request2 from window
- integer width = 3214
- integer height = 2028
- windowtype windowtype = child!
- long backcolor = 67108864
- string icon = "AppIcon!"
- boolean center = true
- event ue_search ( )
- cbx_3 cbx_3
- cbx_2 cbx_2
- cbx_1 cbx_1
- cb_6 cb_6
- em_1 em_1
- cb_5 cb_5
- em_2 em_2
- cb_4 cb_4
- cb_3 cb_3
- cb_2 cb_2
- cb_1 cb_1
- dw_1 dw_1
- end type
- global w_aifmb_addcuscomm_request2 w_aifmb_addcuscomm_request2
- event ue_search();DataStore ds_productcode
- uo_aifmb lo_aifmb
- ds_productcode = Create DataStore
- lo_aifmb = Create uo_aifmb
- Int rslt = 1
- String arg_msg
- ds_productcode.DataObject = dw_1.DataObject
- Long pageindex = 0
- Long pagesize = 0
- pageindex = Long(em_1.Text)
- IF pageindex <= 0 THEN
- em_1.Text = '1'
- pageindex = 1
- END IF
- pagesize = Long(em_2.Text)
- IF pagesize <= 0 THEN
- em_2.Text = '10'
- pagesize = 10
- END IF
- IF lo_aifmb.uf_GetEntLinkMsgList(ds_productcode, cbx_1.Checked, cbx_2.Checked, cbx_3.Checked, pageindex, pagesize, arg_msg) <> 1 THEN
- rslt = 0
- GOTO ext
- END IF
- dw_1.Reset()
- ds_productcode.RowsCopy(1, ds_productcode.RowCount(), Primary!, dw_1, 1, Primary!)
- ext:
- Destroy ds_productcode
- Destroy lo_aifmb
- IF rslt = 0 THEN
- MessageBox('ERROR', arg_msg)
- END IF
- end event
- on w_aifmb_addcuscomm_request2.create
- this.cbx_3=create cbx_3
- this.cbx_2=create cbx_2
- this.cbx_1=create cbx_1
- this.cb_6=create cb_6
- this.em_1=create em_1
- this.cb_5=create cb_5
- this.em_2=create em_2
- this.cb_4=create cb_4
- this.cb_3=create cb_3
- this.cb_2=create cb_2
- this.cb_1=create cb_1
- this.dw_1=create dw_1
- this.Control[]={this.cbx_3,&
- this.cbx_2,&
- this.cbx_1,&
- this.cb_6,&
- this.em_1,&
- this.cb_5,&
- this.em_2,&
- this.cb_4,&
- this.cb_3,&
- this.cb_2,&
- this.cb_1,&
- this.dw_1}
- end on
- on w_aifmb_addcuscomm_request2.destroy
- destroy(this.cbx_3)
- destroy(this.cbx_2)
- destroy(this.cbx_1)
- destroy(this.cb_6)
- destroy(this.em_1)
- destroy(this.cb_5)
- destroy(this.em_2)
- destroy(this.cb_4)
- destroy(this.cb_3)
- destroy(this.cb_2)
- destroy(this.cb_1)
- destroy(this.dw_1)
- end on
- event resize;
- dw_1.Width = This.WorkSpaceWidth() - dw_1.X
- dw_1.Height = This.WorkSpaceHeight() - dw_1.Y
- end event
- type cbx_3 from checkbox within w_aifmb_addcuscomm_request2
- integer x = 494
- integer y = 40
- integer width = 247
- integer height = 60
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "已处理"
- boolean lefttext = true
- end type
- type cbx_2 from checkbox within w_aifmb_addcuscomm_request2
- integer x = 265
- integer y = 40
- integer width = 192
- integer height = 60
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "发件"
- boolean lefttext = true
- end type
- type cbx_1 from checkbox within w_aifmb_addcuscomm_request2
- integer x = 78
- integer y = 40
- integer width = 169
- integer height = 60
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "收件"
- boolean lefttext = true
- end type
- type cb_6 from commandbutton within w_aifmb_addcuscomm_request2
- integer x = 1202
- integer y = 28
- integer width = 242
- integer height = 84
- integer taborder = 40
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "上一页"
- end type
- event clicked;long pageindex
- pageindex = long(em_1.Text)
- pageindex -= 1
- em_1.Text = string(pageindex)
- parent.triggerevent('ue_search')
- end event
- type em_1 from editmask within w_aifmb_addcuscomm_request2
- integer x = 1445
- integer y = 28
- integer width = 165
- integer height = 84
- integer taborder = 40
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "1"
- alignment alignment = right!
- borderstyle borderstyle = stylelowered!
- string mask = "#,##0"
- end type
- type cb_5 from commandbutton within w_aifmb_addcuscomm_request2
- integer x = 1609
- integer y = 28
- integer width = 242
- integer height = 84
- integer taborder = 40
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "下一页"
- end type
- event clicked;long pageindex
- pageindex = long(em_1.Text)
- pageindex += 1
- em_1.Text = string(pageindex)
- parent.triggerevent('ue_search')
- end event
- type em_2 from editmask within w_aifmb_addcuscomm_request2
- integer x = 1874
- integer y = 28
- integer width = 165
- integer height = 84
- integer taborder = 40
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "10"
- alignment alignment = right!
- borderstyle borderstyle = stylelowered!
- string mask = "#,##0"
- end type
- type cb_4 from commandbutton within w_aifmb_addcuscomm_request2
- integer x = 910
- integer y = 20
- integer width = 261
- integer height = 100
- integer taborder = 40
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "刷新"
- end type
- event clicked;parent.triggerevent('ue_search')
- end event
- type cb_3 from commandbutton within w_aifmb_addcuscomm_request2
- integer x = 2912
- integer y = 20
- integer width = 261
- integer height = 100
- integer taborder = 30
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "退出"
- end type
- event clicked;close(parent)
- end event
- type cb_2 from commandbutton within w_aifmb_addcuscomm_request2
- integer x = 2619
- integer y = 20
- integer width = 261
- integer height = 100
- integer taborder = 20
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "拒绝"
- end type
- type cb_1 from commandbutton within w_aifmb_addcuscomm_request2
- integer x = 2327
- integer y = 20
- integer width = 261
- integer height = 100
- integer taborder = 10
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "接受"
- end type
- event clicked;Int rslt = 1
- String arg_msg
- Long ll_row
- ll_row = dw_1.GetRow()
- IF ll_row <= 0 THEN
- MessageBox('提示', '请选择接受对象')
- RETURN
- END IF
- s_aifmb_addcuscomm s_parm
- s_parm.cusid = dw_1.Object.cusid[ll_row]
- s_parm.cuscode = dw_1.Object.usercode[ll_row]
- s_parm.cusname = dw_1.Object.username[ll_row]
- s_parm.lb_readonly = False
- IF dw_1.Object.custype[ll_row] = 1 THEN // 供应商
- s_parm.custype = 2
- ELSEIF dw_1.Object.custype[ll_row] = 2 THEN // 客户
- s_parm.custype = 1
- ELSEIF dw_1.Object.custype[ll_row] = 3 THEN
- s_parm.custype = 3
- END IF
- IF s_parm.cusid = '' THEN
- MessageBox('提示', '对方唯一码为空不能添加')
- RETURN
- END IF
- IF s_parm.cusid = '00000000-0000-0000-0000-000000000000' THEN
- MessageBox('提示', '对方唯一码为零不能添加')
- RETURN
- END IF
- //查询是否已经绑定客户
- Long ll_cnt
- SELECT COUNT(0)
- INTO :ll_cnt
- FROM LJFIEB_CusComm
- WHERE CusID = :s_parm.cusid
- Using sys_email_sqlca;
- IF sys_email_sqlca.SQLCode <> 0 THEN
- MessageBox('提示', '查询企业是否有本地信息失败,' + sys_email_sqlca.SQLErrText)
- RETURN
- END IF
- String ls_cuscode
- String ls_cusname
- IF ll_cnt > 0 THEN
-
- SELECT top 1 cuscode, cusname
- INTO :ls_cuscode, :ls_cusname
- FROM LJFIEB_CusComm
- WHERE CusID = :s_parm.cusid
- Using sys_email_sqlca;
- IF sys_email_sqlca.SQLCode <> 0 THEN
- MessageBox('提示', '查询本地企业信息失败,' + sys_email_sqlca.SQLErrText)
- RETURN
- END IF
-
- s_parm.cuscode = ls_cuscode
- s_parm.cusname = ls_cusname
- s_parm.lb_readonly = True
-
- IF s_parm.custype = 2 Or s_parm.custype = 3 THEN
-
- SELECT COUNT(0)
- INTO :ll_cnt
- FROM u_cust
- Where commcode = :ls_cuscode;
- IF sqlca.SQLCode <> 0 THEN
- MessageBox('提示', '查询已绑定客户个数失败,' + sys_email_sqlca.SQLErrText)
- RETURN
- END IF
-
- IF ll_cnt > 0 THEN
- IF MessageBox('提问', '本企业已经绑定了' + String(ll_cnt) + '个客户,是否继续?', Question!, YesNo!, 1) <> 1 THEN
- RETURN
- END IF
- END IF
-
- END IF
-
- IF s_parm.custype = 1 Or s_parm.custype = 3 THEN
-
- SELECT COUNT(0)
- INTO :ll_cnt
- FROM u_spt
- Where commcode = :ls_cuscode;
- IF sqlca.SQLCode <> 0 THEN
- MessageBox('提示', '查询已绑定供应商个数失败,' + sys_email_sqlca.SQLErrText)
- RETURN
- END IF
-
- IF ll_cnt > 0 THEN
- IF MessageBox('提问', '本企业已经绑定了' + String(ll_cnt) + '个供应商,是否继续?', Question!, YesNo!, 1) <> 1 THEN
- RETURN
- END IF
- END IF
-
- END IF
-
- END IF
- IF s_parm.custype = 2 Or s_parm.custype = 3 THEN
-
- s_custom s_cust
- s_cust.cuscode = dw_1.Object.usercode[ll_row]
- s_cust.Name = dw_1.Object.username[ll_row]
- s_cust.tele = dw_1.Object.tele[ll_row]
- s_cust.tele1 = dw_1.Object.phone[ll_row]
- s_cust.Address = dw_1.Object.Address[ll_row]
- s_cust.email = dw_1.Object.email[ll_row]
- s_cust.dscrp = dw_1.Object.dscrp[ll_row]
-
- s_edit_index_tran s_tran
- s_tran.if_retrieve_all = False //是否一次RETRIEVE所有行
- s_tran.work_mode = 1 //0-单纯编辑模式 1-选择\编辑模式
- s_tran.arg_pkid = 0 //目标定位PKID (备用)
- s_tran.e_long = 1
- s_tran.a_any = s_cust
-
- OpenWithParm(w_cust_edit, s_tran)
-
- s_custom S_INSCUST
- S_INSCUST = Message.PowerObjectParm //接受返回结构
-
- IF S_INSCUST.cusid <= 0 THEN RETURN
-
- s_parm.ll_cusid = S_INSCUST.cusid
- s_parm.ls_cuscode = S_INSCUST.cuscode
- s_parm.ls_cusname = S_INSCUST.Name
-
- END IF
- IF s_parm.custype = 1 Or s_parm.custype = 3 THEN
-
- s_spt s_spt_tran
- s_spt_tran.sptcode = dw_1.Object.usercode[ll_row]
- s_spt_tran.Name = dw_1.Object.username[ll_row]
- s_spt_tran.tele = dw_1.Object.tele[ll_row]
- s_spt_tran.tele1 = dw_1.Object.phone[ll_row]
- s_spt_tran.Address = dw_1.Object.Address[ll_row]
- s_spt_tran.email = dw_1.Object.email[ll_row]
- s_spt_tran.dscrp = dw_1.Object.dscrp[ll_row]
-
- s_edit_index_tran s_tran_spt
- s_tran_spt.if_retrieve_all = False //是否一次RETRIEVE所有行
- s_tran_spt.work_mode = 1 //0-单纯编辑模式 1-选择\编辑模式
- s_tran_spt.arg_pkid = 0 //目标定位PKID (备用)
- s_tran_spt.e_long = 1
- s_tran_spt.a_any = s_spt_tran
-
- OpenWithParm(w_spt_edit, s_tran_spt)
-
- s_spt S_INSSPT
- S_INSSPT = Message.PowerObjectParm //接受返回结构
-
- IF S_INSSPT.sptid <= 0 THEN RETURN
-
- s_parm.ll_sptid = S_INSSPT.sptid
- s_parm.ls_sptcode = S_INSSPT.sptcode
- s_parm.ls_sptname = S_INSSPT.Name
-
- END IF
- OpenWithParm(w_aifmb_addcuscomm_accept,s_parm)
- end event
- type dw_1 from u_dw_rbtnfilter within w_aifmb_addcuscomm_request2
- integer y = 140
- integer width = 2638
- integer height = 1732
- string dataobject = "dw_aifmb_addcuscomm_request2"
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean hsplitscroll = true
- boolean rbutton_filter_use = true
- boolean rbutton_setposition_use = true
- boolean titleclick_sort_use = true
- end type
- event clicked;call super::clicked;if row > 0 then
- this.setrow(row)
- end if
- end event
- event rowfocuschanged;call super::rowfocuschanged;this.selectrow(0, false)
- if currentrow > 0 then
- this.selectrow(currentrow,true)
- end if
- end event
|