123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349 |
- $PBExportHeader$w_sale_msg_view_ljfieb.srw
- forward
- global type w_sale_msg_view_ljfieb from w_publ_base
- end type
- type dw_1 from datawindow within w_sale_msg_view_ljfieb
- end type
- type mle_1 from multilineedit within w_sale_msg_view_ljfieb
- end type
- type cb_accept from uo_imflatbutton within w_sale_msg_view_ljfieb
- end type
- type cb_1 from uo_imflatbutton within w_sale_msg_view_ljfieb
- end type
- type ln_bar from line within w_sale_msg_view_ljfieb
- end type
- type ln_bar2 from line within w_sale_msg_view_ljfieb
- end type
- type r_bar from rectangle within w_sale_msg_view_ljfieb
- end type
- end forward
- global type w_sale_msg_view_ljfieb from w_publ_base
- integer width = 2469
- integer height = 1976
- string title = "客户消息"
- boolean minbox = false
- windowtype windowtype = response!
- dw_1 dw_1
- mle_1 mle_1
- cb_accept cb_accept
- cb_1 cb_1
- ln_bar ln_bar
- ln_bar2 ln_bar2
- r_bar r_bar
- end type
- global w_sale_msg_view_ljfieb w_sale_msg_view_ljfieb
- type variables
- Transaction tr_eb_sqlca
- s_packet_ljfieb s_inscust
- long ins_scid
- string ins_sn
- uo_ljfieb uo_fieb
- long ins_sendid,ins_receid
- string ins_sendsccode,ins_reccesccode
- int ins_billtype
- end variables
- forward prototypes
- public function integer wf_read ()
- end prototypes
- public function integer wf_read ();String arg_msg
- String ls_SerialNum
- SELECT TOP 1 NEWID() INTO :ls_SerialNum
- From u_user Using sqlca;
- IF sqlca.SQLCode <> 0 THEN
- ROLLBACK Using sqlca;
- MessageBox('Error','生成序列号失败,'+sqlca.SQLErrText)
- RETURN 0
- END IF
- IF IsNull(ls_SerialNum) THEN ls_SerialNum = ''
- IF ls_SerialNum = '' THEN
- MessageBox('Error','错误的发送序列号')
- RETURN 0
- END IF
- UPDATE LJFIEB_packet
- SET Complete = 1 ,
- status = 6,
- ConfirmTime = getdate(),
- ConfirmUser = :publ_operator
- Where SerialNum = :ins_sn Using tr_eb_sqlca;
- IF tr_eb_sqlca.SQLCode <> 0 THEN
- ROLLBACK Using tr_eb_sqlca;
- MessageBox('Errr','更新消息状态失败,'+tr_eb_sqlca.SQLErrText)
- RETURN 0
- END IF
- IF uo_fieb.add_packet(ls_SerialNum,'',ins_receid,ins_reccesccode,ins_sendid,ins_sendsccode,6,'确认消息','','',ins_sn,'',0,arg_msg,True) = 0 THEN
- MessageBox('Error','发送确认指令失败 '+arg_msg)
- RETURN 0
- END IF
- return 1
- end function
- on w_sale_msg_view_ljfieb.create
- int iCurrent
- call super::create
- this.dw_1=create dw_1
- this.mle_1=create mle_1
- this.cb_accept=create cb_accept
- this.cb_1=create cb_1
- this.ln_bar=create ln_bar
- this.ln_bar2=create ln_bar2
- this.r_bar=create r_bar
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.dw_1
- this.Control[iCurrent+2]=this.mle_1
- this.Control[iCurrent+3]=this.cb_accept
- this.Control[iCurrent+4]=this.cb_1
- this.Control[iCurrent+5]=this.ln_bar
- this.Control[iCurrent+6]=this.ln_bar2
- this.Control[iCurrent+7]=this.r_bar
- end on
- on w_sale_msg_view_ljfieb.destroy
- call super::destroy
- destroy(this.dw_1)
- destroy(this.mle_1)
- destroy(this.cb_accept)
- destroy(this.cb_1)
- destroy(this.ln_bar)
- destroy(this.ln_bar2)
- destroy(this.r_bar)
- end on
- event open;call super::open;tr_eb_sqlca = sys_email_sqlca // 电子商务连接
- IF sys_email_sqlca.DBHandle() = 0 THEN
- MessageBox('Error','电子商务数据库连接失败,请检查')
- RETURN
- END IF
- uo_fieb = Create uo_ljfieb
- uo_fieb.commit_transaction = tr_eb_sqlca
- s_inscust = Message.PowerObjectParm
- ins_sn = s_inscust.serialnum
- ins_sendid = s_inscust.sendcuscommid
- ins_receid = s_inscust.receivecuscommid
- ins_sendsccode = s_inscust.sendsccode
- ins_reccesccode = s_inscust.receivesccode
- ins_billtype = s_inscust.billtype
- dw_1.SetTransObject(tr_eb_sqlca)
- dw_1.Retrieve(ins_sn)
- IF dw_1.GetRow() > 0 THEN
- IF dw_1.Object.ljfieb_packet_billtype[dw_1.GetRow()] <> 11 THEN
- mle_1.Text = '*' + dw_1.Object.LJFIEB_packet_Summary[dw_1.GetRow()] + '*' + '~r~n' + '~r~n'+ dw_1.Object.LJFIEB_packet_Postscript[dw_1.GetRow()]
- ELSE
- mle_1.Text = '*' + '拒绝单据:'+ dw_1.Object.ljfieb_packet_relatedcode[dw_1.GetRow()] + '*' + '~r~n' + '~r~n'+ dw_1.Object.LJFIEB_packet_Postscript[dw_1.GetRow()]+ '~r~n'
- END IF
- ELSE
-
- mle_1.Text = ''
- END IF
- String ls_SerialNum,arg_msg
- SELECT TOP 1 NEWID() INTO :ls_SerialNum
- From u_user Using sqlca;
- IF sqlca.SQLCode <> 0 THEN
- RETURN
- END IF
- IF IsNull(ls_SerialNum) THEN ls_SerialNum = ''
- IF ls_SerialNum = '' THEN
- RETURN
- END IF
- IF uo_fieb.add_packet(ls_SerialNum,'',ins_receid,ins_reccesccode,ins_sendid,ins_sendsccode,5,'打开消息','','',ins_sn,'',0,arg_msg,True) = 0 THEN
- RETURN
- END IF
- end event
- event resize;call super::resize;ln_bar.endx = this.width
- ln_bar2.endx = this.width
- r_bar.width = this.width
- end event
- type cb_func from w_publ_base`cb_func within w_sale_msg_view_ljfieb
- boolean visible = false
- end type
- type cb_exit from w_publ_base`cb_exit within w_sale_msg_view_ljfieb
- integer x = 375
- integer width = 183
- integer height = 164
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- type dw_1 from datawindow within w_sale_msg_view_ljfieb
- event ue_vscroll pbm_vscroll
- integer x = 18
- integer y = 188
- integer width = 2377
- integer height = 220
- integer taborder = 30
- boolean bringtotop = true
- string title = "none"
- string dataobject = "dw_sale_msg_view_ljfieb"
- boolean border = false
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- event ue_vscroll;return 1
- end event
- type mle_1 from multilineedit within w_sale_msg_view_ljfieb
- integer x = 27
- integer y = 412
- integer width = 2414
- integer height = 1456
- integer taborder = 40
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean vscrollbar = true
- boolean autovscroll = true
- boolean displayonly = true
- borderstyle borderstyle = stylelowered!
- end type
- type cb_accept from uo_imflatbutton within w_sale_msg_view_ljfieb
- integer width = 187
- integer height = 164
- integer taborder = 10
- boolean bringtotop = true
- string text = "确认"
- string normalpicname = "ok.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;//IF Not f_power_ind(3173,sys_msg_pow) THEN
- // MessageBox(publ_operator,sys_msg_pow)
- // RETURN
- //END IF
- IF MessageBox('询问','是否要确认本条消息?',question!,yesno!) = 2 THEN RETURN
- if wf_read() = 0 then return
- close(parent)
- end event
- type cb_1 from uo_imflatbutton within w_sale_msg_view_ljfieb
- integer x = 187
- integer width = 187
- integer height = 164
- integer taborder = 10
- 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 Not f_power_ind(3172,sys_msg_pow) THEN
- // MessageBox(publ_operator,sys_msg_pow)
- // RETURN
- //END IF
- IF dw_1.GetRow() > 0 THEN
-
- s_edit_index_tran s_buy_msg
-
- s_buy_msg.b_long = ins_billtype // 1 - 选供应商, 2 - 选客户
- s_buy_msg.c_long = 1
-
- s_buy_msg.b_string = dw_1.Object.LJFIEB_packet_Summary[dw_1.GetRow()]
-
- s_buy_msg.c_string = dw_1.Object.ljfieb_cuscomm_s_cuscode[dw_1.GetRow()]
- s_buy_msg.d_string = dw_1.Object.ljfieb_cuscomm_s_cusname[dw_1.GetRow()]
- s_buy_msg.e_string = dw_1.Object.ljfieb_packet_sendsccode[dw_1.GetRow()]
- s_buy_msg.f_string = dw_1.Object.LJFIEB_packet_Postscript[dw_1.GetRow()]
- OpenWithParm(w_msg_send_ljfieb,s_buy_msg)
-
- Int li_ifsend
-
- li_ifsend = Message.DoubleParm
-
- IF li_ifsend = 1 THEN
- IF wf_read() = 0 THEN RETURN
-
- Close(Parent)
- END IF
-
- END IF
- end event
- type ln_bar from line within w_sale_msg_view_ljfieb
- long linecolor = 268435456
- integer linethickness = 4
- integer beginy = 172
- integer endx = 3200
- integer endy = 172
- end type
- type ln_bar2 from line within w_sale_msg_view_ljfieb
- long linecolor = 16777215
- integer linethickness = 4
- integer beginx = 9
- integer beginy = 176
- integer endx = 3273
- integer endy = 176
- end type
- type r_bar from rectangle within w_sale_msg_view_ljfieb
- long linecolor = 16777215
- integer linethickness = 4
- long fillcolor = 1073741824
- integer x = 1947
- integer width = 87
- integer height = 68
- end type
- event constructor;this.fillcolor = 14215660
- this.linecolor = 14215660
- this.x = -1
- this.y = -1
- this.height = ln_bar.beginy - 5
- end event
|