w_taobao_taskamt.srw 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  1. $PBExportHeader$w_taobao_taskamt.srw
  2. forward
  3. global type w_taobao_taskamt from w_publ_base_style
  4. end type
  5. type dw_1 from u_dw_rbtnfilter within w_taobao_taskamt
  6. end type
  7. type cbx_1 from checkbox within w_taobao_taskamt
  8. end type
  9. type sle_1 from singlelineedit within w_taobao_taskamt
  10. end type
  11. type st_1 from statictext within w_taobao_taskamt
  12. end type
  13. type cb_reflash from uo_imflatbutton within w_taobao_taskamt
  14. end type
  15. type cb_takeamt from uo_imflatbutton within w_taobao_taskamt
  16. end type
  17. type ln_1 from line within w_taobao_taskamt
  18. end type
  19. type ln_2 from line within w_taobao_taskamt
  20. end type
  21. end forward
  22. global type w_taobao_taskamt from w_publ_base_style
  23. integer width = 3794
  24. integer height = 2072
  25. string title = "淘宝订单收款"
  26. boolean maxbox = true
  27. boolean resizable = true
  28. windowstate windowstate = maximized!
  29. event ue_take_amt ( )
  30. dw_1 dw_1
  31. cbx_1 cbx_1
  32. sle_1 sle_1
  33. st_1 st_1
  34. cb_reflash cb_reflash
  35. cb_takeamt cb_takeamt
  36. ln_1 ln_1
  37. ln_2 ln_2
  38. end type
  39. global w_taobao_taskamt w_taobao_taskamt
  40. event ue_take_amt();IF Not uo_power_spi.f_taobao_taskamt_takeamt(sys_msg_pow) THEN
  41. MessageBox(publ_operator,sys_msg_pow)
  42. RETURN
  43. END IF
  44. // 当前订单生成订单收款单
  45. s_taskdamt arg_s_bd
  46. Long i, count = 0
  47. Boolean has_value = False
  48. Long ll_accountsid, ll_itemid, ll_moneyid, ll_banktypeid
  49. Decimal ld_rate
  50. String ls_im_userid
  51. dw_1.accepttext()
  52. FOR i = 1 To dw_1.RowCount()
  53. IF dw_1.Object.ch[i] <> 1 OR dw_1.Object.curtakeamt[i] <= 0 THEN CONTINUE
  54. IF Not has_value THEN
  55. arg_s_bd.scid = dw_1.Object.u_saletask_scid[i]
  56. arg_s_bd.billid = 0
  57. arg_s_bd.cussptid = dw_1.Object.u_saletask_cusid[i]
  58. arg_s_bd.part = ''
  59. arg_s_bd.billdate = DateTime(Today(), Now())
  60. arg_s_bd.assign_emp = ''
  61. arg_s_bd.dscrp = ''
  62. arg_s_bd.ifauto = 0
  63. ls_im_userid = dw_1.Object.eb_saletask_import_im_userid[i]
  64. SELECT accountsid, take_itemid, moneyid, banktypeid, mrate
  65. INTO :ll_accountsid, :ll_itemid, :ll_moneyid, :ll_banktypeid, :ld_rate
  66. FROM eb_user
  67. WHERE im_type = 5
  68. And im_userid = :ls_im_userid;
  69. IF sqlca.SQLCode <> 0 THEN
  70. MessageBox('ERROR', '查询网店账号预设信息失败,' + sqlca.SQLErrText)
  71. RETURN
  72. END IF
  73. IF ll_accountsid = 0 THEN
  74. MessageBox('ERROR', '网店账号未设置收款帐号')
  75. RETURN
  76. END IF
  77. IF ll_itemid = 0 THEN
  78. MessageBox('ERROR', '网店账号未设置收款收支项目')
  79. RETURN
  80. END IF
  81. IF ll_moneyid = 0 THEN
  82. MessageBox('ERROR', '网店账号未设置币种')
  83. RETURN
  84. END IF
  85. IF ll_banktypeid = 0 THEN
  86. MessageBox('ERROR', '网店账号未设置结算方式')
  87. RETURN
  88. END IF
  89. IF ld_rate = 0 THEN
  90. MessageBox('ERROR', '网店账号未设置汇率')
  91. RETURN
  92. END IF
  93. has_value = True
  94. END IF
  95. count++
  96. arg_s_bd.arg_s_mx[count].scid = dw_1.Object.u_saletask_scid[i]
  97. arg_s_bd.arg_s_mx[count].billid = 0
  98. arg_s_bd.arg_s_mx[count].printid = count
  99. arg_s_bd.arg_s_mx[count].relid = dw_1.Object.u_saletask_taskid[i]
  100. arg_s_bd.arg_s_mx[count].reltaskcode = dw_1.Object.u_saletask_taskcode[i]
  101. arg_s_bd.arg_s_mx[count].damt = dw_1.Object.u_saletask_damt[i]
  102. arg_s_bd.arg_s_mx[count].dscrp = '' //dw_child.Object.u_taskdamt_mx_dscrp[i]
  103. arg_s_bd.arg_s_mx[count].accountsid = ll_accountsid //dw_child.Object.u_taskdamt_mx_accountsid[i]
  104. arg_s_bd.arg_s_mx[count].billamt = dw_1.Object.u_saletask_msttakeamt[i]
  105. arg_s_bd.arg_s_mx[count].itemid = ll_itemid //dw_child.Object.u_taskdamt_mx_itemid[i]
  106. arg_s_bd.arg_s_mx[count].takeamt = dw_1.Object.curtakeamt[i]
  107. arg_s_bd.arg_s_mx[count].reltakeamt = dw_1.Object.u_saletask_takeamt[i]
  108. arg_s_bd.arg_s_mx[count].realmoneyid = ll_moneyid //dw_child.Object.u_taskdamt_mx_realmoneyid[i]
  109. arg_s_bd.arg_s_mx[count].realrate = ld_rate //dw_child.Object.u_taskdamt_mx_realrate[i]
  110. arg_s_bd.arg_s_mx[count].billtype = 1 //dw_child.Object.u_taskdamt_mx_billtype[i]
  111. arg_s_bd.arg_s_mx[count].banktypeid = ll_banktypeid //dw_child.Object.u_taskdamt_mx_banktypeid[i]
  112. arg_s_bd.arg_s_mx[count].reldamt = dw_1.Object.u_saletask_takedamt[i]
  113. NEXT
  114. IF count = 0 THEN
  115. MessageBox('提示', '请选择要收款的订单')
  116. RETURN
  117. END IF
  118. uo_taskdamt uo_ware
  119. String arg_msg
  120. uo_ware = Create uo_taskdamt
  121. IF uo_ware.Save(arg_s_bd,arg_msg,True) = 0 THEN
  122. Destroy uo_ware
  123. MessageBox('error!',arg_msg)
  124. RETURN
  125. END IF
  126. Destroy uo_ware
  127. MessageBox('OK', '生成订单收款单成功')
  128. end event
  129. on w_taobao_taskamt.create
  130. int iCurrent
  131. call super::create
  132. this.dw_1=create dw_1
  133. this.cbx_1=create cbx_1
  134. this.sle_1=create sle_1
  135. this.st_1=create st_1
  136. this.cb_reflash=create cb_reflash
  137. this.cb_takeamt=create cb_takeamt
  138. this.ln_1=create ln_1
  139. this.ln_2=create ln_2
  140. iCurrent=UpperBound(this.Control)
  141. this.Control[iCurrent+1]=this.dw_1
  142. this.Control[iCurrent+2]=this.cbx_1
  143. this.Control[iCurrent+3]=this.sle_1
  144. this.Control[iCurrent+4]=this.st_1
  145. this.Control[iCurrent+5]=this.cb_reflash
  146. this.Control[iCurrent+6]=this.cb_takeamt
  147. this.Control[iCurrent+7]=this.ln_1
  148. this.Control[iCurrent+8]=this.ln_2
  149. end on
  150. on w_taobao_taskamt.destroy
  151. call super::destroy
  152. destroy(this.dw_1)
  153. destroy(this.cbx_1)
  154. destroy(this.sle_1)
  155. destroy(this.st_1)
  156. destroy(this.cb_reflash)
  157. destroy(this.cb_takeamt)
  158. destroy(this.ln_1)
  159. destroy(this.ln_2)
  160. end on
  161. event ue_before_open;call super::ue_before_open;dw_1.SetTransObject(sqlca)
  162. end event
  163. event resize;call super::resize;dw_1.width = this.workspacewidth() - dw_1.x
  164. dw_1.Height = this.workspaceheight() - dw_1.Y
  165. end event
  166. event open;call super::open;cb_reflash.TriggerEvent(clicked!)
  167. end event
  168. type cb_func from w_publ_base_style`cb_func within w_taobao_taskamt
  169. boolean visible = false
  170. integer x = 791
  171. end type
  172. type cb_exit from w_publ_base_style`cb_exit within w_taobao_taskamt
  173. integer x = 302
  174. end type
  175. type ln_bar from w_publ_base_style`ln_bar within w_taobao_taskamt
  176. end type
  177. type ln_bar2 from w_publ_base_style`ln_bar2 within w_taobao_taskamt
  178. end type
  179. type r_bar from w_publ_base_style`r_bar within w_taobao_taskamt
  180. end type
  181. type dw_1 from u_dw_rbtnfilter within w_taobao_taskamt
  182. integer y = 280
  183. integer width = 3314
  184. integer height = 1640
  185. integer taborder = 30
  186. boolean bringtotop = true
  187. string dataobject = "dw_taobao_taskamt"
  188. boolean hscrollbar = true
  189. boolean vscrollbar = true
  190. boolean hsplitscroll = true
  191. boolean rbutton_filter_use = true
  192. boolean rbutton_setposition_use = true
  193. boolean titleclick_sort_use = true
  194. end type
  195. event clicked;call super::clicked;IF row > 0 THEN
  196. This.SetRow(row)
  197. this.selectrow(row, true)
  198. END IF
  199. end event
  200. event rowfocuschanged;call super::rowfocuschanged;This.SelectRow(0, False)
  201. Long row
  202. row = This.GetRow()
  203. IF row > 0 THEN
  204. This.SelectRow(row, True)
  205. END IF
  206. end event
  207. type cbx_1 from checkbox within w_taobao_taskamt
  208. integer x = 754
  209. integer y = 196
  210. integer width = 274
  211. integer height = 56
  212. boolean bringtotop = true
  213. integer textsize = -9
  214. integer weight = 400
  215. fontcharset fontcharset = gb2312charset!
  216. fontpitch fontpitch = variable!
  217. string facename = "宋体"
  218. long textcolor = 33554432
  219. long backcolor = 67108864
  220. string text = "全选"
  221. end type
  222. event clicked;Long ll_check
  223. IF This.Checked THEN
  224. ll_check = 1
  225. ELSE
  226. ll_check = 0
  227. END IF
  228. Long i
  229. FOR i = 1 To dw_1.RowCount()
  230. dw_1.Object.ch[i] = ll_check
  231. NEXT
  232. end event
  233. event constructor;window ll_win
  234. ll_win = GetParent()
  235. this.backcolor = ll_win.backcolor
  236. end event
  237. type sle_1 from singlelineedit within w_taobao_taskamt
  238. integer x = 1536
  239. integer y = 180
  240. integer width = 526
  241. integer height = 84
  242. integer taborder = 50
  243. boolean bringtotop = true
  244. integer textsize = -9
  245. integer weight = 400
  246. fontcharset fontcharset = gb2312charset!
  247. fontpitch fontpitch = variable!
  248. string facename = "宋体"
  249. long textcolor = 33554432
  250. borderstyle borderstyle = stylelowered!
  251. end type
  252. type st_1 from statictext within w_taobao_taskamt
  253. integer x = 1143
  254. integer y = 200
  255. integer width = 402
  256. integer height = 48
  257. boolean bringtotop = true
  258. integer textsize = -9
  259. integer weight = 400
  260. fontcharset fontcharset = gb2312charset!
  261. fontpitch fontpitch = variable!
  262. string facename = "宋体"
  263. long textcolor = 33554432
  264. long backcolor = 67108864
  265. string text = "淘宝主订单号含"
  266. boolean focusrectangle = false
  267. end type
  268. event constructor;window ll_win
  269. ll_win = GetParent()
  270. this.backcolor = ll_win.backcolor
  271. end event
  272. type cb_reflash from uo_imflatbutton within w_taobao_taskamt
  273. integer width = 151
  274. integer height = 164
  275. integer taborder = 40
  276. boolean bringtotop = true
  277. string text = "刷新"
  278. string normalpicname = "refresh.BMP"
  279. integer picsize = 16
  280. toolbaralignment pic_align = alignattop!
  281. boolean border = false
  282. end type
  283. event clicked;call super::clicked;String ls_tid
  284. ls_tid = sle_1.Text
  285. IF Pos(ls_tid, '%') <= 0 THEN ls_tid = '%' + ls_tid + '%'
  286. dw_1.Retrieve(ls_tid)
  287. end event
  288. type cb_takeamt from uo_imflatbutton within w_taobao_taskamt
  289. integer x = 151
  290. integer width = 151
  291. integer height = 164
  292. integer taborder = 50
  293. boolean bringtotop = true
  294. string text = "收款"
  295. integer picsize = 16
  296. toolbaralignment pic_align = alignattop!
  297. boolean border = false
  298. end type
  299. event clicked;call super::clicked;parent.triggerevent('ue_take_amt')
  300. end event
  301. type ln_1 from line within w_taobao_taskamt
  302. long linecolor = 268435456
  303. integer linethickness = 4
  304. integer beginy = 268
  305. integer endx = 2007
  306. integer endy = 268
  307. end type
  308. type ln_2 from line within w_taobao_taskamt
  309. long linecolor = 16777215
  310. integer linethickness = 4
  311. integer beginy = 272
  312. integer endx = 2039
  313. integer endy = 272
  314. end type