1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330 |
- $PBExportHeader$w_mtrl_workpricestr_compute_edit.srw
- forward
- global type w_mtrl_workpricestr_compute_edit from w_publ_base
- end type
- type mle_rule_if from multilineedit within w_mtrl_workpricestr_compute_edit
- end type
- type st_1 from statictext within w_mtrl_workpricestr_compute_edit
- end type
- type ddlb_op from dropdownlistbox within w_mtrl_workpricestr_compute_edit
- end type
- type st_2 from statictext within w_mtrl_workpricestr_compute_edit
- end type
- type ddlb_1 from dropdownlistbox within w_mtrl_workpricestr_compute_edit
- end type
- type st_3 from statictext within w_mtrl_workpricestr_compute_edit
- end type
- type st_4 from statictext within w_mtrl_workpricestr_compute_edit
- end type
- type cb_ok from uo_imflatbutton within w_mtrl_workpricestr_compute_edit
- end type
- type cb_check from commandbutton within w_mtrl_workpricestr_compute_edit
- end type
- type st_5 from statictext within w_mtrl_workpricestr_compute_edit
- end type
- type st_status from statictext within w_mtrl_workpricestr_compute_edit
- end type
- type st_woodcode from statictext within w_mtrl_workpricestr_compute_edit
- end type
- type st_pcode from statictext within w_mtrl_workpricestr_compute_edit
- end type
- type cb_10 from commandbutton within w_mtrl_workpricestr_compute_edit
- end type
- type st_8 from statictext within w_mtrl_workpricestr_compute_edit
- end type
- type st_9 from statictext within w_mtrl_workpricestr_compute_edit
- end type
- type st_11 from statictext within w_mtrl_workpricestr_compute_edit
- end type
- type st_12 from statictext within w_mtrl_workpricestr_compute_edit
- end type
- type cb_17 from commandbutton within w_mtrl_workpricestr_compute_edit
- end type
- type cb_18 from commandbutton within w_mtrl_workpricestr_compute_edit
- end type
- type st_6 from statictext within w_mtrl_workpricestr_compute_edit
- end type
- type st_7 from statictext within w_mtrl_workpricestr_compute_edit
- end type
- type st_10 from statictext within w_mtrl_workpricestr_compute_edit
- end type
- type st_13 from statictext within w_mtrl_workpricestr_compute_edit
- end type
- type st_14 from statictext within w_mtrl_workpricestr_compute_edit
- end type
- type cb_4 from commandbutton within w_mtrl_workpricestr_compute_edit
- end type
- type dw_1 from datawindow within w_mtrl_workpricestr_compute_edit
- end type
- type st_usermtrlmode from statictext within w_mtrl_workpricestr_compute_edit
- end type
- type st_mtrlsectype from statictext within w_mtrl_workpricestr_compute_edit
- end type
- type st_zxmtrlmode from statictext within w_mtrl_workpricestr_compute_edit
- end type
- type cb_1 from commandbutton within w_mtrl_workpricestr_compute_edit
- end type
- type st_15 from statictext within w_mtrl_workpricestr_compute_edit
- end type
- type cb_2 from commandbutton within w_mtrl_workpricestr_compute_edit
- end type
- type st_16 from statictext within w_mtrl_workpricestr_compute_edit
- end type
- type cb_3 from uo_imflatbutton within w_mtrl_workpricestr_compute_edit
- end type
- type rb_1 from radiobutton within w_mtrl_workpricestr_compute_edit
- end type
- type rb_2 from radiobutton within w_mtrl_workpricestr_compute_edit
- end type
- type dw_2 from datawindow within w_mtrl_workpricestr_compute_edit
- end type
- type gb_1 from groupbox within w_mtrl_workpricestr_compute_edit
- end type
- end forward
- global type w_mtrl_workpricestr_compute_edit from w_publ_base
- integer width = 3611
- integer height = 2380
- string title = "工价公式编辑"
- boolean minbox = false
- windowtype windowtype = response!
- mle_rule_if mle_rule_if
- st_1 st_1
- ddlb_op ddlb_op
- st_2 st_2
- ddlb_1 ddlb_1
- st_3 st_3
- st_4 st_4
- cb_ok cb_ok
- cb_check cb_check
- st_5 st_5
- st_status st_status
- st_woodcode st_woodcode
- st_pcode st_pcode
- cb_10 cb_10
- st_8 st_8
- st_9 st_9
- st_11 st_11
- st_12 st_12
- cb_17 cb_17
- cb_18 cb_18
- st_6 st_6
- st_7 st_7
- st_10 st_10
- st_13 st_13
- st_14 st_14
- cb_4 cb_4
- dw_1 dw_1
- st_usermtrlmode st_usermtrlmode
- st_mtrlsectype st_mtrlsectype
- st_zxmtrlmode st_zxmtrlmode
- cb_1 cb_1
- st_15 st_15
- cb_2 cb_2
- st_16 st_16
- cb_3 cb_3
- rb_1 rb_1
- rb_2 rb_2
- dw_2 dw_2
- gb_1 gb_1
- end type
- global w_mtrl_workpricestr_compute_edit w_mtrl_workpricestr_compute_edit
- type variables
- string ins_rulestr
- int ins_type
- end variables
- forward prototypes
- public function integer uof_pricestr_cmp (string arg_pricestr, string arg_status, string arg_woodcode, string arg_pcode)
- end prototypes
- public function integer uof_pricestr_cmp (string arg_pricestr, string arg_status, string arg_woodcode, string arg_pcode);
- Int rslt = 1
- String s_rtn
- Long ll_i
- String ls_parmname
- Decimal ld_parmvalue
- datastore ds_pricestr
- ds_pricestr = Create datastore
- ds_pricestr.DataObject = 'ds_pricestr_cmpl'
- ds_pricestr.SetTransObject(sqlca)
- ds_pricestr.Retrieve()
- datastore ds_parm
- ds_parm = Create datastore
- ds_parm.DataObject = 'ds_workprice_parm_def'
- ds_parm.SetTransObject(sqlca)
- ds_parm.Retrieve()
- If Trim(arg_pricestr) = '' Then
- rslt = 2
- Goto ext
- End If
- //替换自定义参数
- For ll_i = 1 To ds_parm.RowCount()
- ls_parmname = ds_parm.Object.parmname[ll_i]
- ld_parmvalue = ds_parm.Object.parmvalue[ll_i]
-
- ls_parmname = '['+ls_parmname+']'
-
- Select Top 1 Replace( :arg_pricestr,:ls_parmname,:ld_parmvalue) Into :arg_pricestr From u_user;
-
- Next
- Select Top 1 Replace( :arg_pricestr,'不包含',' not like ') Into :arg_pricestr From u_user;
- Select Top 1 Replace( :arg_pricestr,'不等于','<>') Into :arg_pricestr From u_user;
- Select Top 1 Replace( :arg_pricestr,'包含',' like ') Into :arg_pricestr From u_user;
- Select Top 1 Replace( :arg_pricestr,'大于等于',' >= ') Into :arg_pricestr From u_user;
- Select Top 1 Replace( :arg_pricestr,'小于等于',' <= ') Into :arg_pricestr From u_user;
- Select Top 1 Replace( :arg_pricestr,'等于',' = ') Into :arg_pricestr From u_user;
- Select Top 1 Replace( :arg_pricestr,'大于',' > ') Into :arg_pricestr From u_user;
- Select Top 1 Replace( :arg_pricestr,'小于',' < ') Into :arg_pricestr From u_user;
- //'配置'需放在最后一行, 因为配置1, 配置2 没替换的话,有可能导致替换剩下个1 或2
- Select Top 1 Replace( :arg_pricestr,'配置1',"'"+:arg_woodcode+"'") Into :arg_pricestr From u_user;
- Select Top 1 Replace( :arg_pricestr,'配置2',"'"+:arg_pcode+"'") Into :arg_pricestr From u_user;
- Select Top 1 Replace( :arg_pricestr,'配置',"'"+:arg_status+"'") Into :arg_pricestr From u_user;
- String ls_mtrlmode
- ls_mtrlmode = '100*200*300'
- Select Top 1 Replace( :arg_pricestr,'物料规格',"'"+:ls_mtrlmode+"'") Into :arg_pricestr From u_user;
- Select Top 1 Replace( :arg_pricestr,'自定义1',"'"+:ls_mtrlmode+"'") Into :arg_pricestr From u_user;
- Select Top 1 Replace( :arg_pricestr,'自定义2',"'"+:ls_mtrlmode+"'") Into :arg_pricestr From u_user;
- //Select Top 1 Replace( :arg_pricestr,'自定义3',"'"+:ls_mtrlmode+"'") Into :arg_pricestr From u_user;
- Select Top 1 Replace( :arg_pricestr,'开料规格',"'"+:ls_mtrlmode+"'") Into :arg_pricestr From u_user;
- Select Top 1 Replace( :arg_pricestr,'工艺说明',"'"+:ls_mtrlmode+"'") Into :arg_pricestr From u_user;
- Dec lde_price = 100
- Select Top 1 Replace( :arg_pricestr,'工价表工价',:lde_price) Into :arg_pricestr From u_user;
- Select Top 1 Replace( :arg_pricestr,'工价',:lde_price) Into :arg_pricestr From u_user;
- Select Top 1 Replace( :arg_pricestr,'参数1',:lde_price) Into :arg_pricestr From u_user;
- Select Top 1 Replace( :arg_pricestr,'参数2',:lde_price) Into :arg_pricestr From u_user;
- Select Top 1 Replace( :arg_pricestr,'参数3',:lde_price) Into :arg_pricestr From u_user;
- Select Top 1 Replace( :arg_pricestr,'参数4',:lde_price) Into :arg_pricestr From u_user;
- Select Top 1 Replace( :arg_pricestr,'参数5',:lde_price) Into :arg_pricestr From u_user;
- Select Top 1 Replace( :arg_pricestr,'参数6',:lde_price) Into :arg_pricestr From u_user;
- Select Top 1 Replace( :arg_pricestr,'参数7',:lde_price) Into :arg_pricestr From u_user;
- Select Top 1 Replace( :arg_pricestr,'参数8',:lde_price) Into :arg_pricestr From u_user;
- Select Top 1 Replace( :arg_pricestr,'参数9',:lde_price) Into :arg_pricestr From u_user;
- Decimal ld_qty = 10,ld_hourwork = 10
- Select Top 1 Replace( :arg_pricestr,'指令单数量',:ld_qty) Into :arg_pricestr From u_user;
- Select Top 1 Replace( :arg_pricestr,'数量',:ld_qty) Into :arg_pricestr From u_user;
- Select Top 1 Replace( :arg_pricestr,'按时薪计算',:ld_hourwork) Into :arg_pricestr From u_user;
- string ld_cuscode,ld_cusname
- SELECT Top 1 Replace( :arg_pricestr,'客户编号',"'"+:ld_cuscode+"'") Into :arg_pricestr From u_user;
- SELECT Top 1 Replace( :arg_pricestr,'客户名称',"'"+:ld_cusname+"'") Into :arg_pricestr From u_user;
- s_rtn = ds_pricestr.Modify('cmpl.expression= "'+arg_pricestr+'"')
- If s_rtn <> '' Then
- MessageBox('', '公式不通过')
- Goto ext
- End If
- s_rtn = String(ds_pricestr.Object.cmpl[1])
- If s_rtn = 'false' Or s_rtn = '' Then
- rslt = 0
- // arg_price = 0
- MessageBox('', '公式不通过')
- Else
- // arg_price = Round(Dec(s_rtn),5)
- MessageBox('', '公式通过')
- End If
- ext:
- Destroy ds_pricestr
- destroy ds_parm
- Return rslt
- end function
- on w_mtrl_workpricestr_compute_edit.create
- int iCurrent
- call super::create
- this.mle_rule_if=create mle_rule_if
- this.st_1=create st_1
- this.ddlb_op=create ddlb_op
- this.st_2=create st_2
- this.ddlb_1=create ddlb_1
- this.st_3=create st_3
- this.st_4=create st_4
- this.cb_ok=create cb_ok
- this.cb_check=create cb_check
- this.st_5=create st_5
- this.st_status=create st_status
- this.st_woodcode=create st_woodcode
- this.st_pcode=create st_pcode
- this.cb_10=create cb_10
- this.st_8=create st_8
- this.st_9=create st_9
- this.st_11=create st_11
- this.st_12=create st_12
- this.cb_17=create cb_17
- this.cb_18=create cb_18
- this.st_6=create st_6
- this.st_7=create st_7
- this.st_10=create st_10
- this.st_13=create st_13
- this.st_14=create st_14
- this.cb_4=create cb_4
- this.dw_1=create dw_1
- this.st_usermtrlmode=create st_usermtrlmode
- this.st_mtrlsectype=create st_mtrlsectype
- this.st_zxmtrlmode=create st_zxmtrlmode
- this.cb_1=create cb_1
- this.st_15=create st_15
- this.cb_2=create cb_2
- this.st_16=create st_16
- this.cb_3=create cb_3
- this.rb_1=create rb_1
- this.rb_2=create rb_2
- this.dw_2=create dw_2
- this.gb_1=create gb_1
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.mle_rule_if
- this.Control[iCurrent+2]=this.st_1
- this.Control[iCurrent+3]=this.ddlb_op
- this.Control[iCurrent+4]=this.st_2
- this.Control[iCurrent+5]=this.ddlb_1
- this.Control[iCurrent+6]=this.st_3
- this.Control[iCurrent+7]=this.st_4
- this.Control[iCurrent+8]=this.cb_ok
- this.Control[iCurrent+9]=this.cb_check
- this.Control[iCurrent+10]=this.st_5
- this.Control[iCurrent+11]=this.st_status
- this.Control[iCurrent+12]=this.st_woodcode
- this.Control[iCurrent+13]=this.st_pcode
- this.Control[iCurrent+14]=this.cb_10
- this.Control[iCurrent+15]=this.st_8
- this.Control[iCurrent+16]=this.st_9
- this.Control[iCurrent+17]=this.st_11
- this.Control[iCurrent+18]=this.st_12
- this.Control[iCurrent+19]=this.cb_17
- this.Control[iCurrent+20]=this.cb_18
- this.Control[iCurrent+21]=this.st_6
- this.Control[iCurrent+22]=this.st_7
- this.Control[iCurrent+23]=this.st_10
- this.Control[iCurrent+24]=this.st_13
- this.Control[iCurrent+25]=this.st_14
- this.Control[iCurrent+26]=this.cb_4
- this.Control[iCurrent+27]=this.dw_1
- this.Control[iCurrent+28]=this.st_usermtrlmode
- this.Control[iCurrent+29]=this.st_mtrlsectype
- this.Control[iCurrent+30]=this.st_zxmtrlmode
- this.Control[iCurrent+31]=this.cb_1
- this.Control[iCurrent+32]=this.st_15
- this.Control[iCurrent+33]=this.cb_2
- this.Control[iCurrent+34]=this.st_16
- this.Control[iCurrent+35]=this.cb_3
- this.Control[iCurrent+36]=this.rb_1
- this.Control[iCurrent+37]=this.rb_2
- this.Control[iCurrent+38]=this.dw_2
- this.Control[iCurrent+39]=this.gb_1
- end on
- on w_mtrl_workpricestr_compute_edit.destroy
- call super::destroy
- destroy(this.mle_rule_if)
- destroy(this.st_1)
- destroy(this.ddlb_op)
- destroy(this.st_2)
- destroy(this.ddlb_1)
- destroy(this.st_3)
- destroy(this.st_4)
- destroy(this.cb_ok)
- destroy(this.cb_check)
- destroy(this.st_5)
- destroy(this.st_status)
- destroy(this.st_woodcode)
- destroy(this.st_pcode)
- destroy(this.cb_10)
- destroy(this.st_8)
- destroy(this.st_9)
- destroy(this.st_11)
- destroy(this.st_12)
- destroy(this.cb_17)
- destroy(this.cb_18)
- destroy(this.st_6)
- destroy(this.st_7)
- destroy(this.st_10)
- destroy(this.st_13)
- destroy(this.st_14)
- destroy(this.cb_4)
- destroy(this.dw_1)
- destroy(this.st_usermtrlmode)
- destroy(this.st_mtrlsectype)
- destroy(this.st_zxmtrlmode)
- destroy(this.cb_1)
- destroy(this.st_15)
- destroy(this.cb_2)
- destroy(this.st_16)
- destroy(this.cb_3)
- destroy(this.rb_1)
- destroy(this.rb_2)
- destroy(this.dw_2)
- destroy(this.gb_1)
- end on
- event open;call super::open;s_edit_index_tran s_tran_str
- s_tran_str = message.powerobjectparm
- ins_rulestr = s_tran_str.b_string
- ins_type = s_tran_str.b_long
- dw_2.settransobject(sqlca)
- dw_2.retrieve()
- mle_rule_if.text = ins_rulestr
- long ll_row
- if ins_type = 1 then
- this.title = '工价表数量公式编辑'
-
- ll_row = dw_1.find('rulename = "数量"',1,dw_1.rowcount())
-
- dw_1.DeleteRow(ll_row)
- else
- this.title = '工价公式编辑'
- end if
- end event
- event close;call super::close;closewithreturn(this,ins_rulestr)
- end event
- type cb_func from w_publ_base`cb_func within w_mtrl_workpricestr_compute_edit
- boolean visible = false
- end type
- type cb_exit from w_publ_base`cb_exit within w_mtrl_workpricestr_compute_edit
- integer x = 1893
- integer y = 2124
- integer picsize = 16
- end type
- type mle_rule_if from multilineedit within w_mtrl_workpricestr_compute_edit
- integer x = 64
- integer y = 1112
- integer width = 2674
- integer height = 928
- integer taborder = 30
- 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
- borderstyle borderstyle = stylelowered!
- end type
- type st_1 from statictext within w_mtrl_workpricestr_compute_edit
- integer x = 69
- integer y = 908
- integer width = 151
- 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 ddlb_op from dropdownlistbox within w_mtrl_workpricestr_compute_edit
- integer x = 238
- integer y = 896
- integer width = 311
- integer height = 496
- integer taborder = 40
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean sorted = false
- string item[] = {"包含","等于","不包含","不等于","大于","小于","大于等于","小于等于"}
- borderstyle borderstyle = stylelowered!
- end type
- event selectionchanged;string ls_selected
- int li_Position,li_selectpos
- li_Position = mle_rule_if.Position()
- ls_selected=' ' + this.text + ' '
- //mle_rule_if.text=mle_rule_if.text+ls_selected
- li_selectpos = len(mid(mle_rule_if.text,1,li_Position - 1) + ls_selected)
- mle_rule_if.text = mid(mle_rule_if.text,1,li_Position - 1) + ls_selected + mid(mle_rule_if.text,li_Position)
- mle_rule_if.SelectText(li_selectpos + 1, 0)
- mle_rule_if.setfocus()
- end event
- type st_2 from statictext within w_mtrl_workpricestr_compute_edit
- integer x = 576
- integer y = 908
- integer width = 142
- 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 ddlb_1 from dropdownlistbox within w_mtrl_workpricestr_compute_edit
- integer x = 731
- integer y = 896
- integer width = 270
- integer height = 300
- integer taborder = 50
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "包含"
- boolean sorted = false
- string item[] = {"并且","或者"}
- borderstyle borderstyle = stylelowered!
- end type
- event selectionchanged;string ls_selected
- int li_Position,li_selectpos
- li_Position = mle_rule_if.Position()
- IF THIS.Text = '并且' THEN
- ls_selected = ' and '
- ELSE
- ls_selected = ' or '
- END IF
- //mle_rule_if.text=mle_rule_if.text+ls_selected
- li_selectpos = len(mid(mle_rule_if.text,1,li_Position - 1) + ls_selected)
- mle_rule_if.text = mid(mle_rule_if.text,1,li_Position - 1) + ls_selected + mid(mle_rule_if.text,li_Position)
- mle_rule_if.SelectText(li_selectpos + 1, 0)
- mle_rule_if.setfocus()
- end event
- type st_3 from statictext within w_mtrl_workpricestr_compute_edit
- integer x = 1175
- integer y = 16
- integer width = 1138
- integer height = 48
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 255
- long backcolor = 134217739
- string text = "注意:1.输入文本内容时,前后需要增加引号."
- boolean focusrectangle = false
- end type
- type st_4 from statictext within w_mtrl_workpricestr_compute_edit
- integer x = 1362
- integer y = 72
- integer width = 782
- integer height = 48
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 255
- long backcolor = 134217739
- string text = "如:{配置1} 等于 ~'头层皮~'"
- boolean focusrectangle = false
- end type
- type cb_ok from uo_imflatbutton within w_mtrl_workpricestr_compute_edit
- integer x = 1554
- integer y = 2124
- integer width = 311
- integer height = 96
- integer taborder = 20
- boolean bringtotop = true
- string normalpicname = "save.bmp"
- integer picsize = 16
- end type
- event clicked;call super::clicked;ins_rulestr = Trim(mle_rule_if.Text)
- Close(PARENT)
- end event
- type cb_check from commandbutton within w_mtrl_workpricestr_compute_edit
- boolean visible = false
- integer x = 1134
- integer y = 604
- integer width = 343
- integer height = 84
- integer taborder = 60
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "检查语法"
- end type
- event clicked;String ls_express,ls_temp
- String ls_rtn
- long ll_rt
- IF Trim(mle_rule_if.Text) = '' THEN
- messagebox('系统提示','请先输入规则表达式')
- return
- END IF
- ls_express = Trim(mle_rule_if.Text)
- SELECT Top 1 Replace( :ls_express,'{原编码}','mtrlcode') INTO :ls_temp FROM u_user;
- SELECT Top 1 Replace( :ls_temp,'{原名称}','mtrlname') INTO :ls_temp FROM u_user;
- SELECT Top 1 Replace( :ls_temp,'{原规格}','mtrlmode') INTO :ls_temp FROM u_user;
- SELECT Top 1 Replace( :ls_temp,'{自定义1}','mtrlsectype') INTO :ls_temp FROM u_user;
- SELECT Top 1 Replace( :ls_temp,'{自定义2}','zxmtrlmode') INTO :ls_temp FROM u_user;
- SELECT Top 1 Replace( :ls_temp,'{自定义3}','usermtrlmode') INTO :ls_temp FROM u_user;
- SELECT Top 1 Replace( :ls_temp,'{配置}','status') INTO :ls_temp FROM u_user;
- SELECT Top 1 Replace( :ls_temp,'{配置1}','woodcode') INTO :ls_temp FROM u_user;
- SELECT Top 1 Replace( :ls_temp,'{配置2}','pcode') INTO :ls_temp FROM u_user;
- SELECT Top 1 Replace( :ls_temp,'包含','like') INTO :ls_temp FROM u_user;
- SELECT Top 1 Replace( :ls_temp,'等于','=') INTO :ls_temp FROM u_user;
- ls_temp='if('+ls_temp+',1,0)'
- messagebox('',ls_temp)
- datastore dw_check
- dw_check = CREATE datastore
- dw_check.DataObject = 'dw_mtrl_change_rule_check'
- dw_check.InsertRow(0)
- //ll_rt =
- dw_check.Modify("compute.expression='"+ls_temp+"'")
- //ll_rt = dw_check.object.compute[1]
- messagebox('',string(dw_check.object.compute[1]))
- IF ls_rtn <> '' THEN
- messagebox('系统提示','原物料替换条件语法检查不通过,请检查')
- return
- END IF
- end event
- type st_5 from statictext within w_mtrl_workpricestr_compute_edit
- integer x = 1307
- integer y = 128
- integer width = 1522
- integer height = 48
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 255
- long backcolor = 134217739
- string text = "2.~'并且~'的优先级大于~'或者~',必要时可用小括号进行组合"
- boolean focusrectangle = false
- end type
- type st_status from statictext within w_mtrl_workpricestr_compute_edit
- integer x = 50
- integer y = 256
- integer width = 1102
- 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 = "none"
- boolean focusrectangle = false
- end type
- event constructor;this.text = '配置 = '+sys_option_change_status
- end event
- type st_woodcode from statictext within w_mtrl_workpricestr_compute_edit
- integer x = 50
- integer y = 320
- integer width = 1102
- 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 = "none"
- boolean focusrectangle = false
- end type
- event constructor;this.text = '配置1 = '+sys_option_change_woodcode
- end event
- type st_pcode from statictext within w_mtrl_workpricestr_compute_edit
- integer x = 50
- integer y = 384
- integer width = 1102
- 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 = "none"
- boolean focusrectangle = false
- end type
- event constructor;this.text = '配置2 = '+sys_option_change_pcode
- end event
- type cb_10 from commandbutton within w_mtrl_workpricestr_compute_edit
- boolean visible = false
- integer x = 1134
- integer y = 1292
- integer width = 343
- integer height = 84
- integer taborder = 60
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "检查语法"
- end type
- event clicked;//String ls_express,ls_temp
- //String ls_rtn
- //
- //IF Trim(mle_rule_then.Text) = '' THEN
- // messagebox('系统提示','请先输入规则表达式')
- // return
- //END IF
- //
- //ls_express = Trim(mle_rule_then.Text)
- //
- //SELECT Top 1 Replace( :ls_express,'{新编码}','mtrlcode') INTO :ls_temp FROM u_user;
- //SELECT Top 1 Replace( :ls_temp,'{新名称}','mtrlname') INTO :ls_temp FROM u_user;
- //SELECT Top 1 Replace( :ls_temp,'{新规格}','mtrlmode') INTO :ls_temp FROM u_user;
- //SELECT Top 1 Replace( :ls_temp,'{自定义1}','mtrlsectype') INTO :ls_temp FROM u_user;
- //SELECT Top 1 Replace( :ls_temp,'{自定义2}','zxmtrlmode') INTO :ls_temp FROM u_user;
- //SELECT Top 1 Replace( :ls_temp,'{自定义3}','usermtrlmode') INTO :ls_temp FROM u_user;
- //
- //SELECT Top 1 Replace( :ls_temp,'{配置}','status') INTO :ls_temp FROM u_user;
- //SELECT Top 1 Replace( :ls_temp,'{配置1}','woodcode') INTO :ls_temp FROM u_user;
- //SELECT Top 1 Replace( :ls_temp,'{配置2}','pcode') INTO :ls_temp FROM u_user;
- //
- //
- //SELECT Top 1 Replace( :ls_temp,'包含','like') INTO :ls_temp FROM u_user;
- //SELECT Top 1 Replace( :ls_temp,'等于','=') INTO :ls_temp FROM u_user;
- //
- //datastore dw_check
- //dw_check = CREATE datastore
- //dw_check.DataObject = 'dw_mtrl_change_rule_check'
- //dw_check.InsertRow(0)
- //ls_rtn = dw_check.Modify("compute.expression='"+ls_temp+"'")
- //IF ls_rtn <> '' THEN
- // messagebox('系统提示','新物料查找条件语法检查不通过,请检查')
- // return
- //END IF
- end event
- type st_8 from statictext within w_mtrl_workpricestr_compute_edit
- integer x = 1307
- integer y = 196
- integer width = 974
- integer height = 48
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 255
- long backcolor = 134217739
- string text = "3.~'包含~'的内容前后通常要有通配符~'%~'"
- boolean focusrectangle = false
- end type
- type st_9 from statictext within w_mtrl_workpricestr_compute_edit
- integer x = 1207
- integer y = 260
- integer width = 1632
- integer height = 48
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 255
- long backcolor = 134217739
- string text = "如: {配置1} 包含 ~'头层%~',可查找到名称以~"头层~"开头的物料"
- boolean focusrectangle = false
- end type
- type st_11 from statictext within w_mtrl_workpricestr_compute_edit
- integer x = 1207
- integer y = 320
- integer width = 1632
- integer height = 48
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 255
- long backcolor = 134217739
- string text = "如: {配置1} 包含 ~'%头层~',可查找到名称以~"头层~"结尾的物料"
- boolean focusrectangle = false
- end type
- type st_12 from statictext within w_mtrl_workpricestr_compute_edit
- integer x = 1207
- integer y = 376
- integer width = 1659
- integer height = 48
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 255
- long backcolor = 134217739
- string text = "如: {配置1} 包含 ~'%头层%~',可查找到名称中包含~"头层~"的物料"
- boolean focusrectangle = false
- end type
- type cb_17 from commandbutton within w_mtrl_workpricestr_compute_edit
- integer x = 1019
- integer y = 892
- integer width = 96
- integer height = 84
- integer taborder = 80
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "~'"
- end type
- event clicked;string ls_selected
- int li_Position,li_selectpos
- li_Position = mle_rule_if.Position()
- ls_selected=this.text
- //mle_rule_if.text=mle_rule_if.text+ls_selected
- li_selectpos = len(mid(mle_rule_if.text,1,li_Position - 1) + ls_selected)
- mle_rule_if.text = mid(mle_rule_if.text,1,li_Position - 1) + ls_selected + mid(mle_rule_if.text,li_Position)
- mle_rule_if.SelectText(li_selectpos + 1, 0)
- mle_rule_if.setfocus()
- end event
- type cb_18 from commandbutton within w_mtrl_workpricestr_compute_edit
- integer x = 1134
- integer y = 892
- integer width = 96
- integer height = 84
- integer taborder = 90
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "%"
- end type
- event clicked;string ls_selected
- int li_Position,li_selectpos
- li_Position = mle_rule_if.Position()
- ls_selected=this.text
- //mle_rule_if.text=mle_rule_if.text+ls_selected
- li_selectpos = len(mid(mle_rule_if.text,1,li_Position - 1) + ls_selected)
- mle_rule_if.text = mid(mle_rule_if.text,1,li_Position - 1) + ls_selected + mid(mle_rule_if.text,li_Position)
- mle_rule_if.SelectText(li_selectpos + 1, 0)
- mle_rule_if.setfocus()
- end event
- type st_6 from statictext within w_mtrl_workpricestr_compute_edit
- integer x = 82
- integer y = 684
- integer width = 2702
- integer height = 48
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long backcolor = 134217739
- string text = "(2)配置1 等于 牛皮 的产品,价格为100,配置1 等于 仿皮 的产品,价格为80,其余价格为50,公式写法如下:"
- boolean focusrectangle = false
- end type
- type st_7 from statictext within w_mtrl_workpricestr_compute_edit
- integer x = 87
- integer y = 752
- integer width = 1897
- 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 = "if(配置1 等于 ~'牛皮~',100, if(配置1 等于 ~'仿皮~',80,50) )"
- boolean focusrectangle = false
- end type
- type st_10 from statictext within w_mtrl_workpricestr_compute_edit
- integer x = 37
- integer y = 460
- integer width = 402
- integer height = 48
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long backcolor = 134217739
- string text = "语法举例:"
- boolean focusrectangle = false
- end type
- type st_13 from statictext within w_mtrl_workpricestr_compute_edit
- integer x = 82
- integer y = 528
- integer width = 1769
- integer height = 52
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long backcolor = 134217739
- string text = "(1)配置1 等于 牛皮 的产品,价格为100,其余价格为50,公式写法如下:"
- boolean focusrectangle = false
- end type
- type st_14 from statictext within w_mtrl_workpricestr_compute_edit
- integer x = 87
- integer y = 592
- integer width = 960
- 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 = "if(配置1 等于 ~'牛皮~',100,50) "
- boolean focusrectangle = false
- end type
- type cb_4 from commandbutton within w_mtrl_workpricestr_compute_edit
- integer x = 1248
- integer y = 892
- integer width = 183
- integer height = 84
- integer taborder = 70
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "if( )"
- end type
- event clicked;
- string ls_selected
- int li_Position,li_selectpos
- li_Position = mle_rule_if.Position()
- ls_selected= 'if()'
- //mle_rule_if.text=mle_rule_if.text+ls_selected
- li_selectpos = len(mid(mle_rule_if.text,1,li_Position - 1) + ls_selected)
- mle_rule_if.text = mid(mle_rule_if.text,1,li_Position - 1) + ls_selected + mid(mle_rule_if.text,li_Position)
- mle_rule_if.SelectText(li_selectpos, 0)
- mle_rule_if.setfocus()
- end event
- type dw_1 from datawindow within w_mtrl_workpricestr_compute_edit
- integer x = 2752
- integer y = 964
- integer width = 814
- integer height = 1076
- integer taborder = 40
- boolean bringtotop = true
- string title = "none"
- string dataobject = "ddd_mtrl_workpricestr_parm"
- boolean vscrollbar = true
- borderstyle borderstyle = stylelowered!
- end type
- event doubleclicked;IF row > 0 THEN
-
-
- String ls_selected
-
- ls_selected = This.Object.rulename[row]
-
- mle_rule_if.Text = mle_rule_if.Text+ls_selected
-
- mle_rule_if.SelectText(Len(mle_rule_if.Text) + 1, 0)
- mle_rule_if.SetFocus()
-
-
- END IF
- end event
- event rowfocuschanged;IF currentrow <= 0 THEN RETURN
- This.SelectRow(0,False)
- This.SelectRow(currentrow,True)
- end event
- type st_usermtrlmode from statictext within w_mtrl_workpricestr_compute_edit
- integer x = 50
- integer y = 148
- integer width = 1102
- 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 = "none"
- boolean focusrectangle = false
- end type
- event constructor;//this.text = '自定义3 = '+sys_option_change_usermtrlmode
- end event
- type st_mtrlsectype from statictext within w_mtrl_workpricestr_compute_edit
- integer x = 50
- integer y = 24
- integer width = 1102
- 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 = "none"
- boolean focusrectangle = false
- end type
- event constructor;this.text = '自定义1 = '+sys_option_change_mtrlsectype
- end event
- type st_zxmtrlmode from statictext within w_mtrl_workpricestr_compute_edit
- integer x = 50
- integer y = 88
- integer width = 1102
- 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 = "none"
- boolean focusrectangle = false
- end type
- event constructor;this.text = '自定义2 = '+sys_option_change_zxmtrlmode
- end event
- type cb_1 from commandbutton within w_mtrl_workpricestr_compute_edit
- integer x = 1440
- integer y = 892
- integer width = 507
- integer height = 84
- integer taborder = 80
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "获取字符串中数字"
- end type
- event clicked;
- string ls_selected
- ls_selected='f_char_to_dec_workprice()'
- mle_rule_if.text=mle_rule_if.text+ls_selected
- mle_rule_if.SelectText(Len(mle_rule_if.Text) + 1, 0)
- mle_rule_if.setfocus()
- end event
- type st_15 from statictext within w_mtrl_workpricestr_compute_edit
- integer x = 82
- integer y = 992
- integer width = 2592
- 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 = "获取字符串中数字函数参数说明:f_char_to_dec_workprice(参数1:字符串,参数2:第几个数字,例如:2)"
- boolean focusrectangle = false
- end type
- type cb_2 from commandbutton within w_mtrl_workpricestr_compute_edit
- integer x = 1966
- integer y = 892
- integer width = 713
- integer height = 84
- integer taborder = 80
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "获取字符串指定符号后数字"
- end type
- event clicked;
- string ls_selected
- ls_selected='f_char_find_dec_workprice()'
- mle_rule_if.text=mle_rule_if.text+ls_selected
- mle_rule_if.SelectText(Len(mle_rule_if.Text) + 1, 0)
- mle_rule_if.setfocus()
- end event
- type st_16 from statictext within w_mtrl_workpricestr_compute_edit
- integer x = 82
- integer y = 1052
- integer width = 2587
- 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 = "获取字符串指定符号后数字函数参数说明:f_char_find_dec_workprice(参数1:字符串,参数2:指定符号)"
- boolean focusrectangle = false
- end type
- type cb_3 from uo_imflatbutton within w_mtrl_workpricestr_compute_edit
- integer x = 1202
- integer y = 2124
- integer width = 329
- integer height = 96
- integer taborder = 20
- boolean bringtotop = true
- string text = "检查公式"
- string normalpicname = "p2.bmp"
- integer picsize = 16
- end type
- event clicked;call super::clicked;uof_pricestr_cmp(mle_rule_if.text, '', '','')
- end event
- type rb_1 from radiobutton within w_mtrl_workpricestr_compute_edit
- integer x = 2757
- integer y = 896
- integer width = 315
- 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;dw_1.visible = true
- dw_2.visible = false
- end event
- type rb_2 from radiobutton within w_mtrl_workpricestr_compute_edit
- integer x = 3131
- integer y = 896
- 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 = "自定义参数"
- end type
- event clicked;dw_1.visible = false
- dw_2.visible = true
- end event
- type dw_2 from datawindow within w_mtrl_workpricestr_compute_edit
- boolean visible = false
- integer x = 2752
- integer y = 964
- integer width = 814
- integer height = 1076
- integer taborder = 40
- boolean bringtotop = true
- string title = "none"
- string dataobject = "ddd_workprice_parm_def"
- boolean vscrollbar = true
- borderstyle borderstyle = stylelowered!
- end type
- event doubleclicked;IF row > 0 THEN
-
-
- String ls_selected
-
- ls_selected = '['+This.Object.parmname[row]+']'
-
- mle_rule_if.Text = mle_rule_if.Text+ls_selected
-
- mle_rule_if.SelectText(Len(mle_rule_if.Text) + 1, 0)
- mle_rule_if.SetFocus()
-
-
- END IF
- end event
- event rowfocuschanged;IF currentrow <= 0 THEN RETURN
- This.SelectRow(0,False)
- This.SelectRow(currentrow,True)
- end event
- type gb_1 from groupbox within w_mtrl_workpricestr_compute_edit
- integer x = 37
- integer y = 832
- integer width = 3557
- integer height = 1248
- integer taborder = 30
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- string text = "工价公式条件"
- end type
|