123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- $PBExportHeader$w_eb_aifmb_requestquote.srw
- forward
- global type w_eb_aifmb_requestquote from window
- end type
- type cb_2 from commandbutton within w_eb_aifmb_requestquote
- end type
- type cb_1 from commandbutton within w_eb_aifmb_requestquote
- end type
- type dw_1 from u_dw_rbtnfilter within w_eb_aifmb_requestquote
- end type
- end forward
- global type w_eb_aifmb_requestquote from window
- integer width = 2574
- integer height = 1624
- boolean titlebar = true
- string title = "请求报价"
- boolean controlmenu = true
- windowtype windowtype = response!
- long backcolor = 67108864
- string icon = "AppIcon!"
- boolean center = true
- cb_2 cb_2
- cb_1 cb_1
- dw_1 dw_1
- end type
- global w_eb_aifmb_requestquote w_eb_aifmb_requestquote
- type variables
- long ins_rslt = 0
- end variables
- on w_eb_aifmb_requestquote.create
- this.cb_2=create cb_2
- this.cb_1=create cb_1
- this.dw_1=create dw_1
- this.Control[]={this.cb_2,&
- this.cb_1,&
- this.dw_1}
- end on
- on w_eb_aifmb_requestquote.destroy
- destroy(this.cb_2)
- destroy(this.cb_1)
- destroy(this.dw_1)
- end on
- event close;closewithreturn(this, ins_rslt)
- end event
- event open;s_eb_aifmb_requestquote_parm s_tran
- s_tran = Message.PowerObjectParm
- Long i, row
- FOR i = 1 To UpperBound(s_tran.im_type)
- row = dw_1.InsertRow(0)
- dw_1.Object.im_type[row] = s_tran.im_type[i]
- dw_1.Object.im_id[row] = s_tran.im_id[i]
- dw_1.Object.mtrlcode[row] = s_tran.mtrlcode[i]
- dw_1.Object.mtrlname[row] = s_tran.mtrlname[i]
- dw_1.Object.numiid[row] = s_tran.numiid[i]
- NEXT
- end event
- type cb_2 from commandbutton within w_eb_aifmb_requestquote
- integer x = 2213
- integer y = 1412
- integer width = 320
- integer height = 116
- 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_1 from commandbutton within w_eb_aifmb_requestquote
- integer x = 1842
- integer y = 1412
- integer width = 320
- integer height = 116
- integer taborder = 20
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "确定"
- end type
- event clicked;dw_1.AcceptText()
- Long i
- s_aifmb_requestquotedata s_data[]
- FOR i = 1 To dw_1.RowCount()
- s_data[i].ProductID = Long(dw_1.Object.numiid[i])
- s_data[i].Reason = dw_1.Object.QuoteReason[i]
- s_data[i].SaleQuantity = dw_1.Object.SaleQuantity[i]
- s_data[i].Capacity = dw_1.Object.Capacity[i]
- NEXT
- uo_aifmb = Create uo_aifmb
- Int rslt = 1
- String arg_msg
- IF uo_aifmb.uf_requestquote(s_data, arg_msg) <> 1 THEN
- rslt = 0
- GOTO ext
- END IF
- Long im_type
- String im_id
- String ls_reason
- FOR i = 1 To dw_1.RowCount()
- im_type = dw_1.Object.im_type[i]
- im_id = dw_1.Object.im_id[i]
- ls_reason = dw_1.Object.QuoteReason[i]
- UPDATE eb_import_mtrlname SET quoteflag = 1, QuoteReason = :ls_reason
- Where im_type = :im_type And im_id = :im_id;
- IF sqlca.SQLCode <> 0 THEN
- rslt = 0
- arg_msg = '更新请求报价原因失败,' + sqlca.SQLErrText
- GOTO ext
- END IF
- NEXT
- ext:
- Destroy uo_aifmb
- IF rslt = 1 THEN
- ins_rslt = 1
- COMMIT;
- Close(Parent)
- ELSE
- ROLLBACK;
- MessageBox('ERROR', arg_msg)
- END IF
- end event
- type dw_1 from u_dw_rbtnfilter within w_eb_aifmb_requestquote
- integer width = 2555
- integer height = 1408
- string dataobject = "dw_eb_aifmb_requestquote"
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean hsplitscroll = true
- end type
|