w_outware_sale_show_his_pricemx.srw 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452
  1. $PBExportHeader$w_outware_sale_show_his_pricemx.srw
  2. forward
  3. global type w_outware_sale_show_his_pricemx from w_publ_base
  4. end type
  5. type tab_1 from tab within w_outware_sale_show_his_pricemx
  6. end type
  7. type tabpage_2 from userobject within tab_1
  8. end type
  9. type dw_3 from u_dw_rbtnfilter within tabpage_2
  10. end type
  11. type tabpage_2 from userobject within tab_1
  12. dw_3 dw_3
  13. end type
  14. type tabpage_1 from userobject within tab_1
  15. end type
  16. type dw_1 from u_dw_rbtnfilter within tabpage_1
  17. end type
  18. type tabpage_1 from userobject within tab_1
  19. dw_1 dw_1
  20. end type
  21. type tab_1 from tab within w_outware_sale_show_his_pricemx
  22. tabpage_2 tabpage_2
  23. tabpage_1 tabpage_1
  24. end type
  25. end forward
  26. global type w_outware_sale_show_his_pricemx from w_publ_base
  27. integer width = 3214
  28. integer height = 2000
  29. string title = "查看客户销售价格历史"
  30. boolean maxbox = true
  31. boolean resizable = true
  32. event ue_fj_view ( )
  33. tab_1 tab_1
  34. end type
  35. global w_outware_sale_show_his_pricemx w_outware_sale_show_his_pricemx
  36. type variables
  37. datawindow dw_cbmx
  38. datawindow dw_mtrlware,dw_mtrlwaremx
  39. long ins_mtrlid
  40. string ins_mtrlcode
  41. long cur_outwareid
  42. long cur_printid
  43. long cur_mtrlwareid
  44. decimal cur_dec_uqty
  45. string cur_mtrlname
  46. long cur_scid
  47. long cur_cusid
  48. long cur_mtrlid
  49. string cur_status
  50. string cur_woodcode
  51. string cur_pcode
  52. string cur_plancode
  53. end variables
  54. forward prototypes
  55. public subroutine wf_retrieve (long arg_mtrlid)
  56. public subroutine wf_picretrieve (long arg_mtrlid)
  57. public subroutine wf_retrieve_cbmx ()
  58. public subroutine wf_retrieve_allmtrlware ()
  59. end prototypes
  60. event ue_fj_view();s_edit_index_tran s_pic
  61. Long ll_ConnectionID
  62. String arg_msg
  63. Long ls_row
  64. IF f_get_outerconnection(ll_ConnectionID,arg_msg) = 0 THEN
  65. MessageBox('提示','没有指定附件数据库连接'+arg_msg, Information!, OK! )
  66. RETURN
  67. END IF
  68. s_pic.f_long = 201 //物料资料 mainID
  69. s_pic.f_string = ins_mtrlcode
  70. s_pic.g_long = ins_mtrlid
  71. s_pic.d_long = 0 //relid_mx
  72. s_pic.d_string = '' //relcode_mx
  73. s_pic.e_long = 0 // scid
  74. s_pic.sqltransaction = sys_filedb_sqlca
  75. IF NOT f_power_ind(2154) THEN
  76. OpenWithParm(w_fj_bill_view,s_pic)
  77. ELSE
  78. OpenWithParm(w_fj_bill_mng,s_pic)
  79. END IF
  80. end event
  81. public subroutine wf_retrieve (long arg_mtrlid);
  82. IF tab_1.SelectedTab = 2 THEN
  83. dw_mtrlware.Retrieve(ins_mtrlid)
  84. ELSE
  85. wf_picretrieve(ins_mtrlid)
  86. END IF
  87. end subroutine
  88. public subroutine wf_picretrieve (long arg_mtrlid);//uo_fj_mng_billtype ls_uo_fjbt
  89. //ls_uo_fjbt = CREATE uo_fj_mng_billtype
  90. //
  91. //Long ll_fileid
  92. //
  93. //Blob ls_filedata
  94. //String arg_msg
  95. //Long ll_classid
  96. //String ls_filename
  97. //SetNull(ls_filedata)
  98. //
  99. //SELECT top 1 classid
  100. // INTO :ll_classid
  101. // FROM u_billpic_fileclass;
  102. //IF sqlca.SQLCode <> 0 THEN
  103. // SELECT top 1 classid
  104. // INTO :ll_classid
  105. // FROM U_FileClass
  106. // Where billtype = 201;
  107. // IF sqlca.SQLCode <> 0 THEN
  108. // ll_classid = 0
  109. // END IF
  110. //END IF
  111. //
  112. //
  113. //SELECT top 1 fileid,filename INTO :ll_fileid,:ls_filename
  114. // FROM u_file
  115. // WHERE relid = :arg_mtrlid
  116. // AND classid = :ll_classid
  117. // AND (filetype = 'bmp' OR filetype = 'rle' OR filetype = 'wmf'
  118. // OR filetype = 'tif' OR filetype = 'jpg' OR filetype = 'gif' OR filetype = 'jpeg')
  119. // USING sys_fileDB_sqlca;
  120. //IF sys_fileDB_sqlca.SQLCode <> 0 THEN
  121. // ll_fileid = 0
  122. //END IF
  123. //
  124. //IF ll_fileid > 0 THEN
  125. // IF ls_uo_fjbt.uf_getfjbolb_fromdb( ll_fileid, ls_filedata, sys_fileDB_sqlca, arg_msg) = 0 THEN
  126. // RETURN
  127. // END IF
  128. //ELSE
  129. // SetNull(ls_filedata)
  130. // ls_filename = ''
  131. //END IF
  132. //
  133. //tab_1.tabpage_2.uo_pic.OriginalSize = cbx_originalsize.Checked
  134. //tab_1.tabpage_2.uo_pic.of_showfile( ls_filedata,ls_filename, arg_msg)
  135. //tab_1.tabpage_2.uo_pic.of_setfilesize()
  136. //
  137. end subroutine
  138. public subroutine wf_retrieve_cbmx ();// //
  139. //
  140. //
  141. Long ll_row
  142. Long ll_scid,ll_outwareid,ll_printid
  143. Decimal dec_uqty
  144. dw_cbmx.Reset()
  145. //
  146. this.title='查看客户销售价格历史 ' + cur_mtrlname
  147. dw_cbmx.Retrieve(cur_scid,cur_cusid,cur_mtrlid,cur_status,cur_woodcode,cur_pcode,cur_plancode)
  148. wf_retrieve_allmtrlware()
  149. end subroutine
  150. public subroutine wf_retrieve_allmtrlware ();//
  151. dw_mtrlware.Reset()
  152. dw_mtrlware.Retrieve(cur_scid,-1,cur_mtrlid,cur_status,cur_woodcode,cur_pcode,cur_plancode)
  153. end subroutine
  154. on w_outware_sale_show_his_pricemx.create
  155. int iCurrent
  156. call super::create
  157. this.tab_1=create tab_1
  158. iCurrent=UpperBound(this.Control)
  159. this.Control[iCurrent+1]=this.tab_1
  160. end on
  161. on w_outware_sale_show_his_pricemx.destroy
  162. call super::destroy
  163. destroy(this.tab_1)
  164. end on
  165. event ue_before_open;call super::ue_before_open;dw_cbmx = tab_1.tabpage_2.dw_3
  166. dw_mtrlware = tab_1.tabpage_1.dw_1
  167. dw_mtrlware.settransobject(sqlca)
  168. dw_cbmx.settransobject(sqlca)
  169. end event
  170. event resize;call super::resize;tab_1.width = this.width - 11
  171. tab_1.height = this.height - 30
  172. dw_cbmx.width = tab_1.tabpage_1.width - 40
  173. dw_cbmx.height = tab_1.tabpage_2.height - 140
  174. dw_mtrlware.width = tab_1.tabpage_1.width - 40
  175. dw_mtrlware.height = tab_1.tabpage_1.height - 140
  176. end event
  177. event open;call super::open;
  178. s_edit_index_tran INS_RT_STRU //传递参数使用
  179. INS_RT_STRU = Message.PowerObjectParm
  180. cur_scid=INS_RT_STRU.b_long
  181. cur_cusid=INS_RT_STRU.c_long
  182. cur_mtrlid=INS_RT_STRU.d_long
  183. cur_status=INS_RT_STRU.c_string
  184. cur_woodcode=INS_RT_STRU.d_string
  185. cur_pcode=INS_RT_STRU.e_string
  186. cur_plancode=INS_RT_STRU.f_string
  187. cur_mtrlname=INS_RT_STRU.b_string
  188. wf_retrieve_cbmx()
  189. end event
  190. type cb_func from w_publ_base`cb_func within w_outware_sale_show_his_pricemx
  191. boolean visible = false
  192. end type
  193. type cb_exit from w_publ_base`cb_exit within w_outware_sale_show_his_pricemx
  194. boolean visible = false
  195. integer x = 1925
  196. integer y = 1288
  197. end type
  198. type tab_1 from tab within w_outware_sale_show_his_pricemx
  199. integer width = 3159
  200. integer height = 1860
  201. integer taborder = 30
  202. boolean bringtotop = true
  203. integer textsize = -9
  204. integer weight = 400
  205. fontcharset fontcharset = gb2312charset!
  206. fontpitch fontpitch = variable!
  207. string facename = "宋体"
  208. long backcolor = 134217739
  209. boolean raggedright = true
  210. boolean focusonbuttondown = true
  211. integer selectedtab = 1
  212. tabpage_2 tabpage_2
  213. tabpage_1 tabpage_1
  214. end type
  215. on tab_1.create
  216. this.tabpage_2=create tabpage_2
  217. this.tabpage_1=create tabpage_1
  218. this.Control[]={this.tabpage_2,&
  219. this.tabpage_1}
  220. end on
  221. on tab_1.destroy
  222. destroy(this.tabpage_2)
  223. destroy(this.tabpage_1)
  224. end on
  225. event selectionchanged;//wf_retrieve(ins_mtrlid)
  226. //
  227. IF tab_1.SelectedTab = 1 THEN
  228. ELSE
  229. wf_retrieve_allmtrlware()
  230. END IF
  231. end event
  232. event constructor;//long ll_tab
  233. //
  234. //ll_tab = long(ProfileString(SYS_INIFILENAME, "w_fj_fileopen", "SelectedTab", "1"))
  235. //tab_1.SelectTab(ll_tab)
  236. end event
  237. type tabpage_2 from userobject within tab_1
  238. integer x = 18
  239. integer y = 96
  240. integer width = 3122
  241. integer height = 1748
  242. long backcolor = 134217739
  243. string text = "本单客户"
  244. long tabtextcolor = 33554432
  245. long tabbackcolor = 134217739
  246. long picturemaskcolor = 536870912
  247. dw_3 dw_3
  248. end type
  249. on tabpage_2.create
  250. this.dw_3=create dw_3
  251. this.Control[]={this.dw_3}
  252. end on
  253. on tabpage_2.destroy
  254. destroy(this.dw_3)
  255. end on
  256. type dw_3 from u_dw_rbtnfilter within tabpage_2
  257. integer width = 3113
  258. integer height = 1728
  259. integer taborder = 30
  260. string dataobject = "dw_outware_sale_show_his_pricemx"
  261. boolean hscrollbar = true
  262. boolean vscrollbar = true
  263. boolean hsplitscroll = true
  264. borderstyle borderstyle = stylebox!
  265. boolean rbutton_filter_use = true
  266. boolean rbutton_setposition_use = true
  267. boolean titleclick_sort_use = true
  268. end type
  269. event rowfocuschanged;call super::rowfocuschanged;IF currentrow <= 0 THEN RETURN
  270. THIS.SelectRow(0,FALSE)
  271. THIS.SelectRow(currentrow,TRUE)
  272. end event
  273. event doubleclicked;call super::doubleclicked;IF row > 0 THEN
  274. String ls_code
  275. ls_code = THIS.Object.u_outware_outwarecode[row]
  276. f_open_win(cur_scid,ls_code)
  277. END IF
  278. end event
  279. type tabpage_1 from userobject within tab_1
  280. integer x = 18
  281. integer y = 96
  282. integer width = 3122
  283. integer height = 1748
  284. long backcolor = 134217739
  285. string text = "所有客户"
  286. long tabtextcolor = 33554432
  287. long tabbackcolor = 134217739
  288. long picturemaskcolor = 536870912
  289. dw_1 dw_1
  290. end type
  291. on tabpage_1.create
  292. this.dw_1=create dw_1
  293. this.Control[]={this.dw_1}
  294. end on
  295. on tabpage_1.destroy
  296. destroy(this.dw_1)
  297. end on
  298. type dw_1 from u_dw_rbtnfilter within tabpage_1
  299. integer width = 3113
  300. integer height = 1764
  301. integer taborder = 20
  302. string dataobject = "dw_outware_sale_show_his_pricemx_allcust"
  303. boolean hscrollbar = true
  304. boolean vscrollbar = true
  305. boolean livescroll = false
  306. borderstyle borderstyle = stylebox!
  307. boolean rbutton_filter_use = true
  308. boolean rbutton_setposition_use = true
  309. boolean titleclick_sort_use = true
  310. end type
  311. event rowfocuschanged;call super::rowfocuschanged;IF currentrow <= 0 THEN RETURN
  312. THIS.SelectRow(0,FALSE)
  313. THIS.SelectRow(currentrow,TRUE)
  314. end event
  315. event doubleclicked;call super::doubleclicked;IF row > 0 THEN
  316. String ls_code
  317. ls_code = THIS.Object.u_outware_outwarecode[row]
  318. f_open_win(cur_scid,ls_code)
  319. END IF
  320. end event