123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946 |
- $PBExportHeader$w_mtrldef_edit_cost.srw
- forward
- global type w_mtrldef_edit_cost from w_publ_easyq
- end type
- type tv_1 from uo_tv_mtrltype within w_mtrldef_edit_cost
- end type
- type ddlb_mtrlprp from uo_ddlb_mtrlorigin within w_mtrldef_edit_cost
- end type
- type cbx_1 from checkbox within w_mtrldef_edit_cost
- end type
- type cb_save from uo_imflatbutton within w_mtrldef_edit_cost
- end type
- type dw_pageretr from u_dw_rbtnfilter within w_mtrldef_edit_cost
- end type
- type cb_del from uo_imflatbutton within w_mtrldef_edit_cost
- end type
- type cb_update from uo_imflatbutton within w_mtrldef_edit_cost
- end type
- type cb_4 from uo_imflatbutton within w_mtrldef_edit_cost
- end type
- type cb_3 from commandbutton within w_mtrldef_edit_cost
- end type
- type cb_5 from commandbutton within w_mtrldef_edit_cost
- end type
- type cb_8 from commandbutton within w_mtrldef_edit_cost
- end type
- type cb_9 from commandbutton within w_mtrldef_edit_cost
- end type
- end forward
- global type w_mtrldef_edit_cost from w_publ_easyq
- integer width = 3675
- string title = "产品计划价统计表"
- event rtr_mx ( )
- event ue_p_unit_buy ( )
- event ue_p_unit_scll ( )
- event ue_p_unit_sale ( )
- event ue_p_rate_buy ( )
- event ue_p_rate_scll ( )
- event ue_p_rate_sale ( )
- event ue_p_unit ( )
- event ue_p_mtrlorigin ( )
- event ue_p_mtrlprp ( )
- event ue_view_his ( )
- tv_1 tv_1
- ddlb_mtrlprp ddlb_mtrlprp
- cbx_1 cbx_1
- cb_save cb_save
- dw_pageretr dw_pageretr
- cb_del cb_del
- cb_update cb_update
- cb_4 cb_4
- cb_3 cb_3
- cb_5 cb_5
- cb_8 cb_8
- cb_9 cb_9
- end type
- global w_mtrldef_edit_cost w_mtrldef_edit_cost
- type variables
- int cur_mtrlorigin = 0
- string ls_handtype = ''
- uo_mtrldef uo_mtrl
- end variables
- forward prototypes
- public function integer wf_refresh_curuc (long arg_cmpid)
- end prototypes
- event rtr_mx();Long ll_row,ll_cmpid
- dw_pageretr.AcceptText()
- ll_row = dw_pageretr.GetRow()
- IF ll_row > 0 THEN
- ll_cmpid = dw_pageretr.Object.cmpid[ll_row]
- dw_1.Retrieve(ll_cmpid)
- ELSE
- dw_1.Reset()
- END IF
- end event
- event ue_p_unit_buy();IF MessageBox('提示','是否要确定要批设定辅单位1', question!, YesNo!, 2) = 2 THEN
- RETURN
- END IF
- Long ll_i
- dw_1.AcceptText()
- dw_1.SetRedraw(FALSE)
- FOR ll_i = 1 TO dw_1.RowCount()
- IF ll_i = 1 THEN CONTINUE
- dw_1.Object.unit_buy[ll_i] = dw_1.Object.unit_buy[1]
- NEXT
- dw_1.SetRedraw(TRUE)
- end event
- event ue_p_unit_scll();IF MessageBox('提示','是否要确定要批设定辅单位2', question!, YesNo!, 2) = 2 THEN
- RETURN
- END IF
- Long ll_i
- dw_1.AcceptText()
- dw_1.SetRedraw(FALSE)
- FOR ll_i = 1 TO dw_1.RowCount()
- IF ll_i = 1 THEN CONTINUE
- dw_1.Object.unit_scll[ll_i] = dw_1.Object.unit_scll[1]
- NEXT
- dw_1.SetRedraw(TRUE)
- end event
- event ue_p_unit_sale();IF MessageBox('提示','是否要确定要批设定辅单位3', question!, YesNo!, 2) = 2 THEN
- RETURN
- END IF
- Long ll_i
- dw_1.AcceptText()
- dw_1.SetRedraw(FALSE)
- FOR ll_i = 1 TO dw_1.RowCount()
- IF ll_i = 1 THEN CONTINUE
- dw_1.Object.unit_sale[ll_i] = dw_1.Object.unit_sale[1]
- NEXT
- dw_1.SetRedraw(TRUE)
- end event
- event ue_p_rate_buy();IF MessageBox('提示','是否要确定要批设定转换率1', question!, YesNo!, 2) = 2 THEN
- RETURN
- END IF
- Long ll_i
- dw_1.AcceptText()
- dw_1.SetRedraw(FALSE)
- FOR ll_i = 1 TO dw_1.RowCount()
- IF ll_i = 1 THEN CONTINUE
- dw_1.Object.rate_buy[ll_i] = dw_1.Object.rate_buy[1]
- NEXT
- dw_1.SetRedraw(TRUE)
- end event
- event ue_p_rate_scll();IF MessageBox('提示','是否要确定要批设定转换率2', question!, YesNo!, 2) = 2 THEN
- RETURN
- END IF
- Long ll_i
- dw_1.AcceptText()
- dw_1.SetRedraw(FALSE)
- FOR ll_i = 1 TO dw_1.RowCount()
- IF ll_i = 1 THEN CONTINUE
- dw_1.Object.rate_scll[ll_i] = dw_1.Object.rate_scll[1]
- NEXT
- dw_1.SetRedraw(TRUE)
- end event
- event ue_p_rate_sale();IF MessageBox('提示','是否要确定要批设定转换率3', question!, YesNo!, 2) = 2 THEN
- RETURN
- END IF
- Long ll_i
- dw_1.AcceptText()
- dw_1.SetRedraw(FALSE)
- FOR ll_i = 1 TO dw_1.RowCount()
- IF ll_i = 1 THEN CONTINUE
- dw_1.Object.rate_sale[ll_i] = dw_1.Object.rate_sale[1]
- NEXT
- dw_1.SetRedraw(TRUE)
- end event
- event ue_p_unit();IF MessageBox('提示','是否要确定要批设定单位', question!, YesNo!, 2) = 2 THEN
- RETURN
- END IF
- Long ll_i
- dw_1.AcceptText()
- dw_1.SetRedraw(FALSE)
- FOR ll_i = 1 TO dw_1.RowCount()
- IF ll_i = 1 THEN CONTINUE
- dw_1.Object.unit[ll_i] = dw_1.Object.unit[1]
- NEXT
- dw_1.SetRedraw(TRUE)
- end event
- event ue_p_mtrlorigin();IF MessageBox('提示','是否要确定要批设定物料来源', question!, YesNo!, 2) = 2 THEN
- RETURN
- END IF
- Long ll_i
- Long ll_mtrlorigin
- s_mtrlorigin rls_mtrlorigin
- Open(w_mtrlorigin_ch)
- rls_mtrlorigin = Message.PowerObjectParm
- IF rls_mtrlorigin.mtrloriginid >= 0 THEN
- dw_1.AcceptText()
- dw_1.SetRedraw(FALSE)
- FOR ll_i = 1 TO dw_1.RowCount()
- IF dw_1.Object.isselect[ll_i] = 1 THEN
- dw_1.Object.mtrlorigin[ll_i] = rls_mtrlorigin.mtrloriginid
- END IF
- NEXT
- dw_1.SetRedraw(TRUE)
- END IF
- end event
- event ue_p_mtrlprp();IF MessageBox('提示','是否要确定要批设定物料属性', question!, YesNo!, 2) = 2 THEN
- RETURN
- END IF
- Long ll_i
- s_mtrlprp rls_mtrlprp
- Open(w_mtrlprp_ch)
- rls_mtrlprp = Message.PowerObjectParm
- IF rls_mtrlprp.mtrlprpid >= 0 THEN
- dw_1.AcceptText()
- dw_1.SetRedraw(FALSE)
- FOR ll_i = 1 TO dw_1.RowCount()
- IF dw_1.Object.isselect[ll_i] = 1 THEN
- dw_1.Object.mtrlprp[ll_i] = rls_mtrlprp.mtrlprpid
- END IF
- NEXT
- dw_1.SetRedraw(TRUE)
- END IF
- end event
- event ue_view_his();Long ll_row
- s_edit_index_tran s_open
- ll_row = dw_1.GetRow()
- IF ll_row <= 0 THEN
- MessageBox(publ_operator,'请选择产品')
- RETURN
- END IF
- s_open.b_long = dw_1.Object.u_mtrldef_mtrlid[ll_row]
- OpenWithParm(w_rp_mtrlprice_his,s_open)
- end event
- public function integer wf_refresh_curuc (long arg_cmpid);//wf_refresh_curuc
- Int rslt = 1
- IF arg_cmpid <= 0 OR IsNull(arg_cmpid) THEN
- rslt = 0
- GOTO ext
- END IF
- Long uc_row
- uc_row = dw_pageretr.GetRow()
- IF uc_row <= 0 THEN
- rslt = 0
- GOTO ext
- END IF
- Long flag
- String auditemp
- DateTime auditdate
- String opemp
- DateTime opdate,cmpdate
- String dscrp
- SELECT u_mtrldef_cost.flag,
- u_mtrldef_cost.auditemp,
- u_mtrldef_cost.auditdate,
- u_mtrldef_cost.opemp,
- u_mtrldef_cost.opdate,
- u_mtrldef_cost.dscrp,
- u_mtrldef_cost.cmpdate
- INTO :flag,
- :auditemp,
- :auditdate,
- :opemp,
- :opdate,
- :dscrp,
- :cmpdate
- FROM u_mtrldef_cost
- Where cmpid = :arg_cmpid;
- IF sqlca.SQLCode <> 0 THEN
- MessageBox('系统提示',"查询统计历史操作失败"+sqlca.SQLErrText, Information!, OK! )
- RETURN 0
- END IF
- dw_pageretr.Object.flag[dw_pageretr.GetRow()] = flag
- dw_pageretr.Object.auditemp[dw_pageretr.GetRow()] = auditemp
- dw_pageretr.Object.auditdate[dw_pageretr.GetRow()] = auditdate
- dw_pageretr.Object.opemp[dw_pageretr.GetRow()] = opemp
- dw_pageretr.Object.opdate[dw_pageretr.GetRow()] = opdate
- dw_pageretr.Object.dscrp[dw_pageretr.GetRow()] = dscrp
- dw_pageretr.Object.cmpid[dw_pageretr.GetRow()] = arg_cmpid
- dw_pageretr.Object.cmpdate[dw_pageretr.GetRow()] = cmpdate
- ext:
- RETURN rslt
- end function
- on w_mtrldef_edit_cost.create
- int iCurrent
- call super::create
- this.tv_1=create tv_1
- this.ddlb_mtrlprp=create ddlb_mtrlprp
- this.cbx_1=create cbx_1
- this.cb_save=create cb_save
- this.dw_pageretr=create dw_pageretr
- this.cb_del=create cb_del
- this.cb_update=create cb_update
- this.cb_4=create cb_4
- this.cb_3=create cb_3
- this.cb_5=create cb_5
- this.cb_8=create cb_8
- this.cb_9=create cb_9
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.tv_1
- this.Control[iCurrent+2]=this.ddlb_mtrlprp
- this.Control[iCurrent+3]=this.cbx_1
- this.Control[iCurrent+4]=this.cb_save
- this.Control[iCurrent+5]=this.dw_pageretr
- this.Control[iCurrent+6]=this.cb_del
- this.Control[iCurrent+7]=this.cb_update
- this.Control[iCurrent+8]=this.cb_4
- this.Control[iCurrent+9]=this.cb_3
- this.Control[iCurrent+10]=this.cb_5
- this.Control[iCurrent+11]=this.cb_8
- this.Control[iCurrent+12]=this.cb_9
- end on
- on w_mtrldef_edit_cost.destroy
- call super::destroy
- destroy(this.tv_1)
- destroy(this.ddlb_mtrlprp)
- destroy(this.cbx_1)
- destroy(this.cb_save)
- destroy(this.dw_pageretr)
- destroy(this.cb_del)
- destroy(this.cb_update)
- destroy(this.cb_4)
- destroy(this.cb_3)
- destroy(this.cb_5)
- destroy(this.cb_8)
- destroy(this.cb_9)
- end on
- event resize;ln_bar.endx = this.width
- ln_bar2.endx = this.width
- ln_1.endx = this.width
- ln_2.endx = this.width
- ln_3.endx = this.width
- ln_4.endx = this.width
- r_bar.width = this.width
- dw_1.height=this.height - dw_1.y - 150
- dw_pageretr.height=this.height - dw_pageretr.y - 150
- dw_1.width=this.width - dw_1.x - 40
- end event
- event open;call super::open;
- uo_mtrl = CREATE uo_mtrldef
- uo_mtrl.commit_transaction = sqlca
- dw_pageretr.settransobject(sqlca)
- dw_pageretr.retrieve()
- cb_1.triggerevent(clicked!)
- end event
- event ue_before_open;call super::ue_before_open;if_ue_retr=true
- if_ue_filter=true
- if_ue_sort=true
- if_ue_sentdataout=true
- end event
- event close;call super::close;destroy uo_mtrl
- end event
- type cb_func from w_publ_easyq`cb_func within w_mtrldef_edit_cost
- integer x = 805
- end type
- type cb_exit from w_publ_easyq`cb_exit within w_mtrldef_edit_cost
- integer x = 1106
- end type
- type cb_2 from w_publ_easyq`cb_2 within w_mtrldef_edit_cost
- boolean visible = false
- integer x = 1669
- integer taborder = 100
- boolean bringtotop = true
- end type
- type cb_psetup from w_publ_easyq`cb_psetup within w_mtrldef_edit_cost
- boolean visible = false
- integer x = 1413
- boolean bringtotop = true
- end type
- type cb_1 from w_publ_easyq`cb_1 within w_mtrldef_edit_cost
- boolean bringtotop = true
- end type
- event cb_1::clicked;call super::clicked;Int li_isuse
- IF cbx_1.Checked THEN
- li_isuse = 1
- ELSE
- li_isuse = -1
- END IF
- if dw_pageretr.getrow() = 0 then return
- long cmpid
- cmpid = dw_pageretr.object.cmpid[dw_pageretr.getrow()]
- dw_1.Retrieve(cur_mtrlorigin,ls_handtype,li_isuse)
- end event
- type st_3 from w_publ_easyq`st_3 within w_mtrldef_edit_cost
- boolean visible = false
- integer x = 1641
- integer y = 648
- end type
- type st_4 from w_publ_easyq`st_4 within w_mtrldef_edit_cost
- boolean visible = false
- integer x = 1655
- integer y = 552
- end type
- type em_1 from w_publ_easyq`em_1 within w_mtrldef_edit_cost
- boolean visible = false
- integer x = 1221
- integer y = 480
- integer taborder = 110
- end type
- type em_2 from w_publ_easyq`em_2 within w_mtrldef_edit_cost
- boolean visible = false
- integer x = 1737
- integer y = 356
- integer taborder = 140
- end type
- type ddlb_yl from w_publ_easyq`ddlb_yl within w_mtrldef_edit_cost
- boolean visible = false
- integer x = 2354
- integer y = 32
- end type
- type cbx_yl from w_publ_easyq`cbx_yl within w_mtrldef_edit_cost
- boolean visible = false
- integer x = 2149
- integer y = 36
- end type
- type dw_1 from w_publ_easyq`dw_1 within w_mtrldef_edit_cost
- integer x = 919
- integer y = 288
- integer width = 3589
- integer height = 1984
- string dataobject = "dw_mtrldef_costmx_index"
- end type
- event dw_1::rowfocuschanged;IF currentrow > 0 THEN
- THIS.SelectRow(0,FALSE)
- THIS.SelectRow(currentrow,TRUE)
- END IF
- end event
- event dw_1::clicked;call super::clicked;IF row <=0 THEN RETURN
- this.selectrow(0,false)
- this.selectrow(row,true)
- this.setrow(row)
- end event
- event dw_1::doubleclicked;call super::doubleclicked;PARENT.TriggerEvent('ue_view_his')
- end event
- type sle_mtrl from w_publ_easyq`sle_mtrl within w_mtrldef_edit_cost
- end type
- type sle_cust from w_publ_easyq`sle_cust within w_mtrldef_edit_cost
- end type
- type st_mtrl from w_publ_easyq`st_mtrl within w_mtrldef_edit_cost
- end type
- type st_cust from w_publ_easyq`st_cust within w_mtrldef_edit_cost
- end type
- type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_mtrldef_edit_cost
- end type
- type pb_em1 from w_publ_easyq`pb_em1 within w_mtrldef_edit_cost
- boolean visible = false
- end type
- type pb_em2 from w_publ_easyq`pb_em2 within w_mtrldef_edit_cost
- boolean visible = false
- end type
- type pb_2 from w_publ_easyq`pb_2 within w_mtrldef_edit_cost
- boolean visible = false
- end type
- type cb_help from w_publ_easyq`cb_help within w_mtrldef_edit_cost
- integer x = 955
- end type
- type cb_copyself from w_publ_easyq`cb_copyself within w_mtrldef_edit_cost
- boolean visible = false
- integer x = 411
- end type
- type gb_1 from w_publ_easyq`gb_1 within w_mtrldef_edit_cost
- integer x = 1463
- integer y = 476
- integer width = 599
- end type
- type ln_bar from w_publ_easyq`ln_bar within w_mtrldef_edit_cost
- end type
- type ln_bar2 from w_publ_easyq`ln_bar2 within w_mtrldef_edit_cost
- end type
- type r_bar from w_publ_easyq`r_bar within w_mtrldef_edit_cost
- integer x = 3374
- integer y = 32
- end type
- type ln_1 from w_publ_easyq`ln_1 within w_mtrldef_edit_cost
- integer beginy = 280
- integer endy = 280
- end type
- type ln_2 from w_publ_easyq`ln_2 within w_mtrldef_edit_cost
- integer beginy = 284
- integer endy = 284
- end type
- type ln_3 from w_publ_easyq`ln_3 within w_mtrldef_edit_cost
- boolean visible = false
- end type
- type ln_4 from w_publ_easyq`ln_4 within w_mtrldef_edit_cost
- boolean visible = false
- end type
- type tv_1 from uo_tv_mtrltype within w_mtrldef_edit_cost
- integer y = 288
- integer width = 905
- integer height = 728
- integer taborder = 70
- boolean bringtotop = true
- integer textsize = -9
- fontcharset fontcharset = gb2312charset!
- fontfamily fontfamily = anyfont!
- string facename = "宋体"
- end type
- event selectionchanged;call super::selectionchanged;
- IF dw_edit_mode THEN
- IF dw_1.GetRow() <= 0 THEN RETURN
- IF THIS.uo_cur_info.sonflag = 1 THEN
- dw_1.SetRedraw(FALSE)
- dw_1.Object.mtrltypeid[dw_1.GetRow()] = THIS.uo_cur_info.mtrltypeid
- dw_1.Object.mtrltype[dw_1.GetRow()] = THIS.uo_cur_info.mtrltype
- dw_1.Object.handtype[dw_1.GetRow()] = THIS.uo_cur_info.handtype
- dw_1.Object.mtrlorigin[dw_1.GetRow()] = THIS.uo_cur_info.mtrlprp
- dw_1.SetRedraw(TRUE)
- END IF
- ELSE
- ls_handtype = THIS.uo_cur_info.handtype
- ls_handtype = ls_handtype + '%'
- cb_1.TriggerEvent(Clicked!)
- END IF
- end event
- type ddlb_mtrlprp from uo_ddlb_mtrlorigin within w_mtrldef_edit_cost
- integer x = 14
- integer y = 188
- integer width = 517
- integer height = 480
- integer taborder = 50
- boolean bringtotop = true
- end type
- event selectionchanged;call super::selectionchanged;cur_mtrlorigin = this.uo_mtrlorigin
- cb_1.triggerevent(clicked!)
- end event
- type cbx_1 from checkbox within w_mtrldef_edit_cost
- integer x = 549
- integer y = 196
- integer width = 402
- integer height = 60
- 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 checked = true
- end type
- event clicked;cb_1.triggerevent(clicked!)
- end event
- type cb_save from uo_imflatbutton within w_mtrldef_edit_cost
- integer x = 151
- integer width = 160
- integer height = 164
- integer taborder = 50
- boolean bringtotop = true
- string text = "新建"
- string normalpicname = "save.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;IF NOT f_power_ind(1374) THEN
- MessageBox('提示','你没有使用权限!', Information!, OK! )
- RETURN
- END IF
- IF NOT IsValid(w_buytask_buymx_ch) THEN
- s_edit_index_tran s_tran1
-
- s_tran1.b_long = 0
- OpenWithParm(w_mtrldef_edit_cost_rule,s_tran1)
- END IF
- dw_pageretr.retrieve()
- end event
- type dw_pageretr from u_dw_rbtnfilter within w_mtrldef_edit_cost
- integer y = 1124
- integer width = 905
- integer height = 1148
- integer taborder = 20
- boolean bringtotop = true
- string dataobject = "dw_mtrldef_cost_index"
- end type
- event rowfocuschanged;call super::rowfocuschanged;IF currentrow > 0 THEN
- THIS.SelectRow(0,FALSE)
- THIS.SelectRow(currentrow,TRUE)
- END IF
- end event
- event doubleclicked;call super::doubleclicked;
- IF dw_pageretr.GetRow() = 0 THEN RETURN
- IF NOT IsValid(w_buytask_buymx_ch) THEN
- s_edit_index_tran s_tran1
- s_tran1.b_long = dw_pageretr.object.cmpid[dw_pageretr.GetRow()]
- OpenWithParm(w_mtrldef_edit_cost_rule,s_tran1)
- END IF
- end event
- type cb_del from uo_imflatbutton within w_mtrldef_edit_cost
- integer x = 311
- integer width = 165
- integer height = 164
- integer taborder = 40
- 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(1377) THEN
- MessageBox('提示','你没有使用权限!', Information!, OK! )
- RETURN
- END IF
- //
- IF dw_edit_mode THEN RETURN
- String arg_msg = ''
- Long uc_row
-
- uc_row = dw_pageretr.GetRow()
- IF uc_row <= 0 THEN
- MessageBox('系统提示','请选定当前统计历史!', Information!, OK! )
- RETURN
- END IF
- IF MessageBox ("询问","是否确定要删除当前吗",Question!,YesNo! ) = 2 THEN RETURN
- IF uo_mtrl.del_cmp(dw_pageretr.Object.cmpid[uc_row],arg_msg,TRUE) = 0 THEN
- MessageBox('错误',arg_msg, StopSign!, OK! )
- ELSE
- //日志
- Long ls_id
- String ls_code
- ls_id = dw_pageretr.Object.cmpid[uc_row]
- ls_code = dw_pageretr.Object.dscrp[uc_row]
- f_setsysoplog('物料成本统计','删除,id:'+String(ls_id)+',备注:'+ls_code,arg_msg,TRUE)
- //--
-
- MessageBox('提示','删除成功!', Information!, OK! )
-
- dw_pageretr.DeleteRow(uc_row)
- dw_pageretr.PostEvent(RowFocusChanged!)
- END IF
- end event
- type cb_update from uo_imflatbutton within w_mtrldef_edit_cost
- integer x = 640
- integer width = 165
- integer height = 164
- integer taborder = 50
- boolean bringtotop = true
- string text = "更新"
- string normalpicname = "update.BMP"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;IF NOT f_power_ind(1376) THEN
- MessageBox('提示','你没有使用权限!', Information!, OK! )
- RETURN
- END IF
- //
- IF dw_edit_mode THEN RETURN
- String arg_msg
- Long uc_row
- IF MessageBox ("询问","是否确定要更新物料定义资料?",Question!,YesNo! ) = 2 THEN RETURN
- uc_row = dw_pageretr.GetRow()
- IF uc_row <= 0 THEN
- MessageBox('系统提示','请选定当前统计历史!', Information!, OK! )
- RETURN
- END IF
- IF uo_mtrl.update_cost(dw_pageretr.Object.cmpid[uc_row],arg_msg,TRUE) = 0 THEN
- MessageBox('错误',arg_msg, StopSign!, OK! )
- RETURN
- ELSE
- wf_refresh_curuc(dw_pageretr.Object.cmpid[uc_row])
- MessageBox('提示','更新物料定义资料成功', Information!, OK! )
- RETURN
- END IF
- end event
- type cb_4 from uo_imflatbutton within w_mtrldef_edit_cost
- integer x = 475
- integer width = 165
- integer height = 164
- integer taborder = 50
- 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(1385) THEN
- MessageBox('提示','你没有使用权限!', Information!, OK! )
- RETURN
- END IF
- //
- IF dw_edit_mode THEN RETURN
- IF MessageBox ("询问","是否确定要统计历史?",Question!,YesNo! ) = 2 THEN RETURN
- String arg_msg = ''
- Long uc_row
- uc_row = dw_pageretr.GetRow()
- IF uc_row <= 0 THEN
- MessageBox('系统提示','请选定当前统计历史!', Information!, OK! )
- RETURN
- END IF
- s_mtrldef_cost s_cost
- s_mtrldef_costmx s_costmx
- dw_1.AcceptText()
- Long count,i
- count = 0
- FOR i = 1 TO dw_1.RowCount()
- IF dw_1.Object.ch[i] = 1 THEN
- count++
- s_costmx.mtrlid[count] = dw_1.Object.u_mtrldef_mtrlid[i]
- END IF
- NEXT
- IF count = 0 THEN
- MessageBox('系统提示','请选定物料!', Information!, OK! )
- RETURN
- END IF
- s_cost.cmpid = dw_pageretr.Object.cmpid[uc_row]
- s_cost.cmpdate = dw_pageretr.Object.cmpdate[uc_row]
- s_cost.dscrp = dw_pageretr.Object.dscrp[uc_row]
- s_cost.mtrltype = dw_pageretr.Object.mtrltype[uc_row]
- s_cost.emptype = dw_pageretr.Object.emptype[uc_row]
- s_cost.scformula = dw_pageretr.Object.scformula[uc_row]
- s_cost.glformula = dw_pageretr.Object.glformula[uc_row]
- IF uo_mtrl.uof_cml_cost(s_cost,s_costmx,arg_msg,TRUE) = 0 THEN
- MessageBox('错误',arg_msg, StopSign!, OK! )
- RETURN
- ELSE
- wf_refresh_curuc(dw_pageretr.Object.cmpid[uc_row])
- MessageBox('提示','统计成功', Information!, OK! )
- cb_1.TriggerEvent(Clicked!)
- RETURN
- END IF
- end event
- type cb_3 from commandbutton within w_mtrldef_edit_cost
- integer x = 992
- integer y = 184
- integer width = 192
- integer height = 84
- integer taborder = 130
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "全选"
- end type
- event clicked;Long i
- dw_1.AcceptText()
- FOR i = 1 TO dw_1.RowCount()
- dw_1.Object.ch[i] = 1
- NEXT
- end event
- type cb_5 from commandbutton within w_mtrldef_edit_cost
- integer x = 1184
- integer y = 184
- integer width = 219
- integer height = 84
- integer taborder = 140
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "全不选"
- end type
- event clicked;Long i
- dw_1.AcceptText()
- FOR i = 1 TO dw_1.RowCount()
- dw_1.Object.ch[i] = 0
- NEXT
- end event
- type cb_8 from commandbutton within w_mtrldef_edit_cost
- integer y = 1024
- integer width = 229
- integer height = 96
- integer taborder = 120
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "刷新"
- end type
- event clicked;dw_pageretr.retrieve()
- end event
- type cb_9 from commandbutton within w_mtrldef_edit_cost
- integer x = 229
- integer y = 1024
- integer width = 416
- integer height = 96
- integer taborder = 130
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "查询统计历史"
- end type
- event clicked;IF dw_pageretr.GetRow() = 0 THEN RETURN
- IF NOT IsValid(w_buytask_buymx_ch) THEN
- s_edit_index_tran s_tran1
- s_tran1.b_long = dw_pageretr.object.cmpid[dw_pageretr.GetRow()]
- OpenWithParm(w_mtrldef_edit_cost_cmp,s_tran1)
- END IF
- end event
|