123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991 |
- $PBExportHeader$w_spt_price_receive_ljfieb.srw
- forward
- global type w_spt_price_receive_ljfieb from w_publ_base
- end type
- type dw_uc from datawindow within w_spt_price_receive_ljfieb
- end type
- type dw_child from u_dw_rbtnfilter within w_spt_price_receive_ljfieb
- end type
- type mle_1 from multilineedit within w_spt_price_receive_ljfieb
- end type
- type st_1 from statictext within w_spt_price_receive_ljfieb
- end type
- type st_2 from statictext within w_spt_price_receive_ljfieb
- end type
- type sle_scname from singlelineedit within w_spt_price_receive_ljfieb
- end type
- type cb_accept from uo_imflatbutton within w_spt_price_receive_ljfieb
- end type
- type cb_feedback from uo_imflatbutton within w_spt_price_receive_ljfieb
- end type
- type cb_reject from uo_imflatbutton within w_spt_price_receive_ljfieb
- end type
- type mle_2 from multilineedit within w_spt_price_receive_ljfieb
- end type
- type st_3 from statictext within w_spt_price_receive_ljfieb
- end type
- type ln_bar from line within w_spt_price_receive_ljfieb
- end type
- type ln_bar2 from line within w_spt_price_receive_ljfieb
- end type
- type ln_1 from line within w_spt_price_receive_ljfieb
- end type
- type ln_2 from line within w_spt_price_receive_ljfieb
- end type
- type r_bar from rectangle within w_spt_price_receive_ljfieb
- end type
- end forward
- global type w_spt_price_receive_ljfieb from w_publ_base
- integer width = 3611
- integer height = 2380
- string title = "客户询价单"
- boolean minbox = false
- windowtype windowtype = response!
- windowstate windowstate = maximized!
- event ue_quote ( )
- dw_uc dw_uc
- dw_child dw_child
- mle_1 mle_1
- st_1 st_1
- st_2 st_2
- sle_scname sle_scname
- cb_accept cb_accept
- cb_feedback cb_feedback
- cb_reject cb_reject
- mle_2 mle_2
- st_3 st_3
- ln_bar ln_bar
- ln_bar2 ln_bar2
- ln_1 ln_1
- ln_2 ln_2
- r_bar r_bar
- end type
- global w_spt_price_receive_ljfieb w_spt_price_receive_ljfieb
- type variables
- Transaction tr_eb_sqlca
- s_packet_ljfieb s_inscust
- long ins_scid,ins_cusid
- string ins_sn
- uo_quote uo_quote_mtrl
- uo_ljfieb uo_fieb
- long ins_sendid,ins_receid
- string ins_sendsccode,ins_reccesccode
- string ins_RelatedCode
- datetime ins_addtime
- string ins_adduser
- string ins_relquotecode
- end variables
- forward prototypes
- public function integer wf_retrieve (string arg_sn, long arg_sendcuscommid, string arg_sendsccode, ref string arg_msg)
- public function integer wf_importnewbj (long arg_cusid, long arg_moneyid, long arg_mtrlid, string arg_status, string arg_woodcode, string arg_pcode, ref decimal arg_price, ref decimal arg_rebate, ref string arg_msg)
- public function integer wf_importnewprice (long arg_cusid, long arg_moneyid, long arg_mtrlid, string arg_status, string arg_woodcode, string arg_pcode, ref decimal arg_price, ref decimal arg_rebate, ref string arg_msg)
- public function integer wf_add_quote ()
- end prototypes
- public function integer wf_retrieve (string arg_sn, long arg_sendcuscommid, string arg_sendsccode, ref string arg_msg);Int rslt = 1
- String ls_cuscode
- Long uc_row
- Long ll_i, ll_rowcnt,ll_row
- Long ll_moneyid,ll_banktypeid
- long li_CusType
- Decimal ls_1stnewprice,ls_1stzqrate
- dw_uc.Retrieve(arg_sn)
- dw_child.Retrieve(arg_sn)
- uc_row = dw_uc.GetRow()
- IF uc_row <= 0 THEN
- rslt = 0
- arg_msg = '没有对应的单据信息'
- GOTO ext
- END IF
- SELECT CusCode,CusType
- INTO :ls_cuscode,:li_CusType
- FROM LJFIEB_CusComm
- Where CusCommID = :arg_sendcuscommid Using tr_eb_sqlca;
- IF tr_eb_sqlca.SQLCode <> 0 THEN
- ls_cuscode = ''
- END IF
- If li_CusType = 5 Then
- Select cuscode Into :ls_cuscode
- From u_cust
- Where cusid = :ins_cusid Using sqlca;
- If sqlca.SQLCode <> 0 Then
- ls_cuscode = ''
- End If
- End If
- IF Trim(ls_cuscode) = '' THEN
- rslt = 0
- arg_msg = '客户信息不明确,请检查'
- GOTO ext
- END IF
- Long cusid
- String CusCode, Name
- SELECT cusid,
- cuscode,
- name
- INTO
- :cusid,
- :cuscode,
- :Name
- From u_cust
- Where (commcode = :ls_cuscode And commsccode = :arg_SendSCcode and :li_CusType <> 5
- or cuscode = :ls_cuscode and :li_custype = 5 ) Using sqlca;
- IF sqlca.SQLCode <> 0 THEN
- rslt = 0
- arg_msg = '查询客户信息失败,请检查通信设置是否正确,'+sqlca.SQLErrText
- GOTO ext
- END IF
- dw_uc.Object.cusid[uc_row] = cusid
- dw_uc.Object.CusCode[uc_row] = CusCode
- dw_uc.Object.cusname[uc_row] = Name
- ext:
- RETURN rslt
- end function
- public function integer wf_importnewbj (long arg_cusid, long arg_moneyid, long arg_mtrlid, string arg_status, string arg_woodcode, string arg_pcode, ref decimal arg_price, ref decimal arg_rebate, ref string arg_msg);Int rslt = 1
- IF arg_moneyid = 0 THEN
- rslt = 0
- arg_msg = '请先选择币种'
- GOTO ext
- END IF
- IF IsNull(arg_cusid) THEN arg_cusid = 0
- IF arg_cusid = 0 THEN
- rslt = 0
- arg_msg = "请选择销售客户!"
- GOTO ext
- END IF
- SELECT u_cus_price.fprice_bj,u_cus_price.zqrate_bj
- INTO :arg_price,:arg_rebate
- FROM u_cus_price
- WHERE ( u_cus_price.cusid = :arg_cusid ) AND
- ( u_cus_price.mtrlid = :arg_mtrlid ) AND
- ( u_cus_price.status = :arg_status ) AND
- ( u_cus_price.pcode = :arg_pcode ) AND
- ( u_cus_price.woodcode = :arg_woodcode ) and
- ( u_cus_price.moneyid = :arg_moneyid);
- IF sqlca.SQLCode <> 0 THEN
- rslt = 0
- arg_msg = "没有最新销售价!"
- GOTO ext
- END IF
- ext:
- IF rslt = 0 THEN
- arg_price = 0
- arg_rebate = 0
- END IF
- RETURN rslt
- end function
- public function integer wf_importnewprice (long arg_cusid, long arg_moneyid, long arg_mtrlid, string arg_status, string arg_woodcode, string arg_pcode, ref decimal arg_price, ref decimal arg_rebate, ref string arg_msg);Int rslt = 1
- IF arg_moneyid = 0 THEN
- rslt = 0
- arg_msg = '请先选择币种'
- GOTO ext
- END IF
- IF IsNull(arg_cusid) THEN arg_cusid = 0
- IF arg_cusid = 0 THEN
- rslt = 0
- arg_msg = "请选择销售客户!"
- GOTO ext
- END IF
- SELECT u_cus_price.fprice,u_cus_price.zqrate
- INTO :arg_price,:arg_rebate
- FROM u_cus_price
- WHERE ( u_cus_price.cusid = :arg_cusid ) AND
- ( u_cus_price.mtrlid = :arg_mtrlid ) AND
- ( u_cus_price.status = :arg_status ) AND
- ( u_cus_price.pcode = :arg_pcode ) AND
- ( u_cus_price.woodcode = :arg_woodcode ) and
- ( u_cus_price.moneyid = :arg_moneyid);
- IF sqlca.SQLCode <> 0 THEN
- rslt = 0
- arg_msg = "没有最新销售价!"
- GOTO ext
- END IF
- ext:
- IF rslt = 0 THEN
- arg_price = 0
- arg_rebate = 0
- END IF
- RETURN rslt
- end function
- public function integer wf_add_quote ();String arg_msg
- Long uc_row
- DateTime server_dt
- Long i
- Long ll_mtrlid
- String ls_mtrlcode
- Long ll_mess
- String ls_relquotecode
- Long ll_moneyid
- String ls_moneyname
- uc_row = dw_uc.GetRow()
- IF uc_row <= 0 THEN
- MessageBox('系统提示','没有可保存的内容')
- RETURN 0
- END IF
- dw_uc.AcceptText()
- dw_child.AcceptText()
- SELECT Top 1 getdate() Into :server_dt From u_user Using sqlca;
- //取得系统时间,借用操作员表
- IF sqlca.SQLCode <> 0 THEN
- MessageBox('Error',"查询操作失败,日期 ")
- RETURN 0
- END IF
- //ls_moneyname = dw_uc.Object.moneyname[uc_row]
- //
- //SELECT moneyid
- // INTO :ll_moneyid
- // FROM cw_currency
- // Where Name = :ls_moneyname Using sqlca;
- //IF sqlca.SQLCode <> 0 THEN
- // MessageBox('Error','查询币种信息失败,'+sqlca.SQLErrText)
- // RETURN 0
- //END IF
- //ll_moneyid = dw_uc.Object.moneyid[uc_row]
- //IF ll_moneyid <= 0 THEN
- // MessageBox('Error',"请选择币种 ")
- // RETURN 0
- //END IF
- IF uo_quote_mtrl.newbegin(ins_scid,arg_msg) = 0 THEN //生产令领料
- MessageBox('Error!',arg_msg)
- RETURN 0
- END IF
- uo_quote_mtrl.quotedate = server_dt // 发生时间
- uo_quote_mtrl.Assign_emp = publ_operator
- uo_quote_mtrl.relcode = dw_uc.Object.billcode[uc_row] //相关号码
- uo_quote_mtrl.dscrp = dw_uc.Object.dscrp[uc_row] //备注
- uo_quote_mtrl.custid = dw_uc.Object.cusid[uc_row] //客户ID
- //uo_quote_mtrl.moneyid = ll_moneyid
- uo_quote_mtrl.fiebrelcode = ins_RelatedCode
- //uo_quote_mtrl.sendtime = ins_addtime
- //uo_quote_mtrl.senduser = ins_adduser
- //
- FOR i = 1 To dw_child.RowCount()
- IF dw_child.Object.sptmtrlcode[i] <> '' THEN
- ls_mtrlcode = dw_child.Object.sptmtrlcode[i]
-
- SELECT mtrlid INTO :ll_mtrlid
- FROM u_mtrldef
- Where mtrlcode = :ls_mtrlcode Using sqlca;
- IF sqlca.SQLCode <> 0 THEN
- ll_mess = MessageBox('Error','第'+String(i)+'行,查询产品信息失败,是否忽略?',question!,yesno!)
- IF ll_mess = 1 THEN
- CONTINUE
- ELSEIF ll_mess = 2 THEN
- RETURN 0
- END IF
- END IF
-
- IF uo_quote_mtrl.acceptmx(ll_mtrlid,&
- dw_child.Object.sptmtrlcode[i],&
- '',&
- '',&
- '',&
- dw_child.Object.dscrp[i],&
- arg_msg,&
- i,&
- dw_child.Object.price[i],&
- dw_child.Object.price[i],&
- dw_child.Object.status[i],&
- dw_child.Object.woodcode[i],&
- dw_child.Object.pcode[i],&
- 0,&
- 0,&
- 0,&
- 0,&
- 0,&
- 0,&
- 0,&
- dw_child.Object.qty[i],&
- dw_child.Object.qty1[i],&
- 1,0,'','') = 0 THEN
- MessageBox('Error!',arg_msg)
- RETURN 0
- END IF
- END IF
- NEXT
- IF uo_quote_mtrl.Save(publ_operator,arg_msg,True) = 0 THEN
- MessageBox('Error!',arg_msg)
- RETURN 0
- END IF
- ls_relquotecode = uo_quote_mtrl.quotecode
- ins_relquotecode = ls_relquotecode
- UPDATE LJFIEB_tempspt_price_change
- SET relquotecode = :ls_relquotecode,
- flag = 1,
- 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('Error','更新客户询价单相关报价单号失败,'+tr_eb_sqlca.SQLErrText)
- RETURN 0
- END IF
- dw_uc.Object.relquotecode[uc_row] = ls_relquotecode
- dw_uc.Object.flag[uc_row] = 1
- //更新本地通信记录
- UPDATE LJFIEB_packet
- SET status = 6,
- Complete = 1,
- 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('Error','更新本地通信记录失败,'+tr_eb_sqlca.SQLErrText)
- RETURN 0
- END IF
- RETURN 1
- end function
- on w_spt_price_receive_ljfieb.create
- int iCurrent
- call super::create
- this.dw_uc=create dw_uc
- this.dw_child=create dw_child
- this.mle_1=create mle_1
- this.st_1=create st_1
- this.st_2=create st_2
- this.sle_scname=create sle_scname
- this.cb_accept=create cb_accept
- this.cb_feedback=create cb_feedback
- this.cb_reject=create cb_reject
- this.mle_2=create mle_2
- this.st_3=create st_3
- this.ln_bar=create ln_bar
- this.ln_bar2=create ln_bar2
- this.ln_1=create ln_1
- this.ln_2=create ln_2
- this.r_bar=create r_bar
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.dw_uc
- this.Control[iCurrent+2]=this.dw_child
- this.Control[iCurrent+3]=this.mle_1
- this.Control[iCurrent+4]=this.st_1
- this.Control[iCurrent+5]=this.st_2
- this.Control[iCurrent+6]=this.sle_scname
- this.Control[iCurrent+7]=this.cb_accept
- this.Control[iCurrent+8]=this.cb_feedback
- this.Control[iCurrent+9]=this.cb_reject
- this.Control[iCurrent+10]=this.mle_2
- this.Control[iCurrent+11]=this.st_3
- this.Control[iCurrent+12]=this.ln_bar
- this.Control[iCurrent+13]=this.ln_bar2
- this.Control[iCurrent+14]=this.ln_1
- this.Control[iCurrent+15]=this.ln_2
- this.Control[iCurrent+16]=this.r_bar
- end on
- on w_spt_price_receive_ljfieb.destroy
- call super::destroy
- destroy(this.dw_uc)
- destroy(this.dw_child)
- destroy(this.mle_1)
- destroy(this.st_1)
- destroy(this.st_2)
- destroy(this.sle_scname)
- destroy(this.cb_accept)
- destroy(this.cb_feedback)
- destroy(this.cb_reject)
- destroy(this.mle_2)
- destroy(this.st_3)
- destroy(this.ln_bar)
- destroy(this.ln_bar2)
- destroy(this.ln_1)
- destroy(this.ln_2)
- 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
- dw_uc.settransobject(tr_eb_sqlca)
- dw_child.settransobject(tr_eb_sqlca)
- //DataWindowChild dwc
- //IF dw_uc.GetChild('moneyid', Ref dwc) = 1 THEN
- // dwc.SetTransObject(sqlca)
- // dwc.Retrieve()
- //END IF
- uo_quote_mtrl = CREATE uo_quote
- uo_quote_mtrl.commit_transaction = sqlca
- 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_RelatedCode = s_inscust.RelatedCode
- ins_addtime = s_inscust.addtime
- ins_adduser = s_inscust.adduser
- String ls_sccode,ls_scname
- String arg_msg
- ls_sccode = s_inscust.receivesccode
- SELECT scid,scname
- INTO :ins_scid,:ls_scname
- FROM u_scdef
- Where sccode = :ls_sccode;
- IF sqlca.SQLCode <> 0 THEN
- MessageBox('Error','查询分部信息失败,'+sqlca.SQLErrText)
- RETURN
- END IF
- sle_scname.Text = ls_scname
- mle_1.Text = s_inscust.postscript
- mle_2.Text = s_inscust.remark
- long ll_status
- SELECT status,cusid INTO :ll_status,:ins_cusid
- FROM LJFIEB_packet
- Where serialnum = :ins_sn Using tr_eb_sqlca;
- IF tr_eb_sqlca.SQLCode <> 0 THEN
- MessageBox('Error','查询通信数据失败,'+sqlca.SQLErrText)
- RETURN
- END IF
- if ll_status <> 5 then
- cb_accept.enabled = false
- cb_reject.enabled = false
- end if
- IF wf_retrieve(ins_sn,ins_sendid,ins_sendsccode,arg_msg) = 0 THEN
- MessageBox('Error',arg_msg)
- RETURN
- END IF
- //更新对方状态-已打开
- string ls_SerialNum
- 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
- ln_1.endx = this.width
- ln_2.endx = this.width
- dw_child.width = this.WorkSpaceWidth() - 10
- mle_1.width = dw_child.width - dw_uc.width - 4
- mle_2.width = mle_1.width
- dw_child.height = this.workspaceheight() - dw_child.y - 30
- end event
- event close;call super::close;destroy uo_fieb
- destroy uo_quote_mtrl
- closewithreturn(this,ins_relquotecode)
- end event
- type cb_func from w_publ_base`cb_func within w_spt_price_receive_ljfieb
- boolean visible = false
- end type
- type cb_exit from w_publ_base`cb_exit within w_spt_price_receive_ljfieb
- integer x = 1111
- integer width = 183
- integer height = 164
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- type dw_uc from datawindow within w_spt_price_receive_ljfieb
- integer y = 296
- integer width = 1966
- integer height = 716
- integer taborder = 30
- boolean bringtotop = true
- string title = "none"
- string dataobject = "dw_spt_price_change_ljfieb"
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- type dw_child from u_dw_rbtnfilter within w_spt_price_receive_ljfieb
- integer y = 1016
- integer width = 3584
- integer height = 1240
- integer taborder = 20
- boolean bringtotop = true
- boolean titlebar = true
- string title = "单据明细内容"
- string dataobject = "dw_spt_price_changemx_ljfieb"
- boolean maxbox = true
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean hsplitscroll = true
- end type
- event rowfocuschanged;call super::rowfocuschanged; IF currentrow <= 0 THEN RETURN
- THIS.SelectRow(0,FALSE)
- THIS.SelectRow(currentrow,TRUE)
- this.setrow(currentrow)
- end event
- event clicked;call super::clicked; IF row <= 0 THEN RETURN
- THIS.SelectRow(0,FALSE)
- THIS.SelectRow(row,TRUE)
- this.setrow(row)
- end event
- event rbuttondown;call super::rbuttondown;Long ll_row,ll_column
- ll_row = This.GetRow()
- ll_column = This.GetColumn()
- IF ll_row <= 0 THEN RETURN
- IF ll_column <= 0 THEN RETURN
- IF Left( This.Describe( dwo.Name+ ".coltype"),4) = 'date' THEN
- s_calender_arg s_calender
-
- s_calender.PointerX = This.PointerX()
- s_calender.PointerY = This.PointerY()
- s_calender.X = This.X + Parent.X
- s_calender.Y = This.Y + Parent.Y
-
- OpenWithParm(w_calendar,s_calender)
- This.SetItem(ll_row,ll_column,id_date_selected)
- END IF
- end event
- type mle_1 from multilineedit within w_spt_price_receive_ljfieb
- integer x = 1970
- integer y = 360
- integer width = 1595
- integer height = 408
- 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 st_1 from statictext within w_spt_price_receive_ljfieb
- integer x = 1979
- integer y = 300
- integer width = 142
- integer height = 56
- 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_2 from statictext within w_spt_price_receive_ljfieb
- integer x = 23
- integer y = 204
- integer width = 155
- 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 = "分部"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- type sle_scname from singlelineedit within w_spt_price_receive_ljfieb
- integer x = 210
- integer y = 188
- integer width = 443
- 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
- boolean displayonly = true
- borderstyle borderstyle = stylelowered!
- end type
- type cb_accept from uo_imflatbutton within w_spt_price_receive_ljfieb
- integer width = 439
- integer height = 164
- integer taborder = 30
- 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(3166) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- IF MessageBox('询问','确定要接受当前订单,转为正式销售报价单吗?',question!,yesno!) = 2 THEN RETURN
- IF wf_add_quote() = 0 THEN RETURN
- 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
- END IF
- IF IsNull(ls_SerialNum) THEN ls_SerialNum = ''
- IF ls_SerialNum = '' THEN
- MessageBox('Error','错误的发送序列号')
- RETURN
- END IF
- IF uo_fieb.add_packet(ls_SerialNum,'',ins_receid,ins_reccesccode,ins_sendid,ins_sendsccode,6,'安排报价','','',ins_sn,ins_RelatedCode,0,arg_msg,True) = 0 THEN
- MessageBox('系统提示','发送确认指令失败 '+arg_msg)
- RETURN
- END IF
- IF MessageBox('系统提示','成功生成销售报价单:'+ins_relquotecode+',是否马上打开?',question!,yesno!) = 2 THEN ins_relquotecode = ''
- Close(Parent)
- end event
- type cb_feedback from uo_imflatbutton within w_spt_price_receive_ljfieb
- integer x = 439
- integer width = 439
- 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;Long ll_row
- String ls_code
- Long cnt
- ll_row = dw_uc.GetRow()
- IF ll_row <= 0 THEN RETURN
- IF dw_uc.Object.flag[ll_row] = 0 THEN
- MessageBox('系统提示','本客户询价单尚未进行报价处理')
- RETURN
- END IF
- ls_code = dw_uc.Object.relquotecode[ll_row]
- SELECT count(*)
- INTO :cnt
- FROM u_quote
- Where quotecode = :ls_code Using sqlca;
- IF sqlca.SQLCode <> 0 THEN
- MessageBox('Error','查询销售报价单信息失败,'+sqlca.SQLErrText)
- RETURN
- END IF
- IF cnt = 0 THEN
- IF MessageBox('询问','无法查询相关销售报价单,可能已被删除,是否重新生成新的销售报价单?',question!,yesno!) = 2 THEN RETURN
-
- wf_add_quote()
- ELSE
- f_open_win(ins_scid,ls_code)
- END IF
- end event
- type cb_reject from uo_imflatbutton within w_spt_price_receive_ljfieb
- integer x = 882
- integer width = 219
- integer height = 164
- integer taborder = 30
- boolean bringtotop = true
- string text = "拒绝"
- string normalpicname = "DELETE.BMP"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;IF Not f_power_ind(3167) THEN
- MessageBox(publ_operator,sys_msg_pow)
- RETURN
- END IF
- String arg_summary,arg_postscript,arg_remark
- 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
- END IF
- IF IsNull(ls_SerialNum) THEN ls_SerialNum = ''
- IF ls_SerialNum = '' THEN
- MessageBox('Error','错误的发送序列号')
- RETURN
- END IF
- s_packet_ljfieb s_pack,s_return
- //s_pack.summary = '拒绝订单:'+ins_RelatedCode
- OpenWithParm(w_dscrp_edit_ljfieb,s_pack)
- s_return = Message.PowerObjectParm
- IF s_return.returnflag <> 1 THEN RETURN
- //arg_summary = s_return.summary
- arg_postscript = s_return.postscript
- arg_remark = s_return.remark
- UPDATE LJFIEB_tempspt_price_change
- SET flag = 2
- Where SerialNum = :ins_sn Using tr_eb_sqlca;
- IF tr_eb_sqlca.SQLCode <> 0 THEN
- ROLLBACK Using tr_eb_sqlca;
- MessageBox('Error','更新客户询价单状态失败,'+tr_eb_sqlca.SQLErrText)
- RETURN 0
- END IF
- //更新本地通信记录
- UPDATE LJFIEB_packet
- SET status = 10,
- Complete = 1
- Where SerialNum = :ins_sn Using tr_eb_sqlca;
- IF tr_eb_sqlca.SQLCode <> 0 THEN
- ROLLBACK Using tr_eb_sqlca;
- MessageBox('Error', '更新本地通信记录失败,'+tr_eb_sqlca.SQLErrText)
- RETURN
- END IF
- IF uo_fieb.add_packet(ls_SerialNum,'',ins_receid,ins_reccesccode,ins_sendid,ins_sendsccode,11,arg_summary,arg_postscript,arg_remark,ins_sn,ins_RelatedCode,0,arg_msg,True) = 0 THEN
- MessageBox('系统提示','发送确认指令失败 '+arg_msg)
- RETURN
- END IF
- MessageBox('系统提示','操作成功')
- Close(Parent)
- end event
- type mle_2 from multilineedit within w_spt_price_receive_ljfieb
- integer x = 1970
- integer y = 840
- integer width = 1595
- integer height = 164
- integer taborder = 50
- 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 st_3 from statictext within w_spt_price_receive_ljfieb
- integer x = 1979
- integer y = 780
- integer width = 128
- 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 ln_bar from line within w_spt_price_receive_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_spt_price_receive_ljfieb
- long linecolor = 16777215
- integer linethickness = 4
- integer beginx = 9
- integer beginy = 176
- integer endx = 3273
- integer endy = 176
- end type
- type ln_1 from line within w_spt_price_receive_ljfieb
- long linecolor = 268435456
- integer linethickness = 4
- integer beginy = 284
- integer endx = 3250
- integer endy = 284
- end type
- type ln_2 from line within w_spt_price_receive_ljfieb
- long linecolor = 16777215
- integer linethickness = 4
- integer beginy = 288
- integer endx = 3282
- integer endy = 288
- end type
- type r_bar from rectangle within w_spt_price_receive_ljfieb
- long linecolor = 16777215
- integer linethickness = 4
- long fillcolor = 1073741824
- integer x = 3351
- 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
|