123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527 |
- $PBExportHeader$w_order_ml_workprice.srw
- forward
- global type w_order_ml_workprice from w_publ_base
- end type
- type dw_1 from u_dw_rbtnfilter within w_order_ml_workprice
- end type
- type cb_save from uo_imflatbutton within w_order_ml_workprice
- end type
- type cb_re_cmpl from uo_imflatbutton within w_order_ml_workprice
- end type
- type ln_bar from line within w_order_ml_workprice
- end type
- type ln_bar2 from line within w_order_ml_workprice
- end type
- type r_bar from rectangle within w_order_ml_workprice
- end type
- type cb_change from uo_imflatbutton within w_order_ml_workprice
- end type
- type st_dscrp from statictext within w_order_ml_workprice
- end type
- type cb_help from uo_imflatbutton within w_order_ml_workprice
- end type
- type ln_3 from line within w_order_ml_workprice
- end type
- type ln_4 from line within w_order_ml_workprice
- end type
- end forward
- global type w_order_ml_workprice from w_publ_base
- integer width = 3621
- integer height = 2460
- string title = "工价设定"
- boolean minbox = false
- windowtype windowtype = response!
- windowstate windowstate = maximized!
- event ue_sort_1 ( )
- event ue_sort_2 ( )
- event ue_help ( )
- dw_1 dw_1
- cb_save cb_save
- cb_re_cmpl cb_re_cmpl
- ln_bar ln_bar
- ln_bar2 ln_bar2
- r_bar r_bar
- cb_change cb_change
- st_dscrp st_dscrp
- cb_help cb_help
- ln_3 ln_3
- ln_4 ln_4
- end type
- global w_order_ml_workprice w_order_ml_workprice
- type variables
- Long i_taskid,i_scid
- Long i_printid
- long i_mtrlid
- Long ll_unlock_row
- Boolean if_cmpl = TRUE
- Decimal i_d_cmplqty_old
- Int i_i_plantype_old
- Long i_l_scid_old
- end variables
- event ue_sort_1();IF MessageBox ("IF","是否确定要重新排序已运算的数据,重新排序后可能会影响下级换料,是否继续?",Question!,YesNo! ) = 2 THEN RETURN
- dw_1.SetSort('u_orderrqmtrl_tree_ifmainmtrlid ds,u_orderrqmtrl_tree_wrkgrpid as')
- dw_1.Sort( )
- end event
- event ue_sort_2();IF MessageBox ("IF","是否确定要重新排序已运算的数据,重新排序后可能会影响下级换料,是否继续?",Question!,YesNo! ) = 2 THEN RETURN
- dw_1.SetSort(' ,u_mtrldef_mtrltype as')
- dw_1.Sort( )
- end event
- event ue_help();Int i
- i = htmlhelpA(Handle(THIS), sys_help_chm, 0, THIS.Title+".htm")
- end event
- on w_order_ml_workprice.create
- int iCurrent
- call super::create
- this.dw_1=create dw_1
- this.cb_save=create cb_save
- this.cb_re_cmpl=create cb_re_cmpl
- this.ln_bar=create ln_bar
- this.ln_bar2=create ln_bar2
- this.r_bar=create r_bar
- this.cb_change=create cb_change
- this.st_dscrp=create st_dscrp
- this.cb_help=create cb_help
- this.ln_3=create ln_3
- this.ln_4=create ln_4
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.dw_1
- this.Control[iCurrent+2]=this.cb_save
- this.Control[iCurrent+3]=this.cb_re_cmpl
- this.Control[iCurrent+4]=this.ln_bar
- this.Control[iCurrent+5]=this.ln_bar2
- this.Control[iCurrent+6]=this.r_bar
- this.Control[iCurrent+7]=this.cb_change
- this.Control[iCurrent+8]=this.st_dscrp
- this.Control[iCurrent+9]=this.cb_help
- this.Control[iCurrent+10]=this.ln_3
- this.Control[iCurrent+11]=this.ln_4
- end on
- on w_order_ml_workprice.destroy
- call super::destroy
- destroy(this.dw_1)
- destroy(this.cb_save)
- destroy(this.cb_re_cmpl)
- destroy(this.ln_bar)
- destroy(this.ln_bar2)
- destroy(this.r_bar)
- destroy(this.cb_change)
- destroy(this.st_dscrp)
- destroy(this.cb_help)
- destroy(this.ln_3)
- destroy(this.ln_4)
- end on
- event resize;call super::resize;ln_bar.EndX = THIS.Width
- ln_bar2.EndX = THIS.Width
- r_bar.Width = THIS.Width
- ln_3.EndX = THIS.Width
- ln_4.EndX = THIS.Width
- dw_1.Width = THIS.Width - dw_1.X - 40
- dw_1.Height = THIS.Height - dw_1.Y - 150
- st_dscrp.Width = THIS.Width - st_dscrp.X - 40
- end event
- event open;call super::open;
- s_order_ml_mrp s_mrp
- s_mrp = Message.PowerObjectParm
- st_dscrp.Text = '销售订单明细备注:'+s_mrp.dscrp
- i_taskid = s_mrp.taskid
- i_scid = s_mrp.scid
- i_printid = s_mrp.printid
- i_mtrlid = s_mrp.mtrlid
- dw_1.SetTransObject(sqlca)
- IF dw_1.Retrieve(i_scid,i_taskid,i_printid) = 0 THEN
- cb_re_cmpl.TriggerEvent(Clicked!)
- END IF
- Long i
- FOR i = 1 TO 10
- dw_1.SetTabOrder (i,i*10 )
- NEXT
- end event
- event ue_before_open;call super::ue_before_open;if_ue_sort = TRUE
- end event
- event key;call super::key;IF KeyDown(KeyF1!) THEN
- THIS.TriggerEvent('ue_help')
- end if
- end event
- type cb_func from w_publ_base`cb_func within w_order_ml_workprice
- boolean visible = false
- integer x = 2738
- integer width = 165
- integer height = 164
- boolean enabled = false
- end type
- type cb_exit from w_publ_base`cb_exit within w_order_ml_workprice
- integer x = 974
- integer width = 165
- integer height = 164
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- type dw_1 from u_dw_rbtnfilter within w_order_ml_workprice
- integer y = 280
- integer width = 3543
- integer height = 1872
- integer taborder = 20
- boolean bringtotop = true
- string dataobject = "dw_order_ml_workprice_edit"
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean hsplitscroll = true
- end type
- event rowfocuschanged;call super::rowfocuschanged;
- IF currentrow > 0 THEN
- THIS.SelectRow(0,FALSE)
- THIS.SetRow(currentrow)
- THIS.SelectRow(currentrow,TRUE)
- END IF
- end event
- event clicked;call super::clicked;
- IF row > 0 THEN
- THIS.SelectRow(0,FALSE)
- THIS.SetRow(row)
- THIS.SelectRow(row,TRUE)
- END IF
- end event
- event doubleclicked;call super::doubleclicked;IF row > 0 THEN
-
- END IF
- end event
- event 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 = xpos
- s_calender.PointerY = ypos
- 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 cb_save from uo_imflatbutton within w_order_ml_workprice
- integer x = 439
- integer width = 165
- integer height = 164
- integer taborder = 30
- 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;Long ll_i,ch,ch_tree
- String arg_msg
- s_order_ml_workprice_array s_mtrl
- dw_1.AcceptText()
- IF dw_1.RowCount() <= 0 THEN
- MessageBox('提示','没有可保存的数据')
- RETURN
- END IF
- FOR ll_i = 1 TO dw_1.RowCount()
-
- IF dw_1.Object.workqty[ll_i] = 0 THEN CONTINUE
-
- ch++
- s_mtrl.printid[ch] = i_printid
- s_mtrl.taskid[ch] = i_taskid
- s_mtrl.scid[ch] = i_scid
- s_mtrl.mtrlid[ch] = i_mtrlid
- s_mtrl.workqty[ch] = dw_1.Object.workqty[ll_i]
- s_mtrl.ifchanged[ch] = dw_1.Object.ifchanged[ll_i]
- s_mtrl.proorder[ch] = dw_1.Object.proorder[ll_i]
- s_mtrl.procode[ch] = dw_1.Object.procode[ll_i]
- s_mtrl.proname[ch] = dw_1.Object.u_order_ml_workprice_proname[ll_i]
- s_mtrl.workprice[ch] = dw_1.Object.workprice[ll_i]
- s_mtrl.wrkgrpid[ch] = dw_1.Object.wrkgrpid[ll_i]
- s_mtrl.lastflag[ch] = dw_1.Object.lastflag[ll_i]
- s_mtrl.dscrp[ch] = dw_1.Object.dscrp[ll_i]
- s_mtrl.worklevel[ch] = dw_1.Object.worklevel[ll_i]
- s_mtrl.techlevel[ch] = dw_1.Object.techlevel[ll_i]
- s_mtrl.proid[ch] = dw_1.Object.proid[ll_i]
- NEXT
- uo_order_ml uo_ml_mrp
- uo_ml_mrp = CREATE uo_order_ml
- uo_ml_mrp.commit_transaction = sqlca
- IF uo_ml_mrp.uof_add_workprice(s_mtrl,TRUE,arg_msg) = 0 THEN
- MessageBox('提示',arg_msg)
- RETURN
- END IF
- DESTROY uo_ml_mrp
- MessageBox('提示','保存成功')
- Close(PARENT)
- end event
- type cb_re_cmpl from uo_imflatbutton within w_order_ml_workprice
- integer width = 439
- integer height = 164
- integer taborder = 10
- 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;Int rslt = 1
- String arg_msg
- uo_order_ml uo_sale
- uo_sale = CREATE uo_order_ml
- uo_sale.commit_transaction = sqlca
- IF uo_sale.uof_cmp_workprice(i_scid,i_taskid,i_printid,i_mtrlid,TRUE,arg_msg) = 0 THEN
- MessageBox('提示',arg_msg,information!,ok!)
- RETURN
- END IF
- dw_1.SetRedraw(FALSE)
- dw_1.Retrieve(i_scid,i_taskid,i_printid)
- dw_1.SetRedraw(TRUE)
- destroy uo_sale
- end event
- type ln_bar from line within w_order_ml_workprice
- long linecolor = 268435456
- integer linethickness = 4
- integer beginy = 176
- integer endx = 3323
- integer endy = 176
- end type
- type ln_bar2 from line within w_order_ml_workprice
- long linecolor = 16777215
- integer linethickness = 4
- integer beginy = 180
- integer endx = 3323
- integer endy = 180
- end type
- type r_bar from rectangle within w_order_ml_workprice
- long linecolor = 16777215
- long fillcolor = 1073741824
- integer x = 2473
- integer width = 73
- integer height = 172
- end type
- event constructor;this.fillcolor = 14215660
- this.linecolor = 14215660
- this.x = -1
- this.y = -1
- this.height = ln_bar2.beginy - 5
- end event
- type cb_change from uo_imflatbutton within w_order_ml_workprice
- integer x = 603
- integer width = 219
- integer height = 164
- integer taborder = 50
- boolean bringtotop = true
- string text = "换工序"
- string normalpicname = "p1.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;
- Long child_row
- Long ls_null
- child_row = dw_1.GetRow()
- s_edit_index_tran s_ch_tran
- s_ch_tran.if_retrieve_all = TRUE
- s_ch_tran.work_mode = 1
- s_ch_tran.arg_pkid = 0
- s_ch_tran.b_long = 0
- s_ch_tran.if_select_all = FALSE
- s_ch_tran.arg_string_code = ''
- Long ls_j,ll_row_insert,i
- String ls_procode
- String ls_wrkprocode_new
- Decimal ld_workqty
- ls_procode = dw_1.Object.procode[child_row]
- ld_workqty = dw_1.Object.workqty[child_row]
- IF NOT IsValid(w_sc_workprocedure_response) THEN
- OpenWithParm(w_sc_workprocedure_response,s_ch_tran) //调用
-
- s_workprocedure S_INSCUST
- S_INSCUST = Message.PowerObjectParm //接受返回结构
- IF UpperBound(S_INSCUST.wrkproid) > 0 AND S_INSCUST.wrkproid[1] > 0 THEN
- ls_wrkprocode_new = S_INSCUST.wrkprocode[1]
-
- IF ls_wrkprocode_new = ls_procode THEN RETURN
-
- dw_1.Object.workqty[child_row] = 0
- ll_row_insert = dw_1.InsertRow(child_row + 1)
- dw_1.Object.proid[ll_row_insert] = S_INSCUST.wrkproid[1]
- dw_1.Object.procode[ll_row_insert] = S_INSCUST.wrkprocode[1]
- dw_1.Object.u_order_ml_workprice_proname[ll_row_insert] = S_INSCUST.wrkproname[1]
- dw_1.Object.worklevel[ll_row_insert] = S_INSCUST.worklevel[1]
- dw_1.Object.techlevel[ll_row_insert] = S_INSCUST.techlevel[1]
- dw_1.Object.workhour[ll_row_insert] = S_INSCUST.workhour[1]
- dw_1.Object.wrkgrpid[ll_row_insert] = S_INSCUST.wrkgrid[1]
- dw_1.Object.workprice[ll_row_insert] = S_INSCUST.workprice[1]
- dw_1.Object.ifchanged[ll_row_insert] = 1
- dw_1.Object.proorder[ll_row_insert] = dw_1.Object.proorder[ll_row_insert - 1]
- END IF
- END IF
- dw_1.SetRedraw(TRUE)
- dw_1.SetFocus()
- end event
- type st_dscrp from statictext within w_order_ml_workprice
- integer x = 23
- integer y = 200
- integer width = 3543
- integer height = 56
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 700
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 16711680
- long backcolor = 134217739
- string text = "销售订单明细备注:"
- boolean focusrectangle = false
- end type
- type cb_help from uo_imflatbutton within w_order_ml_workprice
- integer x = 823
- integer width = 151
- integer height = 164
- integer taborder = 20
- boolean bringtotop = true
- string text = "帮助"
- string normalpicname = "help.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;PARENT.TriggerEvent('ue_help')
- end event
- type ln_3 from line within w_order_ml_workprice
- long linecolor = 268435456
- integer linethickness = 4
- integer beginy = 272
- integer endx = 3323
- integer endy = 272
- end type
- type ln_4 from line within w_order_ml_workprice
- long linecolor = 16777215
- integer linethickness = 4
- integer beginy = 276
- integer endx = 3323
- integer endy = 276
- end type
|