w_taobao_fy_input.srw 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473
  1. $PBExportHeader$w_taobao_fy_input.srw
  2. forward
  3. global type w_taobao_fy_input from w_publ_base
  4. end type
  5. type cb_ok from uo_imflatbutton within w_taobao_fy_input
  6. end type
  7. type sle_transcode from singlelineedit within w_taobao_fy_input
  8. end type
  9. type cb_add from commandbutton within w_taobao_fy_input
  10. end type
  11. type dw_uc from u_dw_uc_rbtnfilter within w_taobao_fy_input
  12. end type
  13. type st_1 from statictext within w_taobao_fy_input
  14. end type
  15. type sle_itemtype from singlelineedit within w_taobao_fy_input
  16. end type
  17. type sle_itemname from singlelineedit within w_taobao_fy_input
  18. end type
  19. type st_4 from statictext within w_taobao_fy_input
  20. end type
  21. type st_3 from statictext within w_taobao_fy_input
  22. end type
  23. type cb_1 from uo_imflatbutton within w_taobao_fy_input
  24. end type
  25. type sle_itemcode from singlelineedit within w_taobao_fy_input
  26. end type
  27. type st_2 from statictext within w_taobao_fy_input
  28. end type
  29. end forward
  30. global type w_taobao_fy_input from w_publ_base
  31. integer width = 2089
  32. integer height = 1392
  33. string title = "网店运输单运费录入"
  34. boolean minbox = false
  35. windowtype windowtype = response!
  36. boolean center = true
  37. event ue_find ( )
  38. event ue_f8 ( )
  39. cb_ok cb_ok
  40. sle_transcode sle_transcode
  41. cb_add cb_add
  42. dw_uc dw_uc
  43. st_1 st_1
  44. sle_itemtype sle_itemtype
  45. sle_itemname sle_itemname
  46. st_4 st_4
  47. st_3 st_3
  48. cb_1 cb_1
  49. sle_itemcode sle_itemcode
  50. st_2 st_2
  51. end type
  52. global w_taobao_fy_input w_taobao_fy_input
  53. type variables
  54. long ins_itemid = 0
  55. end variables
  56. forward prototypes
  57. public subroutine wf_reset ()
  58. public function integer wf_save (ref string arg_msg)
  59. end prototypes
  60. event ue_find();String ls_transcode
  61. ls_transcode = sle_transcode.Text
  62. IF ls_transcode = '' THEN
  63. MessageBox('提示', '请输入运输单号')
  64. RETURN
  65. END IF
  66. Long cnt
  67. cnt = dw_uc.Retrieve(ls_transcode)
  68. IF cnt <= 0 THEN
  69. wf_reset()
  70. MessageBox('提示', '找不到运输单号' + ls_transcode)
  71. RETURN
  72. END IF
  73. dw_uc.SetColumn('amt')
  74. dw_uc.Setfocus()
  75. end event
  76. event ue_f8();Long itemid
  77. String itemcode,itemname, itemtype, arg_msg = ''
  78. IF uo_saletask_spi.wf_itemdef_ch(Ref itemid, Ref itemcode, Ref itemname, Ref itemtype, Ref arg_msg) <> 1 THEN
  79. IF arg_msg <> '' THEN
  80. MessageBox('ERROR', arg_msg)
  81. END IF
  82. RETURN
  83. END IF
  84. ins_itemid = itemid
  85. sle_itemcode.Text = itemcode
  86. sle_itemname.Text = itemname
  87. sle_itemtype.Text = itemtype
  88. end event
  89. public subroutine wf_reset ();dw_uc.Reset()
  90. dw_uc.insertRow(0)
  91. sle_transcode.Text = ''
  92. sle_transcode.SetFocus()
  93. end subroutine
  94. public function integer wf_save (ref string arg_msg);Int rslt = 1
  95. uo_taobao_outware uo_taobao
  96. uo_taobao = Create uo_taobao_outware
  97. dw_uc.AcceptText()
  98. IF ins_itemid <= 0 THEN
  99. rslt = 0
  100. arg_msg = '请选择费用项目'
  101. sle_itemcode.SetFocus()
  102. GOTO ext
  103. END IF
  104. IF dw_uc.Object.amt[1] <= 0 THEN
  105. rslt = 0
  106. arg_msg = '运费必须大于0'
  107. GOTO ext
  108. END IF
  109. IF uo_taobao.add_tranfy(dw_uc.Object.scid[1], dw_uc.Object.outwareid[1], ins_itemid, dw_uc.Object.amt[1], arg_msg, true) <> 1 THEN
  110. rslt = 0
  111. GOTO ext
  112. END IF
  113. ext:
  114. Destroy uo_taobao
  115. RETURN rslt
  116. end function
  117. on w_taobao_fy_input.create
  118. int iCurrent
  119. call super::create
  120. this.cb_ok=create cb_ok
  121. this.sle_transcode=create sle_transcode
  122. this.cb_add=create cb_add
  123. this.dw_uc=create dw_uc
  124. this.st_1=create st_1
  125. this.sle_itemtype=create sle_itemtype
  126. this.sle_itemname=create sle_itemname
  127. this.st_4=create st_4
  128. this.st_3=create st_3
  129. this.cb_1=create cb_1
  130. this.sle_itemcode=create sle_itemcode
  131. this.st_2=create st_2
  132. iCurrent=UpperBound(this.Control)
  133. this.Control[iCurrent+1]=this.cb_ok
  134. this.Control[iCurrent+2]=this.sle_transcode
  135. this.Control[iCurrent+3]=this.cb_add
  136. this.Control[iCurrent+4]=this.dw_uc
  137. this.Control[iCurrent+5]=this.st_1
  138. this.Control[iCurrent+6]=this.sle_itemtype
  139. this.Control[iCurrent+7]=this.sle_itemname
  140. this.Control[iCurrent+8]=this.st_4
  141. this.Control[iCurrent+9]=this.st_3
  142. this.Control[iCurrent+10]=this.cb_1
  143. this.Control[iCurrent+11]=this.sle_itemcode
  144. this.Control[iCurrent+12]=this.st_2
  145. end on
  146. on w_taobao_fy_input.destroy
  147. call super::destroy
  148. destroy(this.cb_ok)
  149. destroy(this.sle_transcode)
  150. destroy(this.cb_add)
  151. destroy(this.dw_uc)
  152. destroy(this.st_1)
  153. destroy(this.sle_itemtype)
  154. destroy(this.sle_itemname)
  155. destroy(this.st_4)
  156. destroy(this.st_3)
  157. destroy(this.cb_1)
  158. destroy(this.sle_itemcode)
  159. destroy(this.st_2)
  160. end on
  161. event open;call super::open;dw_uc.SetTransObject(sqlca)
  162. wf_reset()
  163. ins_itemid = Long(f_profilestring(sys_empid, This.ClassName(), 'ins_itemid', '0'))
  164. String ls_itemcode, ls_itemname, ls_itemtype
  165. SELECT top 1
  166. itemcode,
  167. itemname,
  168. itemtype
  169. INTO
  170. :ls_itemcode,
  171. :ls_itemname,
  172. :ls_itemtype
  173. FROM u_itemdef
  174. Where itemid = :ins_itemid;
  175. IF sqlca.SQLCode <> 0 THEN
  176. ins_itemid = 0
  177. TriggerEvent('ue_f8')
  178. RETURN
  179. END IF
  180. sle_itemcode.Text = ls_itemcode
  181. sle_itemname.Text = ls_itemname
  182. sle_itemtype.Text = ls_itemtype
  183. end event
  184. event close;call super::close;f_setprofilestring(sys_empid, This.ClassName(), 'ins_itemid', string(ins_itemid))
  185. end event
  186. type cb_func from w_publ_base`cb_func within w_taobao_fy_input
  187. boolean visible = false
  188. end type
  189. type cb_exit from w_publ_base`cb_exit within w_taobao_fy_input
  190. integer x = 1669
  191. integer y = 1184
  192. end type
  193. type cb_ok from uo_imflatbutton within w_taobao_fy_input
  194. integer x = 1326
  195. integer y = 1184
  196. integer width = 311
  197. integer height = 96
  198. integer taborder = 30
  199. boolean bringtotop = true
  200. string normalpicname = "save.bmp"
  201. end type
  202. event clicked;call super::clicked;String arg_msg
  203. IF wf_save(arg_msg) <> 1 THEN
  204. MessageBox('提示', arg_msg)
  205. RETURN
  206. END IF
  207. wf_reset()
  208. MessageBox('OK', '保存成功')
  209. end event
  210. type sle_transcode from singlelineedit within w_taobao_fy_input
  211. event ue_keydown pbm_keydown
  212. integer x = 306
  213. integer y = 172
  214. integer width = 709
  215. integer height = 84
  216. integer taborder = 30
  217. boolean bringtotop = true
  218. integer textsize = -9
  219. integer weight = 400
  220. fontcharset fontcharset = gb2312charset!
  221. fontpitch fontpitch = variable!
  222. string facename = "宋体"
  223. long textcolor = 33554432
  224. borderstyle borderstyle = stylelowered!
  225. end type
  226. event ue_keydown;IF Key = keyenter! THEN
  227. cb_add.TriggerEvent(Clicked!)
  228. END IF
  229. end event
  230. type cb_add from commandbutton within w_taobao_fy_input
  231. integer x = 1019
  232. integer y = 172
  233. integer width = 192
  234. integer height = 84
  235. integer taborder = 40
  236. boolean bringtotop = true
  237. integer textsize = -9
  238. integer weight = 400
  239. fontcharset fontcharset = gb2312charset!
  240. fontpitch fontpitch = variable!
  241. string facename = "宋体"
  242. string text = "查找"
  243. end type
  244. event clicked;parent.TriggerEvent('ue_find')
  245. end event
  246. type dw_uc from u_dw_uc_rbtnfilter within w_taobao_fy_input
  247. event ue_scroll pbm_vscroll
  248. integer x = 64
  249. integer y = 284
  250. integer width = 1947
  251. integer height = 872
  252. integer taborder = 110
  253. boolean bringtotop = true
  254. string dataobject = "dw_taobao_fy_input_uc"
  255. boolean livescroll = false
  256. end type
  257. event ue_scroll;RETURN 1
  258. end event
  259. event dwnkey;PARENT.TriggerEvent('user_key')
  260. IF Key = KeyDownArrow! THEN RETURN 1
  261. IF Key = KeyEnter! AND dw_uc.GetColumnName() = 'amt' THEN //
  262. cb_ok.TriggerEvent(clicked!)
  263. RETURN 1
  264. END IF
  265. end event
  266. type st_1 from statictext within w_taobao_fy_input
  267. integer x = 73
  268. integer y = 188
  269. integer width = 233
  270. integer height = 48
  271. boolean bringtotop = true
  272. integer textsize = -9
  273. integer weight = 400
  274. fontcharset fontcharset = gb2312charset!
  275. fontpitch fontpitch = variable!
  276. string facename = "宋体"
  277. long textcolor = 33554432
  278. long backcolor = 134217739
  279. string text = "运输单号"
  280. boolean focusrectangle = false
  281. end type
  282. type sle_itemtype from singlelineedit within w_taobao_fy_input
  283. event ue_keyup pbm_keyup
  284. integer x = 1554
  285. integer y = 64
  286. integer width = 306
  287. integer height = 84
  288. integer taborder = 70
  289. boolean bringtotop = true
  290. integer textsize = -9
  291. integer weight = 400
  292. fontcharset fontcharset = gb2312charset!
  293. fontpitch fontpitch = variable!
  294. string facename = "宋体"
  295. long textcolor = 33554432
  296. boolean displayonly = true
  297. borderstyle borderstyle = stylelowered!
  298. end type
  299. type sle_itemname from singlelineedit within w_taobao_fy_input
  300. event ue_keyup pbm_keyup
  301. integer x = 983
  302. integer y = 64
  303. integer width = 306
  304. integer height = 84
  305. integer taborder = 80
  306. boolean bringtotop = true
  307. integer textsize = -9
  308. integer weight = 400
  309. fontcharset fontcharset = gb2312charset!
  310. fontpitch fontpitch = variable!
  311. string facename = "宋体"
  312. long textcolor = 33554432
  313. boolean displayonly = true
  314. borderstyle borderstyle = stylelowered!
  315. end type
  316. type st_4 from statictext within w_taobao_fy_input
  317. integer x = 1317
  318. integer y = 80
  319. integer width = 233
  320. integer height = 48
  321. boolean bringtotop = true
  322. integer textsize = -9
  323. integer weight = 400
  324. fontcharset fontcharset = gb2312charset!
  325. fontpitch fontpitch = variable!
  326. string facename = "宋体"
  327. long textcolor = 33554432
  328. long backcolor = 134217739
  329. string text = "项目类型"
  330. boolean focusrectangle = false
  331. end type
  332. type st_3 from statictext within w_taobao_fy_input
  333. integer x = 750
  334. integer y = 80
  335. integer width = 233
  336. integer height = 48
  337. boolean bringtotop = true
  338. integer textsize = -9
  339. integer weight = 400
  340. fontcharset fontcharset = gb2312charset!
  341. fontpitch fontpitch = variable!
  342. string facename = "宋体"
  343. long textcolor = 33554432
  344. long backcolor = 134217739
  345. string text = "项目名称"
  346. boolean focusrectangle = false
  347. end type
  348. type cb_1 from uo_imflatbutton within w_taobao_fy_input
  349. integer x = 613
  350. integer y = 56
  351. integer width = 105
  352. integer height = 96
  353. integer taborder = 60
  354. boolean bringtotop = true
  355. string text = ""
  356. string normalpicname = "find.bmp"
  357. end type
  358. event clicked;call super::clicked;Parent.TriggerEvent('ue_f8')
  359. end event
  360. type sle_itemcode from singlelineedit within w_taobao_fy_input
  361. event ue_keyup pbm_keyup
  362. integer x = 306
  363. integer y = 64
  364. integer width = 306
  365. integer height = 84
  366. integer taborder = 80
  367. boolean bringtotop = true
  368. integer textsize = -9
  369. integer weight = 400
  370. fontcharset fontcharset = gb2312charset!
  371. fontpitch fontpitch = variable!
  372. string facename = "宋体"
  373. long textcolor = 8388608
  374. borderstyle borderstyle = stylelowered!
  375. end type
  376. event ue_keyup;String ls_itemcode
  377. Long ll_itemid
  378. String ls_itemname, ls_itemtype
  379. IF Key = keyenter! THEN
  380. ls_itemcode = This.Text
  381. SELECT itemid,
  382. itemname,
  383. itemtype
  384. INTO :ll_itemid,
  385. :ls_itemname,
  386. :ls_itemtype
  387. FROM u_itemdef
  388. Where itemcode = :ls_itemcode;
  389. IF sqlca.SQLCode <> 0 THEN
  390. Parent.TriggerEvent('ue_f8')
  391. RETURN
  392. END IF
  393. ins_itemid = ll_itemid
  394. sle_itemname.Text = ls_itemname
  395. sle_itemtype.Text = ls_itemtype
  396. END IF
  397. end event
  398. type st_2 from statictext within w_taobao_fy_input
  399. integer x = 73
  400. integer y = 80
  401. integer width = 233
  402. integer height = 48
  403. boolean bringtotop = true
  404. integer textsize = -9
  405. integer weight = 400
  406. fontcharset fontcharset = gb2312charset!
  407. fontpitch fontpitch = variable!
  408. string facename = "宋体"
  409. long textcolor = 8388608
  410. long backcolor = 134217739
  411. string text = "项目编号"
  412. boolean focusrectangle = false
  413. end type