w_rp_order_ml.srw 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926
  1. $PBExportHeader$w_rp_order_ml.srw
  2. forward
  3. global type w_rp_order_ml from w_publ_easyq
  4. end type
  5. type ddlb_scid from uo_ddlb_scid within w_rp_order_ml
  6. end type
  7. type st_5 from statictext within w_rp_order_ml
  8. end type
  9. type ddlb_salestatus from dropdownlistbox within w_rp_order_ml
  10. end type
  11. type st_6 from statictext within w_rp_order_ml
  12. end type
  13. type ddlb_status from dropdownlistbox within w_rp_order_ml
  14. end type
  15. type st_7 from statictext within w_rp_order_ml
  16. end type
  17. type ddlb_2 from dropdownlistbox within w_rp_order_ml
  18. end type
  19. type st_1 from statictext within w_rp_order_ml
  20. end type
  21. type ddlb_1 from dropdownlistbox within w_rp_order_ml
  22. end type
  23. type mle_1 from multilineedit within w_rp_order_ml
  24. end type
  25. type cb_3 from commandbutton within w_rp_order_ml
  26. end type
  27. type dw_ex from datawindow within w_rp_order_ml
  28. end type
  29. end forward
  30. global type w_rp_order_ml from w_publ_easyq
  31. string title = "销售订单物料运算统计表"
  32. ddlb_scid ddlb_scid
  33. st_5 st_5
  34. ddlb_salestatus ddlb_salestatus
  35. st_6 st_6
  36. ddlb_status ddlb_status
  37. st_7 st_7
  38. ddlb_2 ddlb_2
  39. st_1 st_1
  40. ddlb_1 ddlb_1
  41. mle_1 mle_1
  42. cb_3 cb_3
  43. dw_ex dw_ex
  44. end type
  45. global w_rp_order_ml w_rp_order_ml
  46. type variables
  47. long cur_scid_arr[]
  48. Long cur_flag = -1 //-1:全部,0仓库未审,1仓库已审核
  49. Long cur_secflag = -1 //-1:全部,0财务未审
  50. long cur_priceflag= -1 //-1:全部,0未确认
  51. Int cur_status
  52. int cur_salestatus = 1
  53. Int cur_scllflag = -1,cur_scllsecflag = -1
  54. long ins_proid[]
  55. long ins_row
  56. end variables
  57. forward prototypes
  58. public subroutine wf_hidecol ()
  59. public subroutine wf_pro ()
  60. public subroutine wf_insert ()
  61. end prototypes
  62. public subroutine wf_hidecol ();s_hide_col s_col1,s_col2,s_col3,s_null
  63. s_col1.col_1 = 'u_outwaremx_costamt'
  64. f_hide_col(490,dw_1,s_col1)
  65. s_col2.col_1 = 'gfamt'
  66. f_hide_col(843,dw_1,s_col2)
  67. s_col3.col_1 = 'u_outwaremx_enprice'
  68. s_col3.col_2 = 'enamt'
  69. s_col3.col_3 = 'fprice'
  70. s_col3.col_4 = 'famt'
  71. s_col3.col_5 = 'rebate'
  72. s_col3.col_6 = 'u_outwaremx_dftsaleprice'
  73. s_col3.col_7 = 'u_outwaremx_price'
  74. s_col3.col_8 = 'u_outwaremx_ware_fprice'
  75. s_col3.col_9 = 'ware_amt'
  76. f_hide_col(122,dw_1,s_col3)
  77. s_col3 = s_null
  78. s_col3.col_1 = 'famt_norebate'
  79. s_col3.col_2 = 'famt_rebate'
  80. f_hide_col(122,dw_1,s_col3)
  81. s_hide_col s_col_mtrlsectype
  82. s_col_mtrlsectype.col_1 = 'u_mtrldef_mtrlsectype'
  83. f_hide_col(1308,dw_1,s_col_mtrlsectype)
  84. s_hide_col s_col_zxmtrlmode
  85. s_col_zxmtrlmode.col_1 = 'u_mtrldef_zxmtrlmode'
  86. f_hide_col(1309,dw_1,s_col_zxmtrlmode)
  87. end subroutine
  88. public subroutine wf_pro ();long i,j,ll_cnt,proid[]
  89. string ls_s,name[]
  90. string ls_s1
  91. dw_1.SetRedraw(False)
  92. datastore ds
  93. ds = Create datastore
  94. ds.DataObject = "ddc_pro"
  95. ds.SetTransObject(sqlca)
  96. ll_cnt = ds.Retrieve()
  97. if ll_cnt>50 then ll_cnt=50
  98. ins_row = ll_cnt
  99. for i=1 to ll_cnt
  100. proid[i]=long(ds.object.proid[i])
  101. ins_proid[i] = proid[i]
  102. name[i]=ds.object.name[i]
  103. next
  104. //format="#,##0.##~tIF(SPT1=0,'#','#,##0.##')"
  105. for j= 1 to ll_cnt
  106. ls_s="plan" + string(j)
  107. dw_1.Modify(ls_s + '.Visible = 1')
  108. dw_1.modify(ls_s+".format=~"#,##0.##~~tIF("+ls_s+"=0,'#','#,##0.##')~"")
  109. ls_s1 = "item"+string(j)
  110. dw_1.Modify(ls_s1 + '.Visible = 1')
  111. dw_1.modify(ls_s1+".format=~"#,##0.##~~tIF("+ls_s1+"=0,'#','#,##0.##')~"")
  112. ls_s1 = "pro"+string(j)
  113. dw_1.Modify(ls_s1 + '.Visible = 1')
  114. dw_1.modify(ls_s1+".format=~"#,##0.##~~tIF("+ls_s1+"=0,'#','#,##0.##')~"")
  115. next
  116. string ls_modify
  117. for j= ll_cnt + 1 to 50
  118. ls_modify=''
  119. ls_s="plan" + string(j)
  120. dw_1.Modify(ls_s + '.Visible = 0')
  121. ls_modify = ls_modify + "destroy " + ls_s + '_t ~n ' + ls_s + '.visible=0 ~n '
  122. dw_1.Modify(ls_modify)
  123. ls_modify=''
  124. ls_s="item" + string(j)
  125. dw_1.Modify(ls_s + '.Visible = 0')
  126. ls_modify = ls_modify + "destroy " + ls_s + '_t ~n ' + ls_s + '.visible=0 ~n '
  127. dw_1.Modify(ls_modify)
  128. ls_modify=''
  129. ls_s="pro" + string(j)
  130. dw_1.Modify(ls_s + '.Visible = 0')
  131. ls_modify = ls_modify + "destroy " + ls_s + '_t ~n ' + ls_s + '.visible=0 ~n '
  132. dw_1.Modify(ls_modify)
  133. next
  134. // for j =1 to 50
  135. // ls_modify=''
  136. // ls_s="item" + string(j)
  137. // dw_1.Modify(ls_s + '.Visible = 0')
  138. // ls_modify = ls_modify + "destroy " + ls_s + '_t ~n ' + ls_s + '.visible=0 ~n '
  139. // dw_1.Modify(ls_modify)
  140. // next
  141. //设置标题
  142. string ls_temp=''
  143. string ls_long=''
  144. for j=1 to ll_cnt
  145. ls_long=string(long(len( name[j]) / 4) * 400 )
  146. if long(ls_long)<400 then ls_long='400'
  147. ls_temp='plan' + string(j)
  148. dw_1.Modify(ls_temp + '.width = ' + ls_long)
  149. dw_1.Modify(ls_temp +"_t.text = '" + name[j]+'~r计划数 '+ "'")
  150. ls_long=string(long(len( name[j]) / 4) * 400 )
  151. if long(ls_long)<400 then ls_long='400'
  152. ls_temp='item' + string(j)
  153. dw_1.Modify(ls_temp + '.width = ' + ls_long)
  154. dw_1.Modify(ls_temp +"_t.text = '" /*+ name[j]*/+'~r已确认完成数 '+ "'")
  155. ls_long=string(long(len( name[j]) / 4) * 400 )
  156. if long(ls_long)<400 then ls_long='400'
  157. ls_temp='pro' + string(j)
  158. dw_1.Modify(ls_temp + '.width = ' + ls_long)
  159. dw_1.Modify(ls_temp +"_t.text = '" /*+ name[j]*/+'~r未确认完成数 '+ "'")
  160. next
  161. FOR i=1 TO 1000
  162. dw_1.SetTabOrder (i, 0)
  163. NEXT
  164. wf_insert()
  165. //datastore dsss
  166. //dsss = Create datastore
  167. //dsss.DataObject = "ddd_rp_cb2"
  168. //dsss.SetTransObject(sqlca)
  169. //ll_cnt = dsss.Retrieve()
  170. //
  171. ////
  172. ////
  173. // wf_insert_cb2(0,dsss)//插入数据
  174. //
  175. // if cbx_addson.checked=true then//汇总子工程到总工程
  176. // llk_cnt=0
  177. // llk_sonbillid=llk_sonbillid_temp
  178. // wf_maketree(cur_projectid)
  179. // for j=1 to upperbound(llk_sonbillid)
  180. // update u_parm_pay set arg_projectid =:llk_sonbillid[j] where id=199;
  181. // commit;
  182. // ll_cnt =dsss.Retrieve()
  183. // //messagebox('sss',string(ll_cnt))
  184. // wf_insert_cb2(0,dsss)//插入数据
  185. // next
  186. // update u_parm_pay set arg_projectid =:cur_projectid where id=199;
  187. // commit;
  188. // end if
  189. ////
  190. ////
  191. //
  192. //
  193. //
  194. //
  195. // for i=0 to 99
  196. //
  197. // if dec(dw_1.Describe("Evaluate('compute_" + string(i) + "',0)"))=0 then
  198. // ls_s="item" + string(i + 1)
  199. // dw_1.Modify(ls_s + '.Visible = 0')
  200. // end if
  201. //next
  202. //
  203. //
  204. // dw_1.sort()
  205. //
  206. //
  207. //
  208. //
  209. //
  210. //
  211. //
  212. //
  213. //
  214. //
  215. //
  216. //
  217. //
  218. //
  219. //
  220. dw_1.SetRedraw(true)
  221. end subroutine
  222. public subroutine wf_insert ();Long i,j,z
  223. Long ll_mtrlid,CNT,ll_row,ll_cnt
  224. string tp_name,tp_name1,tp_name2
  225. long tp_mtrlid,tp_taskid,tp_printid,tp_proid
  226. string ls_dt,ls,ls_month,ls_cust
  227. IF dw_1.RowCount() <= 0 THEN RETURN
  228. IF dw_EX.RowCount() <= 0 THEN RETURN
  229. CNT = dw_EX.RowCount()
  230. //FOR i = 1 To dw_1.RowCount()
  231. // ll_mtrlid = dw_1.Object.mtrlid[i]
  232. //NEXT
  233. //
  234. // FOR i =1 TO dw_1.RowCount()
  235. // ll_mtrlid = dw_1.object.mtrlid[i]
  236. // for j =1 to 12
  237. // tp_name = 'spt'+String(j)
  238. // ls_cust = ins_sptid[]
  239. // ls = "dt="+ls_month+' and '+"mtrlid="+string(ll_mtrlid)
  240. // //messagebox("",ls)
  241. // dw_2.setfilter(ls)
  242. // dw_2.filter()
  243. // ld_a2 = 0
  244. // ld_avr= 0
  245. // IF dw_2.rowcount() = 1 then
  246. // ld_a2 = dw_2.object.a2[1]
  247. // ld_avr = dw_2.object.avr[1]
  248. // //messagebox("",ld_avr)
  249. // end if
  250. // dw_1.setitem(i,tp_name,ld_a2)
  251. // dw_1.setitem(i,tp_name1,ld_avr)
  252. // next
  253. // NEXT
  254. IF CNT <= 0 THEN RETURN
  255. FOR z = 1 To dw_1.RowCount()
  256. tp_mtrlid = dw_1.Object.mtrlid[z]
  257. tp_taskid= dw_1.Object.taskid[z]
  258. tp_printid = dw_1.Object.printid[z]
  259. FOR i = 1 To ins_row
  260. tp_proid = ins_proid[i]
  261. tp_name = 'plan'+String(i)
  262. tp_name1 = 'item'+String(i)
  263. tp_name2 = 'pro'+String(i)
  264. FOR j = 1 To cnt
  265. IF tp_mtrlid = dw_ex.Object.mtrlid[j] and tp_mtrlid = dw_ex.object.taskid[j] and tp_printid= dw_ex.object.printid[j] and tp_proid = dw_ex.object.proid[j] THEN
  266. IF Z =1 THEN
  267. dw_1.setitem(z,tp_name,dw_ex.Object.proqty[j])
  268. dw_1.setitem(z,tp_name1,dw_ex.Object.fqty[j])
  269. dw_1.setitem(z,tp_name2,dw_ex.Object.notfqty[j])
  270. ELSEIF tp_mtrlid = dw_1.Object.mtrlid[z - 1] and tp_taskid = dw_1.object.taskid[z - 1] and tp_printid= dw_1.object.printid[z - 1] then
  271. ELSE
  272. dw_1.setitem(z,tp_name,dw_ex.Object.proqty[j])
  273. dw_1.setitem(z,tp_name1,dw_ex.Object.fqty[j])
  274. dw_1.setitem(z,tp_name2,dw_ex.Object.notfqty[j])
  275. END IF
  276. END IF
  277. NEXT
  278. NEXT
  279. NEXT
  280. end subroutine
  281. on w_rp_order_ml.create
  282. int iCurrent
  283. call super::create
  284. this.ddlb_scid=create ddlb_scid
  285. this.st_5=create st_5
  286. this.ddlb_salestatus=create ddlb_salestatus
  287. this.st_6=create st_6
  288. this.ddlb_status=create ddlb_status
  289. this.st_7=create st_7
  290. this.ddlb_2=create ddlb_2
  291. this.st_1=create st_1
  292. this.ddlb_1=create ddlb_1
  293. this.mle_1=create mle_1
  294. this.cb_3=create cb_3
  295. this.dw_ex=create dw_ex
  296. iCurrent=UpperBound(this.Control)
  297. this.Control[iCurrent+1]=this.ddlb_scid
  298. this.Control[iCurrent+2]=this.st_5
  299. this.Control[iCurrent+3]=this.ddlb_salestatus
  300. this.Control[iCurrent+4]=this.st_6
  301. this.Control[iCurrent+5]=this.ddlb_status
  302. this.Control[iCurrent+6]=this.st_7
  303. this.Control[iCurrent+7]=this.ddlb_2
  304. this.Control[iCurrent+8]=this.st_1
  305. this.Control[iCurrent+9]=this.ddlb_1
  306. this.Control[iCurrent+10]=this.mle_1
  307. this.Control[iCurrent+11]=this.cb_3
  308. this.Control[iCurrent+12]=this.dw_ex
  309. end on
  310. on w_rp_order_ml.destroy
  311. call super::destroy
  312. destroy(this.ddlb_scid)
  313. destroy(this.st_5)
  314. destroy(this.ddlb_salestatus)
  315. destroy(this.st_6)
  316. destroy(this.ddlb_status)
  317. destroy(this.st_7)
  318. destroy(this.ddlb_2)
  319. destroy(this.st_1)
  320. destroy(this.ddlb_1)
  321. destroy(this.mle_1)
  322. destroy(this.cb_3)
  323. destroy(this.dw_ex)
  324. end on
  325. event close;call super::close;f_SetProfileString(SYS_empid, this.classname(), "status", string(cur_status))
  326. f_SetProfileString(SYS_empid, this.classname(), "scllflag", string(cur_scllflag))
  327. end event
  328. event open;EM_1.TEXT=string(today(),'yyyy-mm')+'-01'
  329. EM_2.TEXT=STRING(TODAY(),'YYYY-MM-DD')
  330. dw_ex.SetTransObject (sqlca)
  331. end event
  332. event ue_before_open;call super::ue_before_open;if_ue_retr=true
  333. if_ue_filter=true
  334. if_ue_sort=true
  335. if_ue_sentdataout=true
  336. end event
  337. type cb_func from w_publ_easyq`cb_func within w_rp_order_ml
  338. end type
  339. type cb_exit from w_publ_easyq`cb_exit within w_rp_order_ml
  340. end type
  341. type cb_2 from w_publ_easyq`cb_2 within w_rp_order_ml
  342. boolean bringtotop = true
  343. end type
  344. type cb_psetup from w_publ_easyq`cb_psetup within w_rp_order_ml
  345. boolean bringtotop = true
  346. end type
  347. type cb_1 from w_publ_easyq`cb_1 within w_rp_order_ml
  348. boolean bringtotop = true
  349. end type
  350. event cb_1::clicked;DateTime ld_firstdate,ld_enddate
  351. ld_firstdate = DateTime(Date(em_1.Text),Time(0))
  352. ld_enddate = DateTime(Date(em_2.Text),Time('23:59:59'))
  353. //IF ld_firstdate < sys_showsaledata_mindt THEN ld_firstdate = sys_showsaledata_mindt
  354. Int li_option_outrep
  355. IF sys_power_issuper THEN
  356. li_option_outrep = 0
  357. ELSE
  358. li_option_outrep = sys_option_outrep
  359. END IF
  360. dw_1.Retrieve(cur_scid_arr,cur_salestatus,cur_status,cur_scllflag,ld_firstdate,ld_enddate, sys_areaid,sys_user_outrep, li_option_outrep)
  361. //IF ddlb_1.text = '采购' then
  362. //
  363. //elseif ddlb_1.text ='外协' then
  364. //
  365. //elseif ddlb_1.text ='自制' then
  366. //
  367. //elseif ddlb_1.text ='领料明细' then
  368. //end if
  369. end event
  370. type st_3 from w_publ_easyq`st_3 within w_rp_order_ml
  371. integer x = 32
  372. integer y = 324
  373. end type
  374. type st_4 from w_publ_easyq`st_4 within w_rp_order_ml
  375. integer x = 750
  376. integer y = 324
  377. end type
  378. type em_1 from w_publ_easyq`em_1 within w_rp_order_ml
  379. integer x = 251
  380. integer y = 308
  381. integer taborder = 130
  382. end type
  383. type em_2 from w_publ_easyq`em_2 within w_rp_order_ml
  384. integer x = 841
  385. integer y = 308
  386. integer taborder = 140
  387. end type
  388. type ddlb_yl from w_publ_easyq`ddlb_yl within w_rp_order_ml
  389. integer x = 1627
  390. integer y = 12
  391. end type
  392. type cbx_yl from w_publ_easyq`cbx_yl within w_rp_order_ml
  393. integer x = 1417
  394. integer y = 12
  395. end type
  396. type dw_1 from w_publ_easyq`dw_1 within w_rp_order_ml
  397. integer y = 420
  398. integer width = 2743
  399. integer height = 1376
  400. string dataobject = "dw_rp_order_ml_mx_cg"
  401. end type
  402. event dw_1::doubleclicked;call super::doubleclicked;IF row > 0 THEN
  403. String ls_code
  404. Long ll_scid
  405. int li_thflag
  406. // ll_scid = THIS.Object.u_outware_scid[row]
  407. // ls_code = THIS.Object.u_outware_outwarecode[row]
  408. // li_thflag = THIS.Object.thflag[row]
  409. // f_open_win(ll_scid,ls_code)
  410. END IF
  411. end event
  412. event dw_1::retrieveend;call super::retrieveend;uf_read_profile_layout()
  413. end event
  414. event dw_1::constructor;call super::constructor;wf_replacedw()
  415. end event
  416. type sle_mtrl from w_publ_easyq`sle_mtrl within w_rp_order_ml
  417. end type
  418. type sle_cust from w_publ_easyq`sle_cust within w_rp_order_ml
  419. end type
  420. type st_mtrl from w_publ_easyq`st_mtrl within w_rp_order_ml
  421. end type
  422. type st_cust from w_publ_easyq`st_cust within w_rp_order_ml
  423. end type
  424. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_rp_order_ml
  425. boolean visible = true
  426. integer x = 1417
  427. end type
  428. type pb_em1 from w_publ_easyq`pb_em1 within w_rp_order_ml
  429. integer x = 667
  430. integer y = 308
  431. end type
  432. type pb_em2 from w_publ_easyq`pb_em2 within w_rp_order_ml
  433. integer x = 1253
  434. integer y = 308
  435. end type
  436. type pb_2 from w_publ_easyq`pb_2 within w_rp_order_ml
  437. integer x = 1362
  438. integer y = 308
  439. end type
  440. type cb_help from w_publ_easyq`cb_help within w_rp_order_ml
  441. end type
  442. type cb_copyself from w_publ_easyq`cb_copyself within w_rp_order_ml
  443. end type
  444. type gb_1 from w_publ_easyq`gb_1 within w_rp_order_ml
  445. end type
  446. type ln_bar from w_publ_easyq`ln_bar within w_rp_order_ml
  447. end type
  448. type ln_bar2 from w_publ_easyq`ln_bar2 within w_rp_order_ml
  449. end type
  450. type r_bar from w_publ_easyq`r_bar within w_rp_order_ml
  451. end type
  452. type ln_1 from w_publ_easyq`ln_1 within w_rp_order_ml
  453. end type
  454. type ln_2 from w_publ_easyq`ln_2 within w_rp_order_ml
  455. end type
  456. type ln_3 from w_publ_easyq`ln_3 within w_rp_order_ml
  457. end type
  458. type ln_4 from w_publ_easyq`ln_4 within w_rp_order_ml
  459. end type
  460. type ddlb_scid from uo_ddlb_scid within w_rp_order_ml
  461. integer x = 142
  462. integer y = 192
  463. integer width = 603
  464. integer height = 620
  465. integer taborder = 130
  466. boolean bringtotop = true
  467. end type
  468. event constructor;call super::constructor;cur_scid_arr = THIS.uo_scid_arr
  469. end event
  470. event selectionchanged;call super::selectionchanged;
  471. cur_scid_arr = THIS.uo_scid_arr
  472. cb_1.triggerevent(clicked!)
  473. end event
  474. type st_5 from statictext within w_rp_order_ml
  475. integer x = 5
  476. integer y = 208
  477. integer width = 128
  478. integer height = 48
  479. boolean bringtotop = true
  480. integer textsize = -9
  481. integer weight = 400
  482. fontcharset fontcharset = gb2312charset!
  483. fontpitch fontpitch = variable!
  484. string facename = "宋体"
  485. long textcolor = 33554432
  486. long backcolor = 134217739
  487. string text = "分部"
  488. alignment alignment = right!
  489. boolean focusrectangle = false
  490. end type
  491. type ddlb_salestatus from dropdownlistbox within w_rp_order_ml
  492. integer x = 2208
  493. integer y = 192
  494. integer width = 338
  495. integer height = 860
  496. integer taborder = 100
  497. boolean bringtotop = true
  498. integer textsize = -9
  499. integer weight = 400
  500. fontcharset fontcharset = gb2312charset!
  501. fontpitch fontpitch = variable!
  502. string facename = "宋体"
  503. long textcolor = 33554432
  504. string text = "在进行"
  505. boolean sorted = false
  506. boolean vscrollbar = true
  507. string item[] = {"[全部]","待审批","在进行","已暂停","已终止","已完成"}
  508. borderstyle borderstyle = stylelowered!
  509. end type
  510. event selectionchanged;choose case index
  511. case 1
  512. cur_salestatus= -1
  513. case 2 //待销售审批
  514. cur_salestatus=0
  515. case 3 //在进行
  516. cur_salestatus=1
  517. case 4 //'已暂停'
  518. cur_salestatus=2
  519. case 5 //'已终止'
  520. cur_salestatus=3
  521. case 6 //'已完成'
  522. cur_salestatus=5
  523. case else
  524. cur_salestatus= -1
  525. end choose
  526. cb_1.TriggerEvent(Clicked!)
  527. //parent.triggerevent("retrieve_pageretr")
  528. end event
  529. type st_6 from statictext within w_rp_order_ml
  530. integer x = 759
  531. integer y = 208
  532. integer width = 133
  533. integer height = 48
  534. boolean bringtotop = true
  535. integer textsize = -9
  536. integer weight = 400
  537. fontcharset fontcharset = gb2312charset!
  538. fontpitch fontpitch = variable!
  539. string facename = "宋体"
  540. long textcolor = 33554432
  541. long backcolor = 134217739
  542. string text = "状态"
  543. alignment alignment = center!
  544. boolean focusrectangle = false
  545. end type
  546. type ddlb_status from dropdownlistbox within w_rp_order_ml
  547. integer x = 910
  548. integer y = 192
  549. integer width = 361
  550. integer height = 496
  551. integer taborder = 110
  552. boolean bringtotop = true
  553. integer textsize = -9
  554. integer weight = 400
  555. fontcharset fontcharset = gb2312charset!
  556. fontpitch fontpitch = variable!
  557. string facename = "宋体"
  558. long textcolor = 33554432
  559. string text = "待审核"
  560. boolean sorted = false
  561. boolean vscrollbar = true
  562. string item[] = {"[全部]","待审核","在进行","自动完成","手动完成"}
  563. borderstyle borderstyle = stylelowered!
  564. end type
  565. event constructor;cur_status = Long(f_ProfileString(SYS_empid, parent.classname(), "status", "-1"))
  566. CHOOSE CASE cur_status
  567. CASE 0
  568. this.Text = "待审核"
  569. CASE 1
  570. this.Text = "在进行"
  571. CASE 5
  572. this.Text = "自动完成"
  573. CASE 6
  574. this.Text = "手动完成"
  575. CASE -1
  576. this.Text = "[全部]"
  577. END CHOOSE
  578. end event
  579. event selectionchanged;CHOOSE CASE Index
  580. CASE 1 //[全部]
  581. cur_status = -1
  582. CASE 2 //待审批
  583. cur_status = 0
  584. CASE 3 //在进行
  585. cur_status = 1
  586. CASE 4 //'自动完成'
  587. cur_status = 5
  588. CASE 5 //'手动完成'
  589. cur_status = 6
  590. CASE ELSE
  591. cur_status = -1
  592. END CHOOSE
  593. cb_1.TriggerEvent(Clicked!)
  594. end event
  595. type st_7 from statictext within w_rp_order_ml
  596. integer x = 1266
  597. integer y = 208
  598. integer width = 233
  599. integer height = 48
  600. boolean bringtotop = true
  601. integer textsize = -9
  602. integer weight = 400
  603. fontcharset fontcharset = gb2312charset!
  604. fontpitch fontpitch = variable!
  605. string facename = "宋体"
  606. long textcolor = 33554432
  607. long backcolor = 134217739
  608. string text = "用料审"
  609. alignment alignment = center!
  610. boolean focusrectangle = false
  611. end type
  612. type ddlb_2 from dropdownlistbox within w_rp_order_ml
  613. integer x = 1490
  614. integer y = 192
  615. integer width = 343
  616. integer height = 300
  617. integer taborder = 110
  618. boolean bringtotop = true
  619. integer textsize = -9
  620. integer weight = 400
  621. fontcharset fontcharset = gb2312charset!
  622. fontpitch fontpitch = variable!
  623. string facename = "宋体"
  624. long textcolor = 33554432
  625. string text = "[全部]"
  626. boolean sorted = false
  627. string item[] = {"[全部]","待用料审","已用料审"}
  628. borderstyle borderstyle = stylelowered!
  629. end type
  630. event constructor;cur_scllflag = Long(f_ProfileString(SYS_empid, parent.classname(), "scllflag", "-1"))
  631. CHOOSE CASE cur_scllflag
  632. CASE -1
  633. this.Text = "[全部]"
  634. CASE 0
  635. this.Text = "待用料审"
  636. CASE 1
  637. this.Text = "已用料审"
  638. END CHOOSE
  639. end event
  640. event selectionchanged;CHOOSE CASE Index
  641. CASE 1
  642. cur_scllflag = -1
  643. CASE 2
  644. cur_scllflag = 0
  645. CASE 3
  646. cur_scllflag = 1
  647. END CHOOSE
  648. cb_1.TriggerEvent(Clicked!)
  649. end event
  650. type st_1 from statictext within w_rp_order_ml
  651. integer x = 1861
  652. integer y = 204
  653. integer width = 343
  654. integer height = 48
  655. boolean bringtotop = true
  656. integer textsize = -9
  657. integer weight = 400
  658. fontcharset fontcharset = gb2312charset!
  659. fontpitch fontpitch = variable!
  660. string facename = "宋体"
  661. long textcolor = 33554432
  662. long backcolor = 134217739
  663. string text = "销售订单状态"
  664. alignment alignment = right!
  665. boolean focusrectangle = false
  666. end type
  667. type ddlb_1 from dropdownlistbox within w_rp_order_ml
  668. integer x = 2597
  669. integer y = 192
  670. integer width = 494
  671. integer height = 300
  672. integer taborder = 80
  673. boolean bringtotop = true
  674. integer textsize = -9
  675. integer weight = 400
  676. fontcharset fontcharset = gb2312charset!
  677. fontpitch fontpitch = variable!
  678. string facename = "宋体"
  679. long textcolor = 33554432
  680. string text = "采购"
  681. boolean sorted = false
  682. boolean vscrollbar = true
  683. string item[] = {"采购","外协","自制","领料明细"}
  684. borderstyle borderstyle = stylelowered!
  685. end type
  686. event selectionchanged;IF INDEX = 1 THEN
  687. DW_1.DATAOBJECT = 'dw_rp_order_ml_mx_cg'
  688. wf_replacedw()
  689. ELSEIF INDEX = 2 THEN
  690. DW_1.DATAOBJECT = 'dw_rp_order_ml_mx_wx'
  691. ELSEIF INDEX = 3 THEN
  692. DW_1.DATAOBJECT = 'dw_rp_order_ml_mx_zz'
  693. ELSEIF INDEX = 4 THEN
  694. DW_1.DATAOBJECT = 'dw_rp_order_ml_mx_llmx'
  695. END IF
  696. dw_1.SetTransObject (sqlca)
  697. cb_1.triggerevent(clicked!)
  698. end event
  699. type mle_1 from multilineedit within w_rp_order_ml
  700. boolean visible = false
  701. integer x = 2747
  702. integer y = 16
  703. integer width = 384
  704. integer height = 284
  705. integer taborder = 130
  706. boolean bringtotop = true
  707. integer textsize = -9
  708. integer weight = 400
  709. fontcharset fontcharset = gb2312charset!
  710. fontpitch fontpitch = variable!
  711. string facename = "宋体"
  712. long textcolor = 33554432
  713. boolean enabled = false
  714. boolean hscrollbar = true
  715. boolean vscrollbar = true
  716. borderstyle borderstyle = stylelowered!
  717. end type
  718. type cb_3 from commandbutton within w_rp_order_ml
  719. boolean visible = false
  720. integer x = 3182
  721. integer y = 84
  722. integer width = 411
  723. integer height = 84
  724. integer taborder = 80
  725. boolean bringtotop = true
  726. integer textsize = -9
  727. integer weight = 400
  728. fontcharset fontcharset = gb2312charset!
  729. fontpitch fontpitch = variable!
  730. string facename = "宋体"
  731. boolean enabled = false
  732. string text = "none"
  733. end type
  734. event clicked;string name1,name2,name3,name
  735. long i
  736. name1 = '0.00000 as plan'
  737. name2 = '0.00000 as item'
  738. name3 = '0.00000 as pro'
  739. for i = 1 to 50
  740. name1 = '0.00000 as plan'
  741. name2 = '0.00000 as item'
  742. name3 = '0.00000 as pro'
  743. name1 = name1+string(i)
  744. name2 = name2+string(i)
  745. name3 = name3+string(i)
  746. name = name +name1+'~r~n'+name2+'~r~n'+name3+'~r~n'
  747. next
  748. mle_1.text = name
  749. end event
  750. type dw_ex from datawindow within w_rp_order_ml
  751. boolean visible = false
  752. integer x = 2889
  753. integer y = 460
  754. integer width = 549
  755. integer height = 320
  756. integer taborder = 20
  757. boolean bringtotop = true
  758. boolean enabled = false
  759. string title = "none"
  760. string dataobject = "dw_rp_order_ml_procode_ex"
  761. boolean livescroll = true
  762. borderstyle borderstyle = stylelowered!
  763. end type