w_saletaskmx_fileadd_p.srw 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768
  1. $PBExportHeader$w_saletaskmx_fileadd_p.srw
  2. forward
  3. global type w_saletaskmx_fileadd_p from window
  4. end type
  5. type cb_save from uo_imflatbutton within w_saletaskmx_fileadd_p
  6. end type
  7. type dw_fj_saletaskmx from u_dw_rbtnfilter within w_saletaskmx_fileadd_p
  8. end type
  9. type cb_del from uo_imflatbutton within w_saletaskmx_fileadd_p
  10. end type
  11. type dw_fj_mtrl from u_dw_rbtnfilter within w_saletaskmx_fileadd_p
  12. end type
  13. type dw_fileclass_saletaskmx from u_dw_rbtnfilter within w_saletaskmx_fileadd_p
  14. end type
  15. type dw_fileclass_mtrl from u_dw_rbtnfilter within w_saletaskmx_fileadd_p
  16. end type
  17. type cb_exit from uo_imflatbutton within w_saletaskmx_fileadd_p
  18. end type
  19. type cb_edit from uo_imflatbutton within w_saletaskmx_fileadd_p
  20. end type
  21. type dw_saletaskmx from u_dw_rbtnfilter within w_saletaskmx_fileadd_p
  22. end type
  23. type r_bar from rectangle within w_saletaskmx_fileadd_p
  24. end type
  25. type ln_bar from line within w_saletaskmx_fileadd_p
  26. end type
  27. type ln_bar2 from line within w_saletaskmx_fileadd_p
  28. end type
  29. end forward
  30. global type w_saletaskmx_fileadd_p from window
  31. integer width = 4160
  32. integer height = 2496
  33. boolean titlebar = true
  34. string title = "订单明细附件批量上传"
  35. boolean controlmenu = true
  36. boolean minbox = true
  37. boolean maxbox = true
  38. windowtype windowtype = popup!
  39. windowstate windowstate = maximized!
  40. long backcolor = 67108864
  41. string icon = "AppIcon!"
  42. boolean clientedge = true
  43. event ue_selectfile ( )
  44. event ue_save ( )
  45. event retrieve_file ( )
  46. event retrieve_file_saletaskmx ( )
  47. event ue_del ( )
  48. cb_save cb_save
  49. dw_fj_saletaskmx dw_fj_saletaskmx
  50. cb_del cb_del
  51. dw_fj_mtrl dw_fj_mtrl
  52. dw_fileclass_saletaskmx dw_fileclass_saletaskmx
  53. dw_fileclass_mtrl dw_fileclass_mtrl
  54. cb_exit cb_exit
  55. cb_edit cb_edit
  56. dw_saletaskmx dw_saletaskmx
  57. r_bar r_bar
  58. ln_bar ln_bar
  59. ln_bar2 ln_bar2
  60. end type
  61. global w_saletaskmx_fileadd_p w_saletaskmx_fileadd_p
  62. type variables
  63. long ins_scid
  64. long ins_taskid
  65. string ins_taskcode
  66. long ins_billtype = 9102 //订单明细
  67. long ins_billtype_mtrl = 201 //物料
  68. transaction Transaction_pic
  69. long ins_fileid
  70. Blob ins_filedata
  71. string ins_filename
  72. uo_fileview obj_fileview
  73. end variables
  74. forward prototypes
  75. public function long wf_fileopen (long arg_fileid)
  76. public function integer wf_setfile (blob arg_filedata, string arg_filename)
  77. end prototypes
  78. event ue_selectfile();////ue_selectfile
  79. long ll_row
  80. string ls_col
  81. ll_row = dw_saletaskmx.GetRow()
  82. if ll_row <= 0 then return
  83. ls_col = dw_saletaskmx.GetColumnName()
  84. boolean lb_selectfile
  85. lb_selectfile = ls_col = 'filename1' OR ls_col = 'filename2' OR ls_col = 'filename3'
  86. if not lb_selectfile then return
  87. String Pathname,Filename,FileType
  88. Integer i
  89. FileType = ''
  90. FileType = '所有文件(*.*),*.*,'
  91. // FileType += "配置文件(*.ini), *.ini,"
  92. FileType += "Zip压缩文件(*.Zip),*.Zip,"
  93. FileType += "RAR压缩文件(*.rar),*.rar,"
  94. // FileType += "XML文件(*.xml),*.xml,"
  95. FileType += "文本文件(*.txt),*.txt,"
  96. FileType += "Excel模版(*.xlt),*.xlt,"
  97. // FileType += "Excel文档(*.xls),*.xls,"
  98. // FileType += "Word模版(*.dot),*.dot,"
  99. FileType += "Word文档(*.doc),*.doc,"
  100. FileType += "JPG(*.JPG),*.JPG,"
  101. FileType += "位图文件(*.bmp),*.bmp,"
  102. FileType += "GIF文件(*.GIF),*.GIF"
  103. i = GetFileOpenName("请选择文件", Pathname,Filename, "All", FileType)
  104. IF i = 1 AND Trim(Pathname) <> '' AND Trim(Filename) <> "" THEN
  105. IF Pathname = '' OR NOT FileExists(Pathname) THEN
  106. MessageBox('系统提示','请选择文件!')
  107. RETURN
  108. END IF
  109. if FileLength(Pathname)/1024 > 10240 then
  110. messagebox('限制','附件文件大小不得大于10M')
  111. return
  112. end if
  113. dw_saletaskmx.SetItem(ll_row, ls_col, Pathname)
  114. END IF
  115. end event
  116. event ue_save();s_fileinfo s_file
  117. Long ll_row
  118. Long ll_i, ll_pos,rt_fileid, ll_cnt = 0, ll_printid//, ll_fileid
  119. String ls_filepath
  120. Int rslt = 1
  121. String ls_msg = ''
  122. String arg_msg
  123. String ls_DisPlayName, ls_FileName, ls_FileType
  124. uo_fj_mng_billtype ls_uo_btfj
  125. ls_uo_btfj = Create uo_fj_mng_billtype
  126. IF dw_fileclass_mtrl.GetRow() <= 0 THEN
  127. ls_msg = '请选择附件分类-物料'
  128. GOTO ext
  129. END IF
  130. IF dw_fileclass_saletaskmx.GetRow() <= 0 THEN
  131. ls_msg = '请选择附件分类-订单明细'
  132. GOTO ext
  133. END IF
  134. ll_row = dw_saletaskmx.GetRow()
  135. IF ll_row <= 0 THEN
  136. ls_msg = '请选择订单明细'
  137. GOTO ext
  138. END IF
  139. ll_printid = dw_saletaskmx.Object.u_saletaskmx_printid[ll_row]
  140. s_file.classid = dw_fileclass_saletaskmx.Object.classid[dw_fileclass_saletaskmx.GetRow()]
  141. s_file.fileid = 0
  142. s_file.Filename = ''
  143. s_file.dscrp = ''
  144. s_file.encrypted = 0
  145. s_file.compressed = 0
  146. s_file.FileType = ''
  147. s_file.relid = ins_taskid
  148. s_file.relcode = ins_taskcode
  149. s_file.billtype = ins_billtype
  150. s_file.relid_mx = ll_printid
  151. s_file.scid = ins_scid
  152. s_file.SqlTransaction = Transaction_pic
  153. s_file.fileid = 0
  154. //ll_fileid = dw_fj_mtrl.object.fileid[dw_fj_mtrl.getrow]
  155. SELECT DisPlayName, FileName, FileType
  156. INTO :ls_DisPlayName, :ls_FileName, :ls_FileType
  157. FROM u_File
  158. WHERE Fileid = :ins_fileid
  159. Using Transaction_pic;
  160. IF Transaction_pic.SQLCode <> 0 THEN
  161. rslt = 0
  162. ls_msg += '查询产品附件信息失败!~r~n' + Transaction_pic.sqlerrtext
  163. GOTO ext
  164. END IF
  165. s_file.DisplayName = ls_DisPlayName
  166. s_file.Filename = ls_FileName
  167. s_file.FileType = ls_FileType
  168. s_file.opemp = publ_operator
  169. s_file.opdate = DateTime(Today())
  170. s_file.dscrp = ''
  171. s_file.filedata = ins_filedata
  172. IF ls_uo_btfj.uf_save_fj( s_file, rt_fileid, Transaction_pic , arg_msg ) <> 1 THEN
  173. rslt = 0
  174. ls_msg += '附件保存到附件数据库失败!' + arg_msg + '~r~n'
  175. GOTO ext
  176. END IF
  177. IF f_update_fj_cnt(s_file.billtype,s_file.scid,s_file.relid,s_file.relid_mx,arg_msg) <> 1 THEN
  178. rslt = 0
  179. ls_msg += '附件更新附件数量失败!' + arg_msg + '~r~n'
  180. GOTO ext
  181. END IF
  182. ext:
  183. Destroy ls_uo_btfj
  184. IF ls_msg <> '' THEN
  185. MessageBox('', ls_msg)
  186. ELSE
  187. MessageBox('提示', '上传成功,可继续选择上传')
  188. this.triggerevent( 'retrieve_file_saletaskmx')
  189. END IF
  190. end event
  191. event retrieve_file();Long ll_mtrlid, ll_classid
  192. IF dw_saletaskmx.GetRow() > 0 THEN
  193. ll_mtrlid = dw_saletaskmx.Object.mtrlid[dw_saletaskmx.GetRow()]
  194. ELSE
  195. ll_mtrlid = 0
  196. END IF
  197. IF dw_fileclass_mtrl.GetRow() > 0 THEN
  198. ll_classid = dw_fileclass_mtrl.Object.classid[dw_fileclass_mtrl.GetRow()]
  199. ELSE
  200. ll_classid = 0
  201. END IF
  202. dw_fj_mtrl.Retrieve(ins_billtype_mtrl, ll_classid, ll_mtrlid, 0, ins_scid)
  203. end event
  204. event retrieve_file_saletaskmx();Long ll_printid, ll_classid
  205. IF dw_saletaskmx.GetRow() > 0 THEN
  206. ll_printid = dw_saletaskmx.Object.u_saletaskmx_printid[dw_saletaskmx.GetRow()]
  207. ELSE
  208. ll_printid = 0
  209. END IF
  210. IF dw_fileclass_saletaskmx.GetRow() > 0 THEN
  211. ll_classid = dw_fileclass_saletaskmx.Object.classid[dw_fileclass_saletaskmx.GetRow()]
  212. ELSE
  213. ll_classid = 0
  214. END IF
  215. dw_fj_saletaskmx.Retrieve(ins_billtype, ll_classid, ins_taskid, ll_printid, ins_scid)
  216. end event
  217. event ue_del();Long ll_row, ll_fileid, ll_printid
  218. //Long ll_i, ll_pos,rt_fileid, ll_cnt = 0, ll_printid //, ll_fileid
  219. Int rslt = 1
  220. String ls_msg = ''
  221. String arg_msg
  222. uo_fj_mng_billtype ls_uo_btfj
  223. ls_uo_btfj = Create uo_fj_mng_billtype
  224. IF dw_fileclass_saletaskmx.GetRow() <= 0 THEN
  225. ls_msg = '请选择附件分类-订单明细'
  226. GOTO ext
  227. END IF
  228. ll_row = dw_saletaskmx.GetRow()
  229. IF ll_row <= 0 THEN
  230. ls_msg = '请选择订单明细'
  231. GOTO ext
  232. END IF
  233. IF dw_fj_saletaskmx.GetRow() <= 0 THEN
  234. ls_msg = '请选择附件-订单明细'
  235. GOTO ext
  236. END IF
  237. IF MessageBox ("if","是否确定要删除当前订单明细附件文件["+String(dw_fj_saletaskmx.Object.DisplayName[dw_fj_saletaskmx.GetRow()]) +"]?(选择确定后记录将不可恢复)",question!,yesno! ) = 2 THEN
  238. RETURN
  239. END IF
  240. ll_fileid = dw_fj_saletaskmx.Object.Fileid[dw_fj_saletaskmx.GetRow()]
  241. ll_printid = dw_saletaskmx.Object.u_saletaskmx_printid[ll_row]
  242. IF ls_uo_btfj.uf_del_file(ll_fileid,Transaction_pic,arg_msg) = 0 THEN
  243. MessageBox('系统提示:',arg_msg)
  244. RETURN
  245. END IF
  246. IF f_update_fj_cnt(ins_billtype,ins_scid,ins_taskid,ll_printid,arg_msg) = 0 THEN
  247. ls_msg = arg_msg
  248. GOTO ext
  249. END IF
  250. ext:
  251. Destroy ls_uo_btfj
  252. IF ls_msg <> '' THEN
  253. MessageBox('', ls_msg)
  254. ELSE
  255. MessageBox('提示', '文件删除成功')
  256. this.triggerevent( 'retrieve_file_saletaskmx')
  257. END IF
  258. end event
  259. public function long wf_fileopen (long arg_fileid);s_fileinfo s_file
  260. String arg_msg
  261. Blob nulldata
  262. SetNull(nulldata)
  263. String ls_filetype,ls_filename
  264. Long ll_x, ll_y
  265. ll_x = 0
  266. ll_y = dw_fileclass_mtrl.Y + dw_fileclass_mtrl.Height + 4
  267. SELECT filetype,filename
  268. INTO :ls_filetype,:ls_filename
  269. FROM u_file
  270. Where fileid = :arg_fileid Using Transaction_pic;
  271. IF Transaction_pic.SQLCode <> 0 THEN
  272. IF IsValid(obj_fileview) THEN
  273. CloseUserObject(obj_fileview)
  274. END IF
  275. MessageBox('系统提示','获取文件类型失败'+Transaction_pic.SQLErrText)
  276. RETURN 0
  277. END IF
  278. //THIS.Title = ins_ori_title +' ['+Trim(ls_filetype)+'] '+Trim(ls_filename)
  279. SelectBlob filedata
  280. Into :s_file.filedata
  281. From u_file
  282. Where fileid = :arg_fileid Using Transaction_pic;
  283. IF Transaction_pic.SQLCode <> 0 THEN
  284. IF IsValid(obj_fileview) THEN
  285. CloseUserObject(obj_fileview)
  286. END IF
  287. MessageBox('系统提示','获取图片失败'+Transaction_pic.SQLErrText)
  288. RETURN 0
  289. END IF
  290. IF Not IsValid(obj_fileview) THEN
  291. obj_fileview = Create uo_fileview_pic
  292. OpenUserObject(obj_fileview, ll_x, ll_y)
  293. obj_fileview.Height = This.Height - obj_fileview.Y - 40
  294. obj_fileview.Width = This.Width - obj_fileview.X -40
  295. END IF
  296. obj_fileview.OriginalSize = True
  297. IF obj_fileview.of_showfile( s_file.filedata,ls_filename, arg_msg) <> 1 THEN
  298. IF IsValid(obj_fileview) THEN
  299. CloseUserObject(obj_fileview)
  300. END IF
  301. MessageBox('系统提示',arg_msg)
  302. RETURN 0
  303. END IF
  304. ins_filedata = s_file.filedata
  305. ins_filename = ls_filename
  306. //obj_fileview.of_set_originalsize( true)
  307. obj_fileview.of_setfilesize( )
  308. ins_fileid = arg_fileid
  309. RETURN 1
  310. end function
  311. public function integer wf_setfile (blob arg_filedata, string arg_filename);String arg_msg
  312. IF IsValid(obj_fileview) THEN
  313. obj_fileview.OriginalSize = True
  314. IF obj_fileview.of_showfile( arg_filedata,arg_filename, arg_msg) <> 1 THEN
  315. CloseUserObject(obj_fileview)
  316. MessageBox('系统提示',arg_msg)
  317. RETURN 0
  318. END IF
  319. ins_filedata = arg_filedata
  320. //ins_ori_title = ls_
  321. //obj_fileview.of_set_originalsize( true)
  322. obj_fileview.of_setfilesize( )
  323. END IF
  324. RETURN 1
  325. end function
  326. on w_saletaskmx_fileadd_p.create
  327. this.cb_save=create cb_save
  328. this.dw_fj_saletaskmx=create dw_fj_saletaskmx
  329. this.cb_del=create cb_del
  330. this.dw_fj_mtrl=create dw_fj_mtrl
  331. this.dw_fileclass_saletaskmx=create dw_fileclass_saletaskmx
  332. this.dw_fileclass_mtrl=create dw_fileclass_mtrl
  333. this.cb_exit=create cb_exit
  334. this.cb_edit=create cb_edit
  335. this.dw_saletaskmx=create dw_saletaskmx
  336. this.r_bar=create r_bar
  337. this.ln_bar=create ln_bar
  338. this.ln_bar2=create ln_bar2
  339. this.Control[]={this.cb_save,&
  340. this.dw_fj_saletaskmx,&
  341. this.cb_del,&
  342. this.dw_fj_mtrl,&
  343. this.dw_fileclass_saletaskmx,&
  344. this.dw_fileclass_mtrl,&
  345. this.cb_exit,&
  346. this.cb_edit,&
  347. this.dw_saletaskmx,&
  348. this.r_bar,&
  349. this.ln_bar,&
  350. this.ln_bar2}
  351. end on
  352. on w_saletaskmx_fileadd_p.destroy
  353. destroy(this.cb_save)
  354. destroy(this.dw_fj_saletaskmx)
  355. destroy(this.cb_del)
  356. destroy(this.dw_fj_mtrl)
  357. destroy(this.dw_fileclass_saletaskmx)
  358. destroy(this.dw_fileclass_mtrl)
  359. destroy(this.cb_exit)
  360. destroy(this.cb_edit)
  361. destroy(this.dw_saletaskmx)
  362. destroy(this.r_bar)
  363. destroy(this.ln_bar)
  364. destroy(this.ln_bar2)
  365. end on
  366. event open;s_edit_index_tran s_pic
  367. s_pic = Message.PowerObjectParm
  368. ins_scid = s_pic.e_long
  369. ins_taskid = s_pic.g_long
  370. ins_taskcode = s_pic.f_string
  371. Transaction_pic = s_pic.sqltransaction
  372. dw_saletaskmx.SetTransObject (sqlca)
  373. dw_fj_mtrl.SetTransObject(Transaction_pic)
  374. dw_fileclass_mtrl.SetTransObject(sqlca)
  375. dw_fileclass_saletaskmx.SetTransObject(sqlca)
  376. dw_fj_saletaskmx.SetTransObject(Transaction_pic)
  377. dw_saletaskmx.Retrieve(ins_scid, ins_taskid)
  378. dw_fileclass_mtrl.Retrieve(ins_billtype_mtrl)
  379. dw_fileclass_saletaskmx.Retrieve(ins_billtype)
  380. this.Title = ins_taskcode
  381. end event
  382. event resize;ln_bar.EndX = THIS.Width
  383. ln_bar2.EndX = THIS.Width
  384. r_bar.Width = THIS.Width
  385. dw_saletaskmx.width = THIS.Width - dw_saletaskmx.x - 40 - dw_fileclass_saletaskmx.width - dw_fj_saletaskmx.width
  386. //dw_saletaskmx.Height = THIS.Height - dw_saletaskmx.y
  387. dw_fileclass_saletaskmx.x = dw_saletaskmx.x + dw_saletaskmx.width
  388. dw_fj_saletaskmx.x = dw_fileclass_saletaskmx.x + dw_fileclass_saletaskmx.width
  389. dw_fileclass_mtrl.y = dw_saletaskmx.y + dw_saletaskmx.height + 4
  390. dw_fj_mtrl.y = dw_saletaskmx.y + dw_saletaskmx.height + 4
  391. dw_fj_mtrl.width = THIS.Width - dw_fj_mtrl.x - 40
  392. //dw_fileclass_mtrl.height = (THIS.Height - dw_fileclass_mtrl.y - 140 ) / 2
  393. //
  394. //dw_fileclass_saletaskmx.y = dw_fileclass_mtrl.y + dw_fileclass_mtrl.height + 4
  395. //dw_fileclass_saletaskmx.height = dw_fileclass_mtrl.height
  396. end event
  397. type cb_save from uo_imflatbutton within w_saletaskmx_fileadd_p
  398. integer width = 165
  399. integer height = 164
  400. integer taborder = 10
  401. boolean bringtotop = true
  402. string text = "另存"
  403. string normalpicname = "save.BMP"
  404. integer picsize = 16
  405. toolbaralignment pic_align = alignattop!
  406. boolean border = false
  407. end type
  408. event clicked;call super::clicked;parent.triggerevent('ue_save')
  409. end event
  410. type dw_fj_saletaskmx from u_dw_rbtnfilter within w_saletaskmx_fileadd_p
  411. integer x = 2528
  412. integer y = 172
  413. integer width = 1454
  414. integer height = 648
  415. integer taborder = 30
  416. boolean titlebar = true
  417. string title = "附件-订单明细"
  418. string dataobject = "dw_saletaskmx_fileadd_p_fj"
  419. boolean hscrollbar = true
  420. boolean vscrollbar = true
  421. end type
  422. event rowfocuschanged;call super::rowfocuschanged;//IF currentrow > 0 THEN
  423. // this.setrow(currentrow)
  424. // this.SelectRow( 0, FALSE)
  425. // this.SelectRow( currentrow, TRUE)
  426. // this.ScrollToRow( currentrow)
  427. //
  428. // dw_fj_mtrl.SelectRow( 0, FALSE)
  429. //
  430. // long ll_fileid
  431. // ll_fileid = this.object.fileid[currentrow]
  432. // wf_fileopen(ll_fileid)
  433. //// parent.triggerevent( 'open_file')
  434. //END IF
  435. end event
  436. event clicked;call super::clicked;IF row > 0 THEN
  437. this.setrow(row)
  438. this.SelectRow( 0, FALSE)
  439. this.SelectRow( row, TRUE)
  440. this.ScrollToRow( row)
  441. dw_fj_mtrl.SelectRow( 0, FALSE)
  442. long ll_fileid
  443. ll_fileid = this.object.fileid[row]
  444. wf_fileopen(ll_fileid)
  445. // parent.triggerevent( 'open_file')
  446. END IF
  447. end event
  448. type cb_del from uo_imflatbutton within w_saletaskmx_fileadd_p
  449. integer x = 329
  450. integer width = 165
  451. integer height = 164
  452. integer taborder = 10
  453. boolean bringtotop = true
  454. string text = "删除"
  455. string normalpicname = "delete.BMP"
  456. integer picsize = 16
  457. toolbaralignment pic_align = alignattop!
  458. boolean border = false
  459. end type
  460. event clicked;call super::clicked;parent.triggerevent('ue_del')
  461. end event
  462. type dw_fj_mtrl from u_dw_rbtnfilter within w_saletaskmx_fileadd_p
  463. integer x = 1033
  464. integer y = 1060
  465. integer height = 660
  466. integer taborder = 20
  467. boolean titlebar = true
  468. string title = "附件-物料"
  469. string dataobject = "dw_saletaskmx_fileadd_p_fj"
  470. boolean hscrollbar = true
  471. boolean vscrollbar = true
  472. end type
  473. event rowfocuschanged;call super::rowfocuschanged;//IF currentrow > 0 THEN
  474. // this.setrow(currentrow)
  475. // this.SelectRow( 0, FALSE)
  476. // this.SelectRow( currentrow, TRUE)
  477. // this.ScrollToRow( currentrow)
  478. //
  479. // dw_fj_saletaskmx.SelectRow( 0, FALSE)
  480. //
  481. // long ll_fileid
  482. // ll_fileid = this.object.fileid[currentrow]
  483. // wf_fileopen(ll_fileid)
  484. //// parent.triggerevent( 'open_file')
  485. //END IF
  486. end event
  487. event clicked;call super::clicked;IF row > 0 THEN
  488. this.setrow(row)
  489. this.SelectRow( 0, FALSE)
  490. this.SelectRow( row, TRUE)
  491. this.ScrollToRow( row)
  492. dw_fj_saletaskmx.SelectRow( 0, FALSE)
  493. long ll_fileid
  494. ll_fileid = this.object.fileid[row]
  495. wf_fileopen(ll_fileid)
  496. // parent.triggerevent( 'open_file')
  497. END IF
  498. end event
  499. type dw_fileclass_saletaskmx from u_dw_rbtnfilter within w_saletaskmx_fileadd_p
  500. integer x = 1669
  501. integer y = 180
  502. integer width = 841
  503. integer height = 648
  504. integer taborder = 20
  505. boolean titlebar = true
  506. string title = "附件分类-订单明细"
  507. string dataobject = "dw_fj_fileclass_list_fileadd"
  508. boolean hscrollbar = true
  509. boolean vscrollbar = true
  510. end type
  511. event rowfocuschanged;call super::rowfocuschanged;IF currentrow > 0 THEN
  512. this.SelectRow( 0, FALSE)
  513. this.SelectRow( currentrow, TRUE)
  514. this.ScrollToRow( currentrow)
  515. parent.triggerevent( 'retrieve_file_saletaskmx')
  516. END IF
  517. end event
  518. type dw_fileclass_mtrl from u_dw_rbtnfilter within w_saletaskmx_fileadd_p
  519. integer y = 1052
  520. integer height = 660
  521. integer taborder = 20
  522. boolean titlebar = true
  523. string title = "附件分类-物料"
  524. string dataobject = "dw_fj_fileclass_list_fileadd"
  525. boolean hscrollbar = true
  526. boolean vscrollbar = true
  527. end type
  528. event rowfocuschanged;call super::rowfocuschanged;IF currentrow > 0 THEN
  529. this.SelectRow( 0, FALSE)
  530. this.SelectRow( currentrow, TRUE)
  531. this.ScrollToRow( currentrow)
  532. parent.triggerevent( 'retrieve_file')
  533. END IF
  534. end event
  535. type cb_exit from uo_imflatbutton within w_saletaskmx_fileadd_p
  536. integer x = 494
  537. integer width = 165
  538. integer height = 164
  539. integer taborder = 20
  540. boolean bringtotop = true
  541. string text = "退出"
  542. string normalpicname = "exit.BMP"
  543. integer picsize = 16
  544. toolbaralignment pic_align = alignattop!
  545. boolean border = false
  546. end type
  547. event clicked;call super::clicked;Close(parent)
  548. end event
  549. type cb_edit from uo_imflatbutton within w_saletaskmx_fileadd_p
  550. integer x = 165
  551. integer width = 165
  552. integer height = 164
  553. integer taborder = 10
  554. boolean bringtotop = true
  555. string text = "编辑"
  556. string normalpicname = "open.BMP"
  557. integer picsize = 16
  558. toolbaralignment pic_align = alignattop!
  559. boolean border = false
  560. end type
  561. event clicked;call super::clicked;//parent.triggerevent('ue_save')
  562. s_parm_bmp_editor s_tran
  563. s_tran.if_bmp = false
  564. s_tran.bmp = ins_filedata
  565. openwithparm(w_bmp_editor, s_tran)
  566. s_tran = Message.PowerObjectParm
  567. if s_tran.if_bmp then
  568. messagebox("","保存了")
  569. wf_setfile(s_tran.bmp, ins_filename)
  570. else
  571. messagebox("","没有保存")
  572. end if
  573. end event
  574. type dw_saletaskmx from u_dw_rbtnfilter within w_saletaskmx_fileadd_p
  575. event ue_dwndropdown pbm_dwndropdown
  576. integer y = 180
  577. integer width = 1650
  578. integer height = 648
  579. boolean bringtotop = true
  580. boolean titlebar = true
  581. string title = "订单明细"
  582. string dataobject = "dw_saletaskmx_fileadd_p_saletaskmx"
  583. boolean hscrollbar = true
  584. boolean vscrollbar = true
  585. boolean hsplitscroll = true
  586. end type
  587. event ue_dwndropdown;//// DONE: 选择文件
  588. //parent.triggerEvent('ue_selectfile')
  589. //return 1
  590. //
  591. end event
  592. event rowfocuschanged;call super::rowfocuschanged;IF currentrow > 0 THEN
  593. this.setrow(currentrow)
  594. this.SelectRow( 0, FALSE)
  595. this.SelectRow( currentrow, TRUE)
  596. this.ScrollToRow( currentrow)
  597. parent.triggerevent( 'retrieve_file')
  598. parent.triggerevent( 'retrieve_file_saletaskmx')
  599. END IF
  600. end event
  601. type r_bar from rectangle within w_saletaskmx_fileadd_p
  602. long linecolor = 16777215
  603. integer linethickness = 4
  604. long fillcolor = 1073741824
  605. integer x = 690
  606. integer y = 4
  607. integer width = 87
  608. integer height = 68
  609. end type
  610. event constructor;this.fillcolor = 14215660
  611. this.linecolor = 14215660
  612. this.x = -1
  613. this.y = -1
  614. this.height = ln_bar.beginy - 5
  615. end event
  616. type ln_bar from line within w_saletaskmx_fileadd_p
  617. long linecolor = 268435456
  618. integer linethickness = 4
  619. integer beginy = 172
  620. integer endx = 4425
  621. integer endy = 172
  622. end type
  623. type ln_bar2 from line within w_saletaskmx_fileadd_p
  624. long linecolor = 16777215
  625. integer linethickness = 4
  626. integer beginy = 176
  627. integer endx = 4498
  628. integer endy = 176
  629. end type