w_mtrl_workpricestr_compute_edit.srw 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330
  1. $PBExportHeader$w_mtrl_workpricestr_compute_edit.srw
  2. forward
  3. global type w_mtrl_workpricestr_compute_edit from w_publ_base
  4. end type
  5. type mle_rule_if from multilineedit within w_mtrl_workpricestr_compute_edit
  6. end type
  7. type st_1 from statictext within w_mtrl_workpricestr_compute_edit
  8. end type
  9. type ddlb_op from dropdownlistbox within w_mtrl_workpricestr_compute_edit
  10. end type
  11. type st_2 from statictext within w_mtrl_workpricestr_compute_edit
  12. end type
  13. type ddlb_1 from dropdownlistbox within w_mtrl_workpricestr_compute_edit
  14. end type
  15. type st_3 from statictext within w_mtrl_workpricestr_compute_edit
  16. end type
  17. type st_4 from statictext within w_mtrl_workpricestr_compute_edit
  18. end type
  19. type cb_ok from uo_imflatbutton within w_mtrl_workpricestr_compute_edit
  20. end type
  21. type cb_check from commandbutton within w_mtrl_workpricestr_compute_edit
  22. end type
  23. type st_5 from statictext within w_mtrl_workpricestr_compute_edit
  24. end type
  25. type st_status from statictext within w_mtrl_workpricestr_compute_edit
  26. end type
  27. type st_woodcode from statictext within w_mtrl_workpricestr_compute_edit
  28. end type
  29. type st_pcode from statictext within w_mtrl_workpricestr_compute_edit
  30. end type
  31. type cb_10 from commandbutton within w_mtrl_workpricestr_compute_edit
  32. end type
  33. type st_8 from statictext within w_mtrl_workpricestr_compute_edit
  34. end type
  35. type st_9 from statictext within w_mtrl_workpricestr_compute_edit
  36. end type
  37. type st_11 from statictext within w_mtrl_workpricestr_compute_edit
  38. end type
  39. type st_12 from statictext within w_mtrl_workpricestr_compute_edit
  40. end type
  41. type cb_17 from commandbutton within w_mtrl_workpricestr_compute_edit
  42. end type
  43. type cb_18 from commandbutton within w_mtrl_workpricestr_compute_edit
  44. end type
  45. type st_6 from statictext within w_mtrl_workpricestr_compute_edit
  46. end type
  47. type st_7 from statictext within w_mtrl_workpricestr_compute_edit
  48. end type
  49. type st_10 from statictext within w_mtrl_workpricestr_compute_edit
  50. end type
  51. type st_13 from statictext within w_mtrl_workpricestr_compute_edit
  52. end type
  53. type st_14 from statictext within w_mtrl_workpricestr_compute_edit
  54. end type
  55. type cb_4 from commandbutton within w_mtrl_workpricestr_compute_edit
  56. end type
  57. type dw_1 from datawindow within w_mtrl_workpricestr_compute_edit
  58. end type
  59. type st_usermtrlmode from statictext within w_mtrl_workpricestr_compute_edit
  60. end type
  61. type st_mtrlsectype from statictext within w_mtrl_workpricestr_compute_edit
  62. end type
  63. type st_zxmtrlmode from statictext within w_mtrl_workpricestr_compute_edit
  64. end type
  65. type cb_1 from commandbutton within w_mtrl_workpricestr_compute_edit
  66. end type
  67. type st_15 from statictext within w_mtrl_workpricestr_compute_edit
  68. end type
  69. type cb_2 from commandbutton within w_mtrl_workpricestr_compute_edit
  70. end type
  71. type st_16 from statictext within w_mtrl_workpricestr_compute_edit
  72. end type
  73. type cb_3 from uo_imflatbutton within w_mtrl_workpricestr_compute_edit
  74. end type
  75. type rb_1 from radiobutton within w_mtrl_workpricestr_compute_edit
  76. end type
  77. type rb_2 from radiobutton within w_mtrl_workpricestr_compute_edit
  78. end type
  79. type dw_2 from datawindow within w_mtrl_workpricestr_compute_edit
  80. end type
  81. type gb_1 from groupbox within w_mtrl_workpricestr_compute_edit
  82. end type
  83. end forward
  84. global type w_mtrl_workpricestr_compute_edit from w_publ_base
  85. integer width = 3611
  86. integer height = 2380
  87. string title = "工价公式编辑"
  88. boolean minbox = false
  89. windowtype windowtype = response!
  90. mle_rule_if mle_rule_if
  91. st_1 st_1
  92. ddlb_op ddlb_op
  93. st_2 st_2
  94. ddlb_1 ddlb_1
  95. st_3 st_3
  96. st_4 st_4
  97. cb_ok cb_ok
  98. cb_check cb_check
  99. st_5 st_5
  100. st_status st_status
  101. st_woodcode st_woodcode
  102. st_pcode st_pcode
  103. cb_10 cb_10
  104. st_8 st_8
  105. st_9 st_9
  106. st_11 st_11
  107. st_12 st_12
  108. cb_17 cb_17
  109. cb_18 cb_18
  110. st_6 st_6
  111. st_7 st_7
  112. st_10 st_10
  113. st_13 st_13
  114. st_14 st_14
  115. cb_4 cb_4
  116. dw_1 dw_1
  117. st_usermtrlmode st_usermtrlmode
  118. st_mtrlsectype st_mtrlsectype
  119. st_zxmtrlmode st_zxmtrlmode
  120. cb_1 cb_1
  121. st_15 st_15
  122. cb_2 cb_2
  123. st_16 st_16
  124. cb_3 cb_3
  125. rb_1 rb_1
  126. rb_2 rb_2
  127. dw_2 dw_2
  128. gb_1 gb_1
  129. end type
  130. global w_mtrl_workpricestr_compute_edit w_mtrl_workpricestr_compute_edit
  131. type variables
  132. string ins_rulestr
  133. int ins_type
  134. end variables
  135. forward prototypes
  136. public function integer uof_pricestr_cmp (string arg_pricestr, string arg_status, string arg_woodcode, string arg_pcode)
  137. end prototypes
  138. public function integer uof_pricestr_cmp (string arg_pricestr, string arg_status, string arg_woodcode, string arg_pcode);
  139. Int rslt = 1
  140. String s_rtn
  141. Long ll_i
  142. String ls_parmname
  143. Decimal ld_parmvalue
  144. datastore ds_pricestr
  145. ds_pricestr = Create datastore
  146. ds_pricestr.DataObject = 'ds_pricestr_cmpl'
  147. ds_pricestr.SetTransObject(sqlca)
  148. ds_pricestr.Retrieve()
  149. datastore ds_parm
  150. ds_parm = Create datastore
  151. ds_parm.DataObject = 'ds_workprice_parm_def'
  152. ds_parm.SetTransObject(sqlca)
  153. ds_parm.Retrieve()
  154. If Trim(arg_pricestr) = '' Then
  155. rslt = 2
  156. Goto ext
  157. End If
  158. //替换自定义参数
  159. For ll_i = 1 To ds_parm.RowCount()
  160. ls_parmname = ds_parm.Object.parmname[ll_i]
  161. ld_parmvalue = ds_parm.Object.parmvalue[ll_i]
  162. ls_parmname = '['+ls_parmname+']'
  163. Select Top 1 Replace( :arg_pricestr,:ls_parmname,:ld_parmvalue) Into :arg_pricestr From u_user;
  164. Next
  165. Select Top 1 Replace( :arg_pricestr,'不包含',' not like ') Into :arg_pricestr From u_user;
  166. Select Top 1 Replace( :arg_pricestr,'不等于','<>') Into :arg_pricestr From u_user;
  167. Select Top 1 Replace( :arg_pricestr,'包含',' like ') Into :arg_pricestr From u_user;
  168. Select Top 1 Replace( :arg_pricestr,'大于等于',' >= ') Into :arg_pricestr From u_user;
  169. Select Top 1 Replace( :arg_pricestr,'小于等于',' <= ') Into :arg_pricestr From u_user;
  170. Select Top 1 Replace( :arg_pricestr,'等于',' = ') Into :arg_pricestr From u_user;
  171. Select Top 1 Replace( :arg_pricestr,'大于',' > ') Into :arg_pricestr From u_user;
  172. Select Top 1 Replace( :arg_pricestr,'小于',' < ') Into :arg_pricestr From u_user;
  173. //'配置'需放在最后一行, 因为配置1, 配置2 没替换的话,有可能导致替换剩下个1 或2
  174. Select Top 1 Replace( :arg_pricestr,'配置1',"'"+:arg_woodcode+"'") Into :arg_pricestr From u_user;
  175. Select Top 1 Replace( :arg_pricestr,'配置2',"'"+:arg_pcode+"'") Into :arg_pricestr From u_user;
  176. Select Top 1 Replace( :arg_pricestr,'配置',"'"+:arg_status+"'") Into :arg_pricestr From u_user;
  177. String ls_mtrlmode
  178. ls_mtrlmode = '100*200*300'
  179. Select Top 1 Replace( :arg_pricestr,'物料规格',"'"+:ls_mtrlmode+"'") Into :arg_pricestr From u_user;
  180. Select Top 1 Replace( :arg_pricestr,'自定义1',"'"+:ls_mtrlmode+"'") Into :arg_pricestr From u_user;
  181. Select Top 1 Replace( :arg_pricestr,'自定义2',"'"+:ls_mtrlmode+"'") Into :arg_pricestr From u_user;
  182. //Select Top 1 Replace( :arg_pricestr,'自定义3',"'"+:ls_mtrlmode+"'") Into :arg_pricestr From u_user;
  183. Select Top 1 Replace( :arg_pricestr,'开料规格',"'"+:ls_mtrlmode+"'") Into :arg_pricestr From u_user;
  184. Select Top 1 Replace( :arg_pricestr,'工艺说明',"'"+:ls_mtrlmode+"'") Into :arg_pricestr From u_user;
  185. Dec lde_price = 100
  186. Select Top 1 Replace( :arg_pricestr,'工价表工价',:lde_price) Into :arg_pricestr From u_user;
  187. Select Top 1 Replace( :arg_pricestr,'工价',:lde_price) Into :arg_pricestr From u_user;
  188. Select Top 1 Replace( :arg_pricestr,'参数1',:lde_price) Into :arg_pricestr From u_user;
  189. Select Top 1 Replace( :arg_pricestr,'参数2',:lde_price) Into :arg_pricestr From u_user;
  190. Select Top 1 Replace( :arg_pricestr,'参数3',:lde_price) Into :arg_pricestr From u_user;
  191. Select Top 1 Replace( :arg_pricestr,'参数4',:lde_price) Into :arg_pricestr From u_user;
  192. Select Top 1 Replace( :arg_pricestr,'参数5',:lde_price) Into :arg_pricestr From u_user;
  193. Select Top 1 Replace( :arg_pricestr,'参数6',:lde_price) Into :arg_pricestr From u_user;
  194. Select Top 1 Replace( :arg_pricestr,'参数7',:lde_price) Into :arg_pricestr From u_user;
  195. Select Top 1 Replace( :arg_pricestr,'参数8',:lde_price) Into :arg_pricestr From u_user;
  196. Select Top 1 Replace( :arg_pricestr,'参数9',:lde_price) Into :arg_pricestr From u_user;
  197. Decimal ld_qty = 10,ld_hourwork = 10
  198. Select Top 1 Replace( :arg_pricestr,'指令单数量',:ld_qty) Into :arg_pricestr From u_user;
  199. Select Top 1 Replace( :arg_pricestr,'数量',:ld_qty) Into :arg_pricestr From u_user;
  200. Select Top 1 Replace( :arg_pricestr,'按时薪计算',:ld_hourwork) Into :arg_pricestr From u_user;
  201. string ld_cuscode,ld_cusname
  202. SELECT Top 1 Replace( :arg_pricestr,'客户编号',"'"+:ld_cuscode+"'") Into :arg_pricestr From u_user;
  203. SELECT Top 1 Replace( :arg_pricestr,'客户名称',"'"+:ld_cusname+"'") Into :arg_pricestr From u_user;
  204. s_rtn = ds_pricestr.Modify('cmpl.expression= "'+arg_pricestr+'"')
  205. If s_rtn <> '' Then
  206. MessageBox('', '公式不通过')
  207. Goto ext
  208. End If
  209. s_rtn = String(ds_pricestr.Object.cmpl[1])
  210. If s_rtn = 'false' Or s_rtn = '' Then
  211. rslt = 0
  212. // arg_price = 0
  213. MessageBox('', '公式不通过')
  214. Else
  215. // arg_price = Round(Dec(s_rtn),5)
  216. MessageBox('', '公式通过')
  217. End If
  218. ext:
  219. Destroy ds_pricestr
  220. destroy ds_parm
  221. Return rslt
  222. end function
  223. on w_mtrl_workpricestr_compute_edit.create
  224. int iCurrent
  225. call super::create
  226. this.mle_rule_if=create mle_rule_if
  227. this.st_1=create st_1
  228. this.ddlb_op=create ddlb_op
  229. this.st_2=create st_2
  230. this.ddlb_1=create ddlb_1
  231. this.st_3=create st_3
  232. this.st_4=create st_4
  233. this.cb_ok=create cb_ok
  234. this.cb_check=create cb_check
  235. this.st_5=create st_5
  236. this.st_status=create st_status
  237. this.st_woodcode=create st_woodcode
  238. this.st_pcode=create st_pcode
  239. this.cb_10=create cb_10
  240. this.st_8=create st_8
  241. this.st_9=create st_9
  242. this.st_11=create st_11
  243. this.st_12=create st_12
  244. this.cb_17=create cb_17
  245. this.cb_18=create cb_18
  246. this.st_6=create st_6
  247. this.st_7=create st_7
  248. this.st_10=create st_10
  249. this.st_13=create st_13
  250. this.st_14=create st_14
  251. this.cb_4=create cb_4
  252. this.dw_1=create dw_1
  253. this.st_usermtrlmode=create st_usermtrlmode
  254. this.st_mtrlsectype=create st_mtrlsectype
  255. this.st_zxmtrlmode=create st_zxmtrlmode
  256. this.cb_1=create cb_1
  257. this.st_15=create st_15
  258. this.cb_2=create cb_2
  259. this.st_16=create st_16
  260. this.cb_3=create cb_3
  261. this.rb_1=create rb_1
  262. this.rb_2=create rb_2
  263. this.dw_2=create dw_2
  264. this.gb_1=create gb_1
  265. iCurrent=UpperBound(this.Control)
  266. this.Control[iCurrent+1]=this.mle_rule_if
  267. this.Control[iCurrent+2]=this.st_1
  268. this.Control[iCurrent+3]=this.ddlb_op
  269. this.Control[iCurrent+4]=this.st_2
  270. this.Control[iCurrent+5]=this.ddlb_1
  271. this.Control[iCurrent+6]=this.st_3
  272. this.Control[iCurrent+7]=this.st_4
  273. this.Control[iCurrent+8]=this.cb_ok
  274. this.Control[iCurrent+9]=this.cb_check
  275. this.Control[iCurrent+10]=this.st_5
  276. this.Control[iCurrent+11]=this.st_status
  277. this.Control[iCurrent+12]=this.st_woodcode
  278. this.Control[iCurrent+13]=this.st_pcode
  279. this.Control[iCurrent+14]=this.cb_10
  280. this.Control[iCurrent+15]=this.st_8
  281. this.Control[iCurrent+16]=this.st_9
  282. this.Control[iCurrent+17]=this.st_11
  283. this.Control[iCurrent+18]=this.st_12
  284. this.Control[iCurrent+19]=this.cb_17
  285. this.Control[iCurrent+20]=this.cb_18
  286. this.Control[iCurrent+21]=this.st_6
  287. this.Control[iCurrent+22]=this.st_7
  288. this.Control[iCurrent+23]=this.st_10
  289. this.Control[iCurrent+24]=this.st_13
  290. this.Control[iCurrent+25]=this.st_14
  291. this.Control[iCurrent+26]=this.cb_4
  292. this.Control[iCurrent+27]=this.dw_1
  293. this.Control[iCurrent+28]=this.st_usermtrlmode
  294. this.Control[iCurrent+29]=this.st_mtrlsectype
  295. this.Control[iCurrent+30]=this.st_zxmtrlmode
  296. this.Control[iCurrent+31]=this.cb_1
  297. this.Control[iCurrent+32]=this.st_15
  298. this.Control[iCurrent+33]=this.cb_2
  299. this.Control[iCurrent+34]=this.st_16
  300. this.Control[iCurrent+35]=this.cb_3
  301. this.Control[iCurrent+36]=this.rb_1
  302. this.Control[iCurrent+37]=this.rb_2
  303. this.Control[iCurrent+38]=this.dw_2
  304. this.Control[iCurrent+39]=this.gb_1
  305. end on
  306. on w_mtrl_workpricestr_compute_edit.destroy
  307. call super::destroy
  308. destroy(this.mle_rule_if)
  309. destroy(this.st_1)
  310. destroy(this.ddlb_op)
  311. destroy(this.st_2)
  312. destroy(this.ddlb_1)
  313. destroy(this.st_3)
  314. destroy(this.st_4)
  315. destroy(this.cb_ok)
  316. destroy(this.cb_check)
  317. destroy(this.st_5)
  318. destroy(this.st_status)
  319. destroy(this.st_woodcode)
  320. destroy(this.st_pcode)
  321. destroy(this.cb_10)
  322. destroy(this.st_8)
  323. destroy(this.st_9)
  324. destroy(this.st_11)
  325. destroy(this.st_12)
  326. destroy(this.cb_17)
  327. destroy(this.cb_18)
  328. destroy(this.st_6)
  329. destroy(this.st_7)
  330. destroy(this.st_10)
  331. destroy(this.st_13)
  332. destroy(this.st_14)
  333. destroy(this.cb_4)
  334. destroy(this.dw_1)
  335. destroy(this.st_usermtrlmode)
  336. destroy(this.st_mtrlsectype)
  337. destroy(this.st_zxmtrlmode)
  338. destroy(this.cb_1)
  339. destroy(this.st_15)
  340. destroy(this.cb_2)
  341. destroy(this.st_16)
  342. destroy(this.cb_3)
  343. destroy(this.rb_1)
  344. destroy(this.rb_2)
  345. destroy(this.dw_2)
  346. destroy(this.gb_1)
  347. end on
  348. event open;call super::open;s_edit_index_tran s_tran_str
  349. s_tran_str = message.powerobjectparm
  350. ins_rulestr = s_tran_str.b_string
  351. ins_type = s_tran_str.b_long
  352. dw_2.settransobject(sqlca)
  353. dw_2.retrieve()
  354. mle_rule_if.text = ins_rulestr
  355. long ll_row
  356. if ins_type = 1 then
  357. this.title = '工价表数量公式编辑'
  358. ll_row = dw_1.find('rulename = "数量"',1,dw_1.rowcount())
  359. dw_1.DeleteRow(ll_row)
  360. else
  361. this.title = '工价公式编辑'
  362. end if
  363. end event
  364. event close;call super::close;closewithreturn(this,ins_rulestr)
  365. end event
  366. type cb_func from w_publ_base`cb_func within w_mtrl_workpricestr_compute_edit
  367. boolean visible = false
  368. end type
  369. type cb_exit from w_publ_base`cb_exit within w_mtrl_workpricestr_compute_edit
  370. integer x = 1893
  371. integer y = 2124
  372. integer picsize = 16
  373. end type
  374. type mle_rule_if from multilineedit within w_mtrl_workpricestr_compute_edit
  375. integer x = 64
  376. integer y = 1112
  377. integer width = 2674
  378. integer height = 928
  379. integer taborder = 30
  380. boolean bringtotop = true
  381. integer textsize = -9
  382. integer weight = 400
  383. fontcharset fontcharset = gb2312charset!
  384. fontpitch fontpitch = variable!
  385. string facename = "宋体"
  386. long textcolor = 33554432
  387. boolean vscrollbar = true
  388. boolean autovscroll = true
  389. borderstyle borderstyle = stylelowered!
  390. end type
  391. type st_1 from statictext within w_mtrl_workpricestr_compute_edit
  392. integer x = 69
  393. integer y = 908
  394. integer width = 151
  395. integer height = 48
  396. boolean bringtotop = true
  397. integer textsize = -9
  398. integer weight = 400
  399. fontcharset fontcharset = gb2312charset!
  400. fontpitch fontpitch = variable!
  401. string facename = "宋体"
  402. long textcolor = 33554432
  403. long backcolor = 134217739
  404. string text = "条件"
  405. alignment alignment = right!
  406. boolean focusrectangle = false
  407. end type
  408. type ddlb_op from dropdownlistbox within w_mtrl_workpricestr_compute_edit
  409. integer x = 238
  410. integer y = 896
  411. integer width = 311
  412. integer height = 496
  413. integer taborder = 40
  414. boolean bringtotop = true
  415. integer textsize = -9
  416. integer weight = 400
  417. fontcharset fontcharset = gb2312charset!
  418. fontpitch fontpitch = variable!
  419. string facename = "宋体"
  420. long textcolor = 33554432
  421. boolean sorted = false
  422. string item[] = {"包含","等于","不包含","不等于","大于","小于","大于等于","小于等于"}
  423. borderstyle borderstyle = stylelowered!
  424. end type
  425. event selectionchanged;string ls_selected
  426. int li_Position,li_selectpos
  427. li_Position = mle_rule_if.Position()
  428. ls_selected=' ' + this.text + ' '
  429. //mle_rule_if.text=mle_rule_if.text+ls_selected
  430. li_selectpos = len(mid(mle_rule_if.text,1,li_Position - 1) + ls_selected)
  431. mle_rule_if.text = mid(mle_rule_if.text,1,li_Position - 1) + ls_selected + mid(mle_rule_if.text,li_Position)
  432. mle_rule_if.SelectText(li_selectpos + 1, 0)
  433. mle_rule_if.setfocus()
  434. end event
  435. type st_2 from statictext within w_mtrl_workpricestr_compute_edit
  436. integer x = 576
  437. integer y = 908
  438. integer width = 142
  439. integer height = 48
  440. boolean bringtotop = true
  441. integer textsize = -9
  442. integer weight = 400
  443. fontcharset fontcharset = gb2312charset!
  444. fontpitch fontpitch = variable!
  445. string facename = "宋体"
  446. long textcolor = 33554432
  447. long backcolor = 134217739
  448. string text = "关系"
  449. alignment alignment = right!
  450. boolean focusrectangle = false
  451. end type
  452. type ddlb_1 from dropdownlistbox within w_mtrl_workpricestr_compute_edit
  453. integer x = 731
  454. integer y = 896
  455. integer width = 270
  456. integer height = 300
  457. integer taborder = 50
  458. boolean bringtotop = true
  459. integer textsize = -9
  460. integer weight = 400
  461. fontcharset fontcharset = gb2312charset!
  462. fontpitch fontpitch = variable!
  463. string facename = "宋体"
  464. long textcolor = 33554432
  465. string text = "包含"
  466. boolean sorted = false
  467. string item[] = {"并且","或者"}
  468. borderstyle borderstyle = stylelowered!
  469. end type
  470. event selectionchanged;string ls_selected
  471. int li_Position,li_selectpos
  472. li_Position = mle_rule_if.Position()
  473. IF THIS.Text = '并且' THEN
  474. ls_selected = ' and '
  475. ELSE
  476. ls_selected = ' or '
  477. END IF
  478. //mle_rule_if.text=mle_rule_if.text+ls_selected
  479. li_selectpos = len(mid(mle_rule_if.text,1,li_Position - 1) + ls_selected)
  480. mle_rule_if.text = mid(mle_rule_if.text,1,li_Position - 1) + ls_selected + mid(mle_rule_if.text,li_Position)
  481. mle_rule_if.SelectText(li_selectpos + 1, 0)
  482. mle_rule_if.setfocus()
  483. end event
  484. type st_3 from statictext within w_mtrl_workpricestr_compute_edit
  485. integer x = 1175
  486. integer y = 16
  487. integer width = 1138
  488. integer height = 48
  489. boolean bringtotop = true
  490. integer textsize = -9
  491. integer weight = 400
  492. fontcharset fontcharset = gb2312charset!
  493. fontpitch fontpitch = variable!
  494. string facename = "宋体"
  495. long textcolor = 255
  496. long backcolor = 134217739
  497. string text = "注意:1.输入文本内容时,前后需要增加引号."
  498. boolean focusrectangle = false
  499. end type
  500. type st_4 from statictext within w_mtrl_workpricestr_compute_edit
  501. integer x = 1362
  502. integer y = 72
  503. integer width = 782
  504. integer height = 48
  505. boolean bringtotop = true
  506. integer textsize = -9
  507. integer weight = 400
  508. fontcharset fontcharset = gb2312charset!
  509. fontpitch fontpitch = variable!
  510. string facename = "宋体"
  511. long textcolor = 255
  512. long backcolor = 134217739
  513. string text = "如:{配置1} 等于 ~'头层皮~'"
  514. boolean focusrectangle = false
  515. end type
  516. type cb_ok from uo_imflatbutton within w_mtrl_workpricestr_compute_edit
  517. integer x = 1554
  518. integer y = 2124
  519. integer width = 311
  520. integer height = 96
  521. integer taborder = 20
  522. boolean bringtotop = true
  523. string normalpicname = "save.bmp"
  524. integer picsize = 16
  525. end type
  526. event clicked;call super::clicked;ins_rulestr = Trim(mle_rule_if.Text)
  527. Close(PARENT)
  528. end event
  529. type cb_check from commandbutton within w_mtrl_workpricestr_compute_edit
  530. boolean visible = false
  531. integer x = 1134
  532. integer y = 604
  533. integer width = 343
  534. integer height = 84
  535. integer taborder = 60
  536. boolean bringtotop = true
  537. integer textsize = -9
  538. integer weight = 400
  539. fontcharset fontcharset = gb2312charset!
  540. fontpitch fontpitch = variable!
  541. string facename = "宋体"
  542. string text = "检查语法"
  543. end type
  544. event clicked;String ls_express,ls_temp
  545. String ls_rtn
  546. long ll_rt
  547. IF Trim(mle_rule_if.Text) = '' THEN
  548. messagebox('系统提示','请先输入规则表达式')
  549. return
  550. END IF
  551. ls_express = Trim(mle_rule_if.Text)
  552. SELECT Top 1 Replace( :ls_express,'{原编码}','mtrlcode') INTO :ls_temp FROM u_user;
  553. SELECT Top 1 Replace( :ls_temp,'{原名称}','mtrlname') INTO :ls_temp FROM u_user;
  554. SELECT Top 1 Replace( :ls_temp,'{原规格}','mtrlmode') INTO :ls_temp FROM u_user;
  555. SELECT Top 1 Replace( :ls_temp,'{自定义1}','mtrlsectype') INTO :ls_temp FROM u_user;
  556. SELECT Top 1 Replace( :ls_temp,'{自定义2}','zxmtrlmode') INTO :ls_temp FROM u_user;
  557. SELECT Top 1 Replace( :ls_temp,'{自定义3}','usermtrlmode') INTO :ls_temp FROM u_user;
  558. SELECT Top 1 Replace( :ls_temp,'{配置}','status') INTO :ls_temp FROM u_user;
  559. SELECT Top 1 Replace( :ls_temp,'{配置1}','woodcode') INTO :ls_temp FROM u_user;
  560. SELECT Top 1 Replace( :ls_temp,'{配置2}','pcode') INTO :ls_temp FROM u_user;
  561. SELECT Top 1 Replace( :ls_temp,'包含','like') INTO :ls_temp FROM u_user;
  562. SELECT Top 1 Replace( :ls_temp,'等于','=') INTO :ls_temp FROM u_user;
  563. ls_temp='if('+ls_temp+',1,0)'
  564. messagebox('',ls_temp)
  565. datastore dw_check
  566. dw_check = CREATE datastore
  567. dw_check.DataObject = 'dw_mtrl_change_rule_check'
  568. dw_check.InsertRow(0)
  569. //ll_rt =
  570. dw_check.Modify("compute.expression='"+ls_temp+"'")
  571. //ll_rt = dw_check.object.compute[1]
  572. messagebox('',string(dw_check.object.compute[1]))
  573. IF ls_rtn <> '' THEN
  574. messagebox('系统提示','原物料替换条件语法检查不通过,请检查')
  575. return
  576. END IF
  577. end event
  578. type st_5 from statictext within w_mtrl_workpricestr_compute_edit
  579. integer x = 1307
  580. integer y = 128
  581. integer width = 1522
  582. integer height = 48
  583. boolean bringtotop = true
  584. integer textsize = -9
  585. integer weight = 400
  586. fontcharset fontcharset = gb2312charset!
  587. fontpitch fontpitch = variable!
  588. string facename = "宋体"
  589. long textcolor = 255
  590. long backcolor = 134217739
  591. string text = "2.~'并且~'的优先级大于~'或者~',必要时可用小括号进行组合"
  592. boolean focusrectangle = false
  593. end type
  594. type st_status from statictext within w_mtrl_workpricestr_compute_edit
  595. integer x = 50
  596. integer y = 256
  597. integer width = 1102
  598. integer height = 48
  599. boolean bringtotop = true
  600. integer textsize = -9
  601. integer weight = 400
  602. fontcharset fontcharset = gb2312charset!
  603. fontpitch fontpitch = variable!
  604. string facename = "宋体"
  605. long textcolor = 33554432
  606. long backcolor = 134217739
  607. string text = "none"
  608. boolean focusrectangle = false
  609. end type
  610. event constructor;this.text = '配置 = '+sys_option_change_status
  611. end event
  612. type st_woodcode from statictext within w_mtrl_workpricestr_compute_edit
  613. integer x = 50
  614. integer y = 320
  615. integer width = 1102
  616. integer height = 48
  617. boolean bringtotop = true
  618. integer textsize = -9
  619. integer weight = 400
  620. fontcharset fontcharset = gb2312charset!
  621. fontpitch fontpitch = variable!
  622. string facename = "宋体"
  623. long textcolor = 33554432
  624. long backcolor = 134217739
  625. string text = "none"
  626. boolean focusrectangle = false
  627. end type
  628. event constructor;this.text = '配置1 = '+sys_option_change_woodcode
  629. end event
  630. type st_pcode from statictext within w_mtrl_workpricestr_compute_edit
  631. integer x = 50
  632. integer y = 384
  633. integer width = 1102
  634. integer height = 48
  635. boolean bringtotop = true
  636. integer textsize = -9
  637. integer weight = 400
  638. fontcharset fontcharset = gb2312charset!
  639. fontpitch fontpitch = variable!
  640. string facename = "宋体"
  641. long textcolor = 33554432
  642. long backcolor = 134217739
  643. string text = "none"
  644. boolean focusrectangle = false
  645. end type
  646. event constructor;this.text = '配置2 = '+sys_option_change_pcode
  647. end event
  648. type cb_10 from commandbutton within w_mtrl_workpricestr_compute_edit
  649. boolean visible = false
  650. integer x = 1134
  651. integer y = 1292
  652. integer width = 343
  653. integer height = 84
  654. integer taborder = 60
  655. boolean bringtotop = true
  656. integer textsize = -9
  657. integer weight = 400
  658. fontcharset fontcharset = gb2312charset!
  659. fontpitch fontpitch = variable!
  660. string facename = "宋体"
  661. string text = "检查语法"
  662. end type
  663. event clicked;//String ls_express,ls_temp
  664. //String ls_rtn
  665. //
  666. //IF Trim(mle_rule_then.Text) = '' THEN
  667. // messagebox('系统提示','请先输入规则表达式')
  668. // return
  669. //END IF
  670. //
  671. //ls_express = Trim(mle_rule_then.Text)
  672. //
  673. //SELECT Top 1 Replace( :ls_express,'{新编码}','mtrlcode') INTO :ls_temp FROM u_user;
  674. //SELECT Top 1 Replace( :ls_temp,'{新名称}','mtrlname') INTO :ls_temp FROM u_user;
  675. //SELECT Top 1 Replace( :ls_temp,'{新规格}','mtrlmode') INTO :ls_temp FROM u_user;
  676. //SELECT Top 1 Replace( :ls_temp,'{自定义1}','mtrlsectype') INTO :ls_temp FROM u_user;
  677. //SELECT Top 1 Replace( :ls_temp,'{自定义2}','zxmtrlmode') INTO :ls_temp FROM u_user;
  678. //SELECT Top 1 Replace( :ls_temp,'{自定义3}','usermtrlmode') INTO :ls_temp FROM u_user;
  679. //
  680. //SELECT Top 1 Replace( :ls_temp,'{配置}','status') INTO :ls_temp FROM u_user;
  681. //SELECT Top 1 Replace( :ls_temp,'{配置1}','woodcode') INTO :ls_temp FROM u_user;
  682. //SELECT Top 1 Replace( :ls_temp,'{配置2}','pcode') INTO :ls_temp FROM u_user;
  683. //
  684. //
  685. //SELECT Top 1 Replace( :ls_temp,'包含','like') INTO :ls_temp FROM u_user;
  686. //SELECT Top 1 Replace( :ls_temp,'等于','=') INTO :ls_temp FROM u_user;
  687. //
  688. //datastore dw_check
  689. //dw_check = CREATE datastore
  690. //dw_check.DataObject = 'dw_mtrl_change_rule_check'
  691. //dw_check.InsertRow(0)
  692. //ls_rtn = dw_check.Modify("compute.expression='"+ls_temp+"'")
  693. //IF ls_rtn <> '' THEN
  694. // messagebox('系统提示','新物料查找条件语法检查不通过,请检查')
  695. // return
  696. //END IF
  697. end event
  698. type st_8 from statictext within w_mtrl_workpricestr_compute_edit
  699. integer x = 1307
  700. integer y = 196
  701. integer width = 974
  702. integer height = 48
  703. boolean bringtotop = true
  704. integer textsize = -9
  705. integer weight = 400
  706. fontcharset fontcharset = gb2312charset!
  707. fontpitch fontpitch = variable!
  708. string facename = "宋体"
  709. long textcolor = 255
  710. long backcolor = 134217739
  711. string text = "3.~'包含~'的内容前后通常要有通配符~'%~'"
  712. boolean focusrectangle = false
  713. end type
  714. type st_9 from statictext within w_mtrl_workpricestr_compute_edit
  715. integer x = 1207
  716. integer y = 260
  717. integer width = 1632
  718. integer height = 48
  719. boolean bringtotop = true
  720. integer textsize = -9
  721. integer weight = 400
  722. fontcharset fontcharset = gb2312charset!
  723. fontpitch fontpitch = variable!
  724. string facename = "宋体"
  725. long textcolor = 255
  726. long backcolor = 134217739
  727. string text = "如: {配置1} 包含 ~'头层%~',可查找到名称以~"头层~"开头的物料"
  728. boolean focusrectangle = false
  729. end type
  730. type st_11 from statictext within w_mtrl_workpricestr_compute_edit
  731. integer x = 1207
  732. integer y = 320
  733. integer width = 1632
  734. integer height = 48
  735. boolean bringtotop = true
  736. integer textsize = -9
  737. integer weight = 400
  738. fontcharset fontcharset = gb2312charset!
  739. fontpitch fontpitch = variable!
  740. string facename = "宋体"
  741. long textcolor = 255
  742. long backcolor = 134217739
  743. string text = "如: {配置1} 包含 ~'%头层~',可查找到名称以~"头层~"结尾的物料"
  744. boolean focusrectangle = false
  745. end type
  746. type st_12 from statictext within w_mtrl_workpricestr_compute_edit
  747. integer x = 1207
  748. integer y = 376
  749. integer width = 1659
  750. integer height = 48
  751. boolean bringtotop = true
  752. integer textsize = -9
  753. integer weight = 400
  754. fontcharset fontcharset = gb2312charset!
  755. fontpitch fontpitch = variable!
  756. string facename = "宋体"
  757. long textcolor = 255
  758. long backcolor = 134217739
  759. string text = "如: {配置1} 包含 ~'%头层%~',可查找到名称中包含~"头层~"的物料"
  760. boolean focusrectangle = false
  761. end type
  762. type cb_17 from commandbutton within w_mtrl_workpricestr_compute_edit
  763. integer x = 1019
  764. integer y = 892
  765. integer width = 96
  766. integer height = 84
  767. integer taborder = 80
  768. boolean bringtotop = true
  769. integer textsize = -9
  770. integer weight = 400
  771. fontcharset fontcharset = gb2312charset!
  772. fontpitch fontpitch = variable!
  773. string facename = "宋体"
  774. string text = "~'"
  775. end type
  776. event clicked;string ls_selected
  777. int li_Position,li_selectpos
  778. li_Position = mle_rule_if.Position()
  779. ls_selected=this.text
  780. //mle_rule_if.text=mle_rule_if.text+ls_selected
  781. li_selectpos = len(mid(mle_rule_if.text,1,li_Position - 1) + ls_selected)
  782. mle_rule_if.text = mid(mle_rule_if.text,1,li_Position - 1) + ls_selected + mid(mle_rule_if.text,li_Position)
  783. mle_rule_if.SelectText(li_selectpos + 1, 0)
  784. mle_rule_if.setfocus()
  785. end event
  786. type cb_18 from commandbutton within w_mtrl_workpricestr_compute_edit
  787. integer x = 1134
  788. integer y = 892
  789. integer width = 96
  790. integer height = 84
  791. integer taborder = 90
  792. boolean bringtotop = true
  793. integer textsize = -9
  794. integer weight = 400
  795. fontcharset fontcharset = gb2312charset!
  796. fontpitch fontpitch = variable!
  797. string facename = "宋体"
  798. string text = "%"
  799. end type
  800. event clicked;string ls_selected
  801. int li_Position,li_selectpos
  802. li_Position = mle_rule_if.Position()
  803. ls_selected=this.text
  804. //mle_rule_if.text=mle_rule_if.text+ls_selected
  805. li_selectpos = len(mid(mle_rule_if.text,1,li_Position - 1) + ls_selected)
  806. mle_rule_if.text = mid(mle_rule_if.text,1,li_Position - 1) + ls_selected + mid(mle_rule_if.text,li_Position)
  807. mle_rule_if.SelectText(li_selectpos + 1, 0)
  808. mle_rule_if.setfocus()
  809. end event
  810. type st_6 from statictext within w_mtrl_workpricestr_compute_edit
  811. integer x = 82
  812. integer y = 684
  813. integer width = 2702
  814. integer height = 48
  815. boolean bringtotop = true
  816. integer textsize = -9
  817. integer weight = 400
  818. fontcharset fontcharset = gb2312charset!
  819. fontpitch fontpitch = variable!
  820. string facename = "宋体"
  821. long backcolor = 134217739
  822. string text = "(2)配置1 等于 牛皮 的产品,价格为100,配置1 等于 仿皮 的产品,价格为80,其余价格为50,公式写法如下:"
  823. boolean focusrectangle = false
  824. end type
  825. type st_7 from statictext within w_mtrl_workpricestr_compute_edit
  826. integer x = 87
  827. integer y = 752
  828. integer width = 1897
  829. integer height = 56
  830. boolean bringtotop = true
  831. integer textsize = -9
  832. integer weight = 700
  833. fontcharset fontcharset = gb2312charset!
  834. fontpitch fontpitch = variable!
  835. string facename = "宋体"
  836. long textcolor = 16711680
  837. long backcolor = 134217739
  838. string text = "if(配置1 等于 ~'牛皮~',100, if(配置1 等于 ~'仿皮~',80,50) )"
  839. boolean focusrectangle = false
  840. end type
  841. type st_10 from statictext within w_mtrl_workpricestr_compute_edit
  842. integer x = 37
  843. integer y = 460
  844. integer width = 402
  845. integer height = 48
  846. boolean bringtotop = true
  847. integer textsize = -9
  848. integer weight = 400
  849. fontcharset fontcharset = gb2312charset!
  850. fontpitch fontpitch = variable!
  851. string facename = "宋体"
  852. long backcolor = 134217739
  853. string text = "语法举例:"
  854. boolean focusrectangle = false
  855. end type
  856. type st_13 from statictext within w_mtrl_workpricestr_compute_edit
  857. integer x = 82
  858. integer y = 528
  859. integer width = 1769
  860. integer height = 52
  861. boolean bringtotop = true
  862. integer textsize = -9
  863. integer weight = 400
  864. fontcharset fontcharset = gb2312charset!
  865. fontpitch fontpitch = variable!
  866. string facename = "宋体"
  867. long backcolor = 134217739
  868. string text = "(1)配置1 等于 牛皮 的产品,价格为100,其余价格为50,公式写法如下:"
  869. boolean focusrectangle = false
  870. end type
  871. type st_14 from statictext within w_mtrl_workpricestr_compute_edit
  872. integer x = 87
  873. integer y = 592
  874. integer width = 960
  875. integer height = 56
  876. boolean bringtotop = true
  877. integer textsize = -9
  878. integer weight = 700
  879. fontcharset fontcharset = gb2312charset!
  880. fontpitch fontpitch = variable!
  881. string facename = "宋体"
  882. long textcolor = 16711680
  883. long backcolor = 134217739
  884. string text = "if(配置1 等于 ~'牛皮~',100,50) "
  885. boolean focusrectangle = false
  886. end type
  887. type cb_4 from commandbutton within w_mtrl_workpricestr_compute_edit
  888. integer x = 1248
  889. integer y = 892
  890. integer width = 183
  891. integer height = 84
  892. integer taborder = 70
  893. boolean bringtotop = true
  894. integer textsize = -9
  895. integer weight = 400
  896. fontcharset fontcharset = gb2312charset!
  897. fontpitch fontpitch = variable!
  898. string facename = "宋体"
  899. string text = "if( )"
  900. end type
  901. event clicked;
  902. string ls_selected
  903. int li_Position,li_selectpos
  904. li_Position = mle_rule_if.Position()
  905. ls_selected= 'if()'
  906. //mle_rule_if.text=mle_rule_if.text+ls_selected
  907. li_selectpos = len(mid(mle_rule_if.text,1,li_Position - 1) + ls_selected)
  908. mle_rule_if.text = mid(mle_rule_if.text,1,li_Position - 1) + ls_selected + mid(mle_rule_if.text,li_Position)
  909. mle_rule_if.SelectText(li_selectpos, 0)
  910. mle_rule_if.setfocus()
  911. end event
  912. type dw_1 from datawindow within w_mtrl_workpricestr_compute_edit
  913. integer x = 2752
  914. integer y = 964
  915. integer width = 814
  916. integer height = 1076
  917. integer taborder = 40
  918. boolean bringtotop = true
  919. string title = "none"
  920. string dataobject = "ddd_mtrl_workpricestr_parm"
  921. boolean vscrollbar = true
  922. borderstyle borderstyle = stylelowered!
  923. end type
  924. event doubleclicked;IF row > 0 THEN
  925. String ls_selected
  926. ls_selected = This.Object.rulename[row]
  927. mle_rule_if.Text = mle_rule_if.Text+ls_selected
  928. mle_rule_if.SelectText(Len(mle_rule_if.Text) + 1, 0)
  929. mle_rule_if.SetFocus()
  930. END IF
  931. end event
  932. event rowfocuschanged;IF currentrow <= 0 THEN RETURN
  933. This.SelectRow(0,False)
  934. This.SelectRow(currentrow,True)
  935. end event
  936. type st_usermtrlmode from statictext within w_mtrl_workpricestr_compute_edit
  937. integer x = 50
  938. integer y = 148
  939. integer width = 1102
  940. integer height = 48
  941. boolean bringtotop = true
  942. integer textsize = -9
  943. integer weight = 400
  944. fontcharset fontcharset = gb2312charset!
  945. fontpitch fontpitch = variable!
  946. string facename = "宋体"
  947. long textcolor = 33554432
  948. long backcolor = 134217739
  949. string text = "none"
  950. boolean focusrectangle = false
  951. end type
  952. event constructor;//this.text = '自定义3 = '+sys_option_change_usermtrlmode
  953. end event
  954. type st_mtrlsectype from statictext within w_mtrl_workpricestr_compute_edit
  955. integer x = 50
  956. integer y = 24
  957. integer width = 1102
  958. integer height = 48
  959. boolean bringtotop = true
  960. integer textsize = -9
  961. integer weight = 400
  962. fontcharset fontcharset = gb2312charset!
  963. fontpitch fontpitch = variable!
  964. string facename = "宋体"
  965. long textcolor = 33554432
  966. long backcolor = 134217739
  967. string text = "none"
  968. boolean focusrectangle = false
  969. end type
  970. event constructor;this.text = '自定义1 = '+sys_option_change_mtrlsectype
  971. end event
  972. type st_zxmtrlmode from statictext within w_mtrl_workpricestr_compute_edit
  973. integer x = 50
  974. integer y = 88
  975. integer width = 1102
  976. integer height = 48
  977. boolean bringtotop = true
  978. integer textsize = -9
  979. integer weight = 400
  980. fontcharset fontcharset = gb2312charset!
  981. fontpitch fontpitch = variable!
  982. string facename = "宋体"
  983. long textcolor = 33554432
  984. long backcolor = 134217739
  985. string text = "none"
  986. boolean focusrectangle = false
  987. end type
  988. event constructor;this.text = '自定义2 = '+sys_option_change_zxmtrlmode
  989. end event
  990. type cb_1 from commandbutton within w_mtrl_workpricestr_compute_edit
  991. integer x = 1440
  992. integer y = 892
  993. integer width = 507
  994. integer height = 84
  995. integer taborder = 80
  996. boolean bringtotop = true
  997. integer textsize = -9
  998. integer weight = 400
  999. fontcharset fontcharset = gb2312charset!
  1000. fontpitch fontpitch = variable!
  1001. string facename = "宋体"
  1002. string text = "获取字符串中数字"
  1003. end type
  1004. event clicked;
  1005. string ls_selected
  1006. ls_selected='f_char_to_dec_workprice()'
  1007. mle_rule_if.text=mle_rule_if.text+ls_selected
  1008. mle_rule_if.SelectText(Len(mle_rule_if.Text) + 1, 0)
  1009. mle_rule_if.setfocus()
  1010. end event
  1011. type st_15 from statictext within w_mtrl_workpricestr_compute_edit
  1012. integer x = 82
  1013. integer y = 992
  1014. integer width = 2592
  1015. integer height = 48
  1016. boolean bringtotop = true
  1017. integer textsize = -9
  1018. integer weight = 400
  1019. fontcharset fontcharset = gb2312charset!
  1020. fontpitch fontpitch = variable!
  1021. string facename = "宋体"
  1022. long textcolor = 33554432
  1023. long backcolor = 134217739
  1024. string text = "获取字符串中数字函数参数说明:f_char_to_dec_workprice(参数1:字符串,参数2:第几个数字,例如:2)"
  1025. boolean focusrectangle = false
  1026. end type
  1027. type cb_2 from commandbutton within w_mtrl_workpricestr_compute_edit
  1028. integer x = 1966
  1029. integer y = 892
  1030. integer width = 713
  1031. integer height = 84
  1032. integer taborder = 80
  1033. boolean bringtotop = true
  1034. integer textsize = -9
  1035. integer weight = 400
  1036. fontcharset fontcharset = gb2312charset!
  1037. fontpitch fontpitch = variable!
  1038. string facename = "宋体"
  1039. string text = "获取字符串指定符号后数字"
  1040. end type
  1041. event clicked;
  1042. string ls_selected
  1043. ls_selected='f_char_find_dec_workprice()'
  1044. mle_rule_if.text=mle_rule_if.text+ls_selected
  1045. mle_rule_if.SelectText(Len(mle_rule_if.Text) + 1, 0)
  1046. mle_rule_if.setfocus()
  1047. end event
  1048. type st_16 from statictext within w_mtrl_workpricestr_compute_edit
  1049. integer x = 82
  1050. integer y = 1052
  1051. integer width = 2587
  1052. integer height = 48
  1053. boolean bringtotop = true
  1054. integer textsize = -9
  1055. integer weight = 400
  1056. fontcharset fontcharset = gb2312charset!
  1057. fontpitch fontpitch = variable!
  1058. string facename = "宋体"
  1059. long textcolor = 33554432
  1060. long backcolor = 134217739
  1061. string text = "获取字符串指定符号后数字函数参数说明:f_char_find_dec_workprice(参数1:字符串,参数2:指定符号)"
  1062. boolean focusrectangle = false
  1063. end type
  1064. type cb_3 from uo_imflatbutton within w_mtrl_workpricestr_compute_edit
  1065. integer x = 1202
  1066. integer y = 2124
  1067. integer width = 329
  1068. integer height = 96
  1069. integer taborder = 20
  1070. boolean bringtotop = true
  1071. string text = "检查公式"
  1072. string normalpicname = "p2.bmp"
  1073. integer picsize = 16
  1074. end type
  1075. event clicked;call super::clicked;uof_pricestr_cmp(mle_rule_if.text, '', '','')
  1076. end event
  1077. type rb_1 from radiobutton within w_mtrl_workpricestr_compute_edit
  1078. integer x = 2757
  1079. integer y = 896
  1080. integer width = 315
  1081. integer height = 60
  1082. boolean bringtotop = true
  1083. integer textsize = -9
  1084. integer weight = 400
  1085. fontcharset fontcharset = gb2312charset!
  1086. fontpitch fontpitch = variable!
  1087. string facename = "宋体"
  1088. long textcolor = 33554432
  1089. long backcolor = 134217739
  1090. string text = "系统参数"
  1091. boolean checked = true
  1092. end type
  1093. event clicked;dw_1.visible = true
  1094. dw_2.visible = false
  1095. end event
  1096. type rb_2 from radiobutton within w_mtrl_workpricestr_compute_edit
  1097. integer x = 3131
  1098. integer y = 896
  1099. integer width = 402
  1100. integer height = 60
  1101. boolean bringtotop = true
  1102. integer textsize = -9
  1103. integer weight = 400
  1104. fontcharset fontcharset = gb2312charset!
  1105. fontpitch fontpitch = variable!
  1106. string facename = "宋体"
  1107. long textcolor = 33554432
  1108. long backcolor = 134217739
  1109. string text = "自定义参数"
  1110. end type
  1111. event clicked;dw_1.visible = false
  1112. dw_2.visible = true
  1113. end event
  1114. type dw_2 from datawindow within w_mtrl_workpricestr_compute_edit
  1115. boolean visible = false
  1116. integer x = 2752
  1117. integer y = 964
  1118. integer width = 814
  1119. integer height = 1076
  1120. integer taborder = 40
  1121. boolean bringtotop = true
  1122. string title = "none"
  1123. string dataobject = "ddd_workprice_parm_def"
  1124. boolean vscrollbar = true
  1125. borderstyle borderstyle = stylelowered!
  1126. end type
  1127. event doubleclicked;IF row > 0 THEN
  1128. String ls_selected
  1129. ls_selected = '['+This.Object.parmname[row]+']'
  1130. mle_rule_if.Text = mle_rule_if.Text+ls_selected
  1131. mle_rule_if.SelectText(Len(mle_rule_if.Text) + 1, 0)
  1132. mle_rule_if.SetFocus()
  1133. END IF
  1134. end event
  1135. event rowfocuschanged;IF currentrow <= 0 THEN RETURN
  1136. This.SelectRow(0,False)
  1137. This.SelectRow(currentrow,True)
  1138. end event
  1139. type gb_1 from groupbox within w_mtrl_workpricestr_compute_edit
  1140. integer x = 37
  1141. integer y = 832
  1142. integer width = 3557
  1143. integer height = 1248
  1144. integer taborder = 30
  1145. integer textsize = -9
  1146. integer weight = 400
  1147. fontcharset fontcharset = gb2312charset!
  1148. fontpitch fontpitch = variable!
  1149. string facename = "宋体"
  1150. long textcolor = 33554432
  1151. long backcolor = 134217739
  1152. string text = "工价公式条件"
  1153. end type