w_mtrldef_edit_cost_cmp.srw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473
  1. $PBExportHeader$w_mtrldef_edit_cost_cmp.srw
  2. forward
  3. global type w_mtrldef_edit_cost_cmp from w_publ_easyq
  4. end type
  5. type tv_1 from uo_tv_mtrltype within w_mtrldef_edit_cost_cmp
  6. end type
  7. type ddlb_mtrlprp from uo_ddlb_mtrlorigin within w_mtrldef_edit_cost_cmp
  8. end type
  9. type cbx_1 from checkbox within w_mtrldef_edit_cost_cmp
  10. end type
  11. end forward
  12. global type w_mtrldef_edit_cost_cmp from w_publ_easyq
  13. integer width = 3675
  14. string title = "产品计划价统计历史查询"
  15. event ue_p_unit_buy ( )
  16. event ue_p_unit_scll ( )
  17. event ue_p_unit_sale ( )
  18. event ue_p_rate_buy ( )
  19. event ue_p_rate_scll ( )
  20. event ue_p_rate_sale ( )
  21. event ue_p_unit ( )
  22. event ue_p_mtrlorigin ( )
  23. event ue_p_mtrlprp ( )
  24. tv_1 tv_1
  25. ddlb_mtrlprp ddlb_mtrlprp
  26. cbx_1 cbx_1
  27. end type
  28. global w_mtrldef_edit_cost_cmp w_mtrldef_edit_cost_cmp
  29. type variables
  30. int cur_mtrlorigin = 0
  31. string ls_handtype = ''
  32. uo_mtrldef uo_mtrl
  33. long cmpid
  34. s_edit_index_tran s_tran
  35. end variables
  36. event ue_p_unit_buy();IF MessageBox('提示','是否要确定要批设定辅单位1', question!, YesNo!, 2) = 2 THEN
  37. RETURN
  38. END IF
  39. Long ll_i
  40. dw_1.AcceptText()
  41. dw_1.SetRedraw(FALSE)
  42. FOR ll_i = 1 TO dw_1.RowCount()
  43. IF ll_i = 1 THEN CONTINUE
  44. dw_1.Object.unit_buy[ll_i] = dw_1.Object.unit_buy[1]
  45. NEXT
  46. dw_1.SetRedraw(TRUE)
  47. end event
  48. event ue_p_unit_scll();IF MessageBox('提示','是否要确定要批设定辅单位2', question!, YesNo!, 2) = 2 THEN
  49. RETURN
  50. END IF
  51. Long ll_i
  52. dw_1.AcceptText()
  53. dw_1.SetRedraw(FALSE)
  54. FOR ll_i = 1 TO dw_1.RowCount()
  55. IF ll_i = 1 THEN CONTINUE
  56. dw_1.Object.unit_scll[ll_i] = dw_1.Object.unit_scll[1]
  57. NEXT
  58. dw_1.SetRedraw(TRUE)
  59. end event
  60. event ue_p_unit_sale();IF MessageBox('提示','是否要确定要批设定辅单位3', question!, YesNo!, 2) = 2 THEN
  61. RETURN
  62. END IF
  63. Long ll_i
  64. dw_1.AcceptText()
  65. dw_1.SetRedraw(FALSE)
  66. FOR ll_i = 1 TO dw_1.RowCount()
  67. IF ll_i = 1 THEN CONTINUE
  68. dw_1.Object.unit_sale[ll_i] = dw_1.Object.unit_sale[1]
  69. NEXT
  70. dw_1.SetRedraw(TRUE)
  71. end event
  72. event ue_p_rate_buy();IF MessageBox('提示','是否要确定要批设定转换率1', question!, YesNo!, 2) = 2 THEN
  73. RETURN
  74. END IF
  75. Long ll_i
  76. dw_1.AcceptText()
  77. dw_1.SetRedraw(FALSE)
  78. FOR ll_i = 1 TO dw_1.RowCount()
  79. IF ll_i = 1 THEN CONTINUE
  80. dw_1.Object.rate_buy[ll_i] = dw_1.Object.rate_buy[1]
  81. NEXT
  82. dw_1.SetRedraw(TRUE)
  83. end event
  84. event ue_p_rate_scll();IF MessageBox('提示','是否要确定要批设定转换率2', question!, YesNo!, 2) = 2 THEN
  85. RETURN
  86. END IF
  87. Long ll_i
  88. dw_1.AcceptText()
  89. dw_1.SetRedraw(FALSE)
  90. FOR ll_i = 1 TO dw_1.RowCount()
  91. IF ll_i = 1 THEN CONTINUE
  92. dw_1.Object.rate_scll[ll_i] = dw_1.Object.rate_scll[1]
  93. NEXT
  94. dw_1.SetRedraw(TRUE)
  95. end event
  96. event ue_p_rate_sale();IF MessageBox('提示','是否要确定要批设定转换率3', question!, YesNo!, 2) = 2 THEN
  97. RETURN
  98. END IF
  99. Long ll_i
  100. dw_1.AcceptText()
  101. dw_1.SetRedraw(FALSE)
  102. FOR ll_i = 1 TO dw_1.RowCount()
  103. IF ll_i = 1 THEN CONTINUE
  104. dw_1.Object.rate_sale[ll_i] = dw_1.Object.rate_sale[1]
  105. NEXT
  106. dw_1.SetRedraw(TRUE)
  107. end event
  108. event ue_p_unit();IF MessageBox('提示','是否要确定要批设定单位', question!, YesNo!, 2) = 2 THEN
  109. RETURN
  110. END IF
  111. Long ll_i
  112. dw_1.AcceptText()
  113. dw_1.SetRedraw(FALSE)
  114. FOR ll_i = 1 TO dw_1.RowCount()
  115. IF ll_i = 1 THEN CONTINUE
  116. dw_1.Object.unit[ll_i] = dw_1.Object.unit[1]
  117. NEXT
  118. dw_1.SetRedraw(TRUE)
  119. end event
  120. event ue_p_mtrlorigin();IF MessageBox('提示','是否要确定要批设定物料来源', question!, YesNo!, 2) = 2 THEN
  121. RETURN
  122. END IF
  123. Long ll_i
  124. Long ll_mtrlorigin
  125. s_mtrlorigin rls_mtrlorigin
  126. Open(w_mtrlorigin_ch)
  127. rls_mtrlorigin = Message.PowerObjectParm
  128. IF rls_mtrlorigin.mtrloriginid >= 0 THEN
  129. dw_1.AcceptText()
  130. dw_1.SetRedraw(FALSE)
  131. FOR ll_i = 1 TO dw_1.RowCount()
  132. IF dw_1.Object.isselect[ll_i] = 1 THEN
  133. dw_1.Object.mtrlorigin[ll_i] = rls_mtrlorigin.mtrloriginid
  134. END IF
  135. NEXT
  136. dw_1.SetRedraw(TRUE)
  137. END IF
  138. end event
  139. event ue_p_mtrlprp();IF MessageBox('提示','是否要确定要批设定物料属性', question!, YesNo!, 2) = 2 THEN
  140. RETURN
  141. END IF
  142. Long ll_i
  143. s_mtrlprp rls_mtrlprp
  144. Open(w_mtrlprp_ch)
  145. rls_mtrlprp = Message.PowerObjectParm
  146. IF rls_mtrlprp.mtrlprpid >= 0 THEN
  147. dw_1.AcceptText()
  148. dw_1.SetRedraw(FALSE)
  149. FOR ll_i = 1 TO dw_1.RowCount()
  150. IF dw_1.Object.isselect[ll_i] = 1 THEN
  151. dw_1.Object.mtrlprp[ll_i] = rls_mtrlprp.mtrlprpid
  152. END IF
  153. NEXT
  154. dw_1.SetRedraw(TRUE)
  155. END IF
  156. end event
  157. on w_mtrldef_edit_cost_cmp.create
  158. int iCurrent
  159. call super::create
  160. this.tv_1=create tv_1
  161. this.ddlb_mtrlprp=create ddlb_mtrlprp
  162. this.cbx_1=create cbx_1
  163. iCurrent=UpperBound(this.Control)
  164. this.Control[iCurrent+1]=this.tv_1
  165. this.Control[iCurrent+2]=this.ddlb_mtrlprp
  166. this.Control[iCurrent+3]=this.cbx_1
  167. end on
  168. on w_mtrldef_edit_cost_cmp.destroy
  169. call super::destroy
  170. destroy(this.tv_1)
  171. destroy(this.ddlb_mtrlprp)
  172. destroy(this.cbx_1)
  173. end on
  174. event resize;ln_bar.endx = this.width
  175. ln_bar2.endx = this.width
  176. ln_1.endx = this.width
  177. ln_2.endx = this.width
  178. ln_3.endx = this.width
  179. ln_4.endx = this.width
  180. r_bar.width = this.width
  181. dw_1.height=this.height - dw_1.y - 150
  182. tv_1.height=this.height - tv_1.y - 150
  183. dw_1.width=this.width - dw_1.x - 40
  184. end event
  185. event open;call super::open;s_tran = Message.PowerObjectParm
  186. cmpid = s_tran.b_long
  187. cb_1.triggerevent(clicked!)
  188. end event
  189. event ue_before_open;call super::ue_before_open;if_ue_retr=true
  190. if_ue_filter=true
  191. if_ue_sort=true
  192. if_ue_sentdataout=true
  193. end event
  194. event close;call super::close;destroy uo_mtrl
  195. end event
  196. type cb_func from w_publ_easyq`cb_func within w_mtrldef_edit_cost_cmp
  197. end type
  198. type cb_exit from w_publ_easyq`cb_exit within w_mtrldef_edit_cost_cmp
  199. integer x = 859
  200. end type
  201. type cb_2 from w_publ_easyq`cb_2 within w_mtrldef_edit_cost_cmp
  202. integer x = 558
  203. integer taborder = 100
  204. boolean bringtotop = true
  205. end type
  206. type cb_psetup from w_publ_easyq`cb_psetup within w_mtrldef_edit_cost_cmp
  207. integer x = 302
  208. boolean bringtotop = true
  209. end type
  210. type cb_1 from w_publ_easyq`cb_1 within w_mtrldef_edit_cost_cmp
  211. boolean bringtotop = true
  212. end type
  213. event cb_1::clicked;call super::clicked;Int li_isuse
  214. IF cbx_1.Checked THEN
  215. li_isuse = 1
  216. ELSE
  217. li_isuse = -1
  218. END IF
  219. dw_1.Retrieve(cmpid,cur_mtrlorigin,ls_handtype,li_isuse)
  220. end event
  221. type st_3 from w_publ_easyq`st_3 within w_mtrldef_edit_cost_cmp
  222. boolean visible = false
  223. integer x = 1641
  224. integer y = 648
  225. end type
  226. type st_4 from w_publ_easyq`st_4 within w_mtrldef_edit_cost_cmp
  227. boolean visible = false
  228. integer x = 1655
  229. integer y = 552
  230. end type
  231. type em_1 from w_publ_easyq`em_1 within w_mtrldef_edit_cost_cmp
  232. boolean visible = false
  233. integer x = 1221
  234. integer y = 480
  235. integer taborder = 110
  236. end type
  237. type em_2 from w_publ_easyq`em_2 within w_mtrldef_edit_cost_cmp
  238. boolean visible = false
  239. integer x = 1737
  240. integer y = 356
  241. integer taborder = 140
  242. end type
  243. type ddlb_yl from w_publ_easyq`ddlb_yl within w_mtrldef_edit_cost_cmp
  244. integer x = 1275
  245. integer y = 32
  246. end type
  247. type cbx_yl from w_publ_easyq`cbx_yl within w_mtrldef_edit_cost_cmp
  248. integer x = 1070
  249. integer y = 36
  250. end type
  251. type dw_1 from w_publ_easyq`dw_1 within w_mtrldef_edit_cost_cmp
  252. integer x = 919
  253. integer y = 288
  254. integer width = 3589
  255. integer height = 1984
  256. string dataobject = "dw_mtrldef_costmx_cmp"
  257. end type
  258. event dw_1::rowfocuschanged;IF currentrow > 0 THEN
  259. THIS.SelectRow(0,FALSE)
  260. THIS.SelectRow(currentrow,TRUE)
  261. END IF
  262. end event
  263. event dw_1::clicked;call super::clicked;IF row <=0 THEN RETURN
  264. this.selectrow(0,false)
  265. this.selectrow(row,true)
  266. this.setrow(row)
  267. end event
  268. type sle_mtrl from w_publ_easyq`sle_mtrl within w_mtrldef_edit_cost_cmp
  269. end type
  270. type sle_cust from w_publ_easyq`sle_cust within w_mtrldef_edit_cost_cmp
  271. end type
  272. type st_mtrl from w_publ_easyq`st_mtrl within w_mtrldef_edit_cost_cmp
  273. end type
  274. type st_cust from w_publ_easyq`st_cust within w_mtrldef_edit_cost_cmp
  275. end type
  276. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_mtrldef_edit_cost_cmp
  277. end type
  278. type pb_em1 from w_publ_easyq`pb_em1 within w_mtrldef_edit_cost_cmp
  279. boolean visible = false
  280. end type
  281. type pb_em2 from w_publ_easyq`pb_em2 within w_mtrldef_edit_cost_cmp
  282. boolean visible = false
  283. end type
  284. type pb_2 from w_publ_easyq`pb_2 within w_mtrldef_edit_cost_cmp
  285. boolean visible = false
  286. end type
  287. type cb_help from w_publ_easyq`cb_help within w_mtrldef_edit_cost_cmp
  288. integer x = 709
  289. end type
  290. type cb_copyself from w_publ_easyq`cb_copyself within w_mtrldef_edit_cost_cmp
  291. boolean visible = false
  292. integer x = 411
  293. end type
  294. type gb_1 from w_publ_easyq`gb_1 within w_mtrldef_edit_cost_cmp
  295. integer x = 1463
  296. integer y = 476
  297. integer width = 599
  298. end type
  299. type ln_bar from w_publ_easyq`ln_bar within w_mtrldef_edit_cost_cmp
  300. end type
  301. type ln_bar2 from w_publ_easyq`ln_bar2 within w_mtrldef_edit_cost_cmp
  302. end type
  303. type r_bar from w_publ_easyq`r_bar within w_mtrldef_edit_cost_cmp
  304. integer x = 3374
  305. integer y = 32
  306. end type
  307. type ln_1 from w_publ_easyq`ln_1 within w_mtrldef_edit_cost_cmp
  308. integer beginy = 280
  309. integer endy = 280
  310. end type
  311. type ln_2 from w_publ_easyq`ln_2 within w_mtrldef_edit_cost_cmp
  312. integer beginy = 284
  313. integer endy = 284
  314. end type
  315. type ln_3 from w_publ_easyq`ln_3 within w_mtrldef_edit_cost_cmp
  316. boolean visible = false
  317. end type
  318. type ln_4 from w_publ_easyq`ln_4 within w_mtrldef_edit_cost_cmp
  319. boolean visible = false
  320. end type
  321. type tv_1 from uo_tv_mtrltype within w_mtrldef_edit_cost_cmp
  322. integer y = 288
  323. integer width = 905
  324. integer height = 1984
  325. integer taborder = 70
  326. boolean bringtotop = true
  327. integer textsize = -9
  328. fontcharset fontcharset = gb2312charset!
  329. fontfamily fontfamily = anyfont!
  330. string facename = "宋体"
  331. end type
  332. event selectionchanged;call super::selectionchanged;
  333. IF dw_edit_mode THEN
  334. IF dw_1.GetRow() <= 0 THEN RETURN
  335. IF THIS.uo_cur_info.sonflag = 1 THEN
  336. dw_1.SetRedraw(FALSE)
  337. dw_1.Object.mtrltypeid[dw_1.GetRow()] = THIS.uo_cur_info.mtrltypeid
  338. dw_1.Object.mtrltype[dw_1.GetRow()] = THIS.uo_cur_info.mtrltype
  339. dw_1.Object.handtype[dw_1.GetRow()] = THIS.uo_cur_info.handtype
  340. dw_1.Object.mtrlorigin[dw_1.GetRow()] = THIS.uo_cur_info.mtrlprp
  341. dw_1.SetRedraw(TRUE)
  342. END IF
  343. ELSE
  344. ls_handtype = THIS.uo_cur_info.handtype
  345. ls_handtype = ls_handtype + '%'
  346. cb_1.TriggerEvent(Clicked!)
  347. END IF
  348. end event
  349. type ddlb_mtrlprp from uo_ddlb_mtrlorigin within w_mtrldef_edit_cost_cmp
  350. integer x = 14
  351. integer y = 188
  352. integer width = 517
  353. integer height = 480
  354. integer taborder = 50
  355. boolean bringtotop = true
  356. end type
  357. event selectionchanged;call super::selectionchanged;cur_mtrlorigin = this.uo_mtrlorigin
  358. cb_1.triggerevent(clicked!)
  359. end event
  360. type cbx_1 from checkbox within w_mtrldef_edit_cost_cmp
  361. integer x = 549
  362. integer y = 196
  363. integer width = 402
  364. integer height = 60
  365. boolean bringtotop = true
  366. integer textsize = -9
  367. integer weight = 400
  368. fontcharset fontcharset = gb2312charset!
  369. fontpitch fontpitch = variable!
  370. string facename = "宋体"
  371. long textcolor = 33554432
  372. long backcolor = 134217739
  373. string text = "只显示有效"
  374. boolean checked = true
  375. end type
  376. event clicked;cb_1.triggerevent(clicked!)
  377. end event