w_sale_msg_view_ljfieb.srw 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. $PBExportHeader$w_sale_msg_view_ljfieb.srw
  2. forward
  3. global type w_sale_msg_view_ljfieb from w_publ_base
  4. end type
  5. type dw_1 from datawindow within w_sale_msg_view_ljfieb
  6. end type
  7. type mle_1 from multilineedit within w_sale_msg_view_ljfieb
  8. end type
  9. type cb_accept from uo_imflatbutton within w_sale_msg_view_ljfieb
  10. end type
  11. type cb_1 from uo_imflatbutton within w_sale_msg_view_ljfieb
  12. end type
  13. type ln_bar from line within w_sale_msg_view_ljfieb
  14. end type
  15. type ln_bar2 from line within w_sale_msg_view_ljfieb
  16. end type
  17. type r_bar from rectangle within w_sale_msg_view_ljfieb
  18. end type
  19. end forward
  20. global type w_sale_msg_view_ljfieb from w_publ_base
  21. integer width = 2469
  22. integer height = 1976
  23. string title = "客户消息"
  24. boolean minbox = false
  25. windowtype windowtype = response!
  26. dw_1 dw_1
  27. mle_1 mle_1
  28. cb_accept cb_accept
  29. cb_1 cb_1
  30. ln_bar ln_bar
  31. ln_bar2 ln_bar2
  32. r_bar r_bar
  33. end type
  34. global w_sale_msg_view_ljfieb w_sale_msg_view_ljfieb
  35. type variables
  36. Transaction tr_eb_sqlca
  37. s_packet_ljfieb s_inscust
  38. long ins_scid
  39. string ins_sn
  40. uo_ljfieb uo_fieb
  41. long ins_sendid,ins_receid
  42. string ins_sendsccode,ins_reccesccode
  43. int ins_billtype
  44. end variables
  45. forward prototypes
  46. public function integer wf_read ()
  47. end prototypes
  48. public function integer wf_read ();String arg_msg
  49. String ls_SerialNum
  50. SELECT TOP 1 NEWID() INTO :ls_SerialNum
  51. From u_user Using sqlca;
  52. IF sqlca.SQLCode <> 0 THEN
  53. ROLLBACK Using sqlca;
  54. MessageBox('Error','生成序列号失败,'+sqlca.SQLErrText)
  55. RETURN 0
  56. END IF
  57. IF IsNull(ls_SerialNum) THEN ls_SerialNum = ''
  58. IF ls_SerialNum = '' THEN
  59. MessageBox('Error','错误的发送序列号')
  60. RETURN 0
  61. END IF
  62. UPDATE LJFIEB_packet
  63. SET Complete = 1 ,
  64. status = 6,
  65. ConfirmTime = getdate(),
  66. ConfirmUser = :publ_operator
  67. Where SerialNum = :ins_sn Using tr_eb_sqlca;
  68. IF tr_eb_sqlca.SQLCode <> 0 THEN
  69. ROLLBACK Using tr_eb_sqlca;
  70. MessageBox('Errr','更新消息状态失败,'+tr_eb_sqlca.SQLErrText)
  71. RETURN 0
  72. END IF
  73. IF uo_fieb.add_packet(ls_SerialNum,'',ins_receid,ins_reccesccode,ins_sendid,ins_sendsccode,6,'确认消息','','',ins_sn,'',0,arg_msg,True) = 0 THEN
  74. MessageBox('Error','发送确认指令失败 '+arg_msg)
  75. RETURN 0
  76. END IF
  77. return 1
  78. end function
  79. on w_sale_msg_view_ljfieb.create
  80. int iCurrent
  81. call super::create
  82. this.dw_1=create dw_1
  83. this.mle_1=create mle_1
  84. this.cb_accept=create cb_accept
  85. this.cb_1=create cb_1
  86. this.ln_bar=create ln_bar
  87. this.ln_bar2=create ln_bar2
  88. this.r_bar=create r_bar
  89. iCurrent=UpperBound(this.Control)
  90. this.Control[iCurrent+1]=this.dw_1
  91. this.Control[iCurrent+2]=this.mle_1
  92. this.Control[iCurrent+3]=this.cb_accept
  93. this.Control[iCurrent+4]=this.cb_1
  94. this.Control[iCurrent+5]=this.ln_bar
  95. this.Control[iCurrent+6]=this.ln_bar2
  96. this.Control[iCurrent+7]=this.r_bar
  97. end on
  98. on w_sale_msg_view_ljfieb.destroy
  99. call super::destroy
  100. destroy(this.dw_1)
  101. destroy(this.mle_1)
  102. destroy(this.cb_accept)
  103. destroy(this.cb_1)
  104. destroy(this.ln_bar)
  105. destroy(this.ln_bar2)
  106. destroy(this.r_bar)
  107. end on
  108. event open;call super::open;tr_eb_sqlca = sys_email_sqlca // 电子商务连接
  109. IF sys_email_sqlca.DBHandle() = 0 THEN
  110. MessageBox('Error','电子商务数据库连接失败,请检查')
  111. RETURN
  112. END IF
  113. uo_fieb = Create uo_ljfieb
  114. uo_fieb.commit_transaction = tr_eb_sqlca
  115. s_inscust = Message.PowerObjectParm
  116. ins_sn = s_inscust.serialnum
  117. ins_sendid = s_inscust.sendcuscommid
  118. ins_receid = s_inscust.receivecuscommid
  119. ins_sendsccode = s_inscust.sendsccode
  120. ins_reccesccode = s_inscust.receivesccode
  121. ins_billtype = s_inscust.billtype
  122. dw_1.SetTransObject(tr_eb_sqlca)
  123. dw_1.Retrieve(ins_sn)
  124. IF dw_1.GetRow() > 0 THEN
  125. IF dw_1.Object.ljfieb_packet_billtype[dw_1.GetRow()] <> 11 THEN
  126. mle_1.Text = '*' + dw_1.Object.LJFIEB_packet_Summary[dw_1.GetRow()] + '*' + '~r~n' + '~r~n'+ dw_1.Object.LJFIEB_packet_Postscript[dw_1.GetRow()]
  127. ELSE
  128. mle_1.Text = '*' + '拒绝单据:'+ dw_1.Object.ljfieb_packet_relatedcode[dw_1.GetRow()] + '*' + '~r~n' + '~r~n'+ dw_1.Object.LJFIEB_packet_Postscript[dw_1.GetRow()]+ '~r~n'
  129. END IF
  130. ELSE
  131. mle_1.Text = ''
  132. END IF
  133. String ls_SerialNum,arg_msg
  134. SELECT TOP 1 NEWID() INTO :ls_SerialNum
  135. From u_user Using sqlca;
  136. IF sqlca.SQLCode <> 0 THEN
  137. RETURN
  138. END IF
  139. IF IsNull(ls_SerialNum) THEN ls_SerialNum = ''
  140. IF ls_SerialNum = '' THEN
  141. RETURN
  142. END IF
  143. IF uo_fieb.add_packet(ls_SerialNum,'',ins_receid,ins_reccesccode,ins_sendid,ins_sendsccode,5,'打开消息','','',ins_sn,'',0,arg_msg,True) = 0 THEN
  144. RETURN
  145. END IF
  146. end event
  147. event resize;call super::resize;ln_bar.endx = this.width
  148. ln_bar2.endx = this.width
  149. r_bar.width = this.width
  150. end event
  151. type cb_func from w_publ_base`cb_func within w_sale_msg_view_ljfieb
  152. boolean visible = false
  153. end type
  154. type cb_exit from w_publ_base`cb_exit within w_sale_msg_view_ljfieb
  155. integer x = 375
  156. integer width = 183
  157. integer height = 164
  158. integer picsize = 16
  159. toolbaralignment pic_align = alignattop!
  160. boolean border = false
  161. end type
  162. type dw_1 from datawindow within w_sale_msg_view_ljfieb
  163. event ue_vscroll pbm_vscroll
  164. integer x = 18
  165. integer y = 188
  166. integer width = 2377
  167. integer height = 220
  168. integer taborder = 30
  169. boolean bringtotop = true
  170. string title = "none"
  171. string dataobject = "dw_sale_msg_view_ljfieb"
  172. boolean border = false
  173. boolean livescroll = true
  174. borderstyle borderstyle = stylelowered!
  175. end type
  176. event ue_vscroll;return 1
  177. end event
  178. type mle_1 from multilineedit within w_sale_msg_view_ljfieb
  179. integer x = 27
  180. integer y = 412
  181. integer width = 2414
  182. integer height = 1456
  183. integer taborder = 40
  184. boolean bringtotop = true
  185. integer textsize = -9
  186. integer weight = 400
  187. fontcharset fontcharset = gb2312charset!
  188. fontpitch fontpitch = variable!
  189. string facename = "宋体"
  190. long textcolor = 33554432
  191. boolean vscrollbar = true
  192. boolean autovscroll = true
  193. boolean displayonly = true
  194. borderstyle borderstyle = stylelowered!
  195. end type
  196. type cb_accept from uo_imflatbutton within w_sale_msg_view_ljfieb
  197. integer width = 187
  198. integer height = 164
  199. integer taborder = 10
  200. boolean bringtotop = true
  201. string text = "确认"
  202. string normalpicname = "ok.bmp"
  203. integer picsize = 16
  204. toolbaralignment pic_align = alignattop!
  205. boolean border = false
  206. end type
  207. event clicked;call super::clicked;//IF Not f_power_ind(3173,sys_msg_pow) THEN
  208. // MessageBox(publ_operator,sys_msg_pow)
  209. // RETURN
  210. //END IF
  211. IF MessageBox('询问','是否要确认本条消息?',question!,yesno!) = 2 THEN RETURN
  212. if wf_read() = 0 then return
  213. close(parent)
  214. end event
  215. type cb_1 from uo_imflatbutton within w_sale_msg_view_ljfieb
  216. integer x = 187
  217. integer width = 187
  218. integer height = 164
  219. integer taborder = 10
  220. boolean bringtotop = true
  221. string text = "回复"
  222. string normalpicname = "OPEN.BMP"
  223. integer picsize = 16
  224. toolbaralignment pic_align = alignattop!
  225. boolean border = false
  226. end type
  227. event clicked;call super::clicked;//IF Not f_power_ind(3172,sys_msg_pow) THEN
  228. // MessageBox(publ_operator,sys_msg_pow)
  229. // RETURN
  230. //END IF
  231. IF dw_1.GetRow() > 0 THEN
  232. s_edit_index_tran s_buy_msg
  233. s_buy_msg.b_long = ins_billtype // 1 - 选供应商, 2 - 选客户
  234. s_buy_msg.c_long = 1
  235. s_buy_msg.b_string = dw_1.Object.LJFIEB_packet_Summary[dw_1.GetRow()]
  236. s_buy_msg.c_string = dw_1.Object.ljfieb_cuscomm_s_cuscode[dw_1.GetRow()]
  237. s_buy_msg.d_string = dw_1.Object.ljfieb_cuscomm_s_cusname[dw_1.GetRow()]
  238. s_buy_msg.e_string = dw_1.Object.ljfieb_packet_sendsccode[dw_1.GetRow()]
  239. s_buy_msg.f_string = dw_1.Object.LJFIEB_packet_Postscript[dw_1.GetRow()]
  240. OpenWithParm(w_msg_send_ljfieb,s_buy_msg)
  241. Int li_ifsend
  242. li_ifsend = Message.DoubleParm
  243. IF li_ifsend = 1 THEN
  244. IF wf_read() = 0 THEN RETURN
  245. Close(Parent)
  246. END IF
  247. END IF
  248. end event
  249. type ln_bar from line within w_sale_msg_view_ljfieb
  250. long linecolor = 268435456
  251. integer linethickness = 4
  252. integer beginy = 172
  253. integer endx = 3200
  254. integer endy = 172
  255. end type
  256. type ln_bar2 from line within w_sale_msg_view_ljfieb
  257. long linecolor = 16777215
  258. integer linethickness = 4
  259. integer beginx = 9
  260. integer beginy = 176
  261. integer endx = 3273
  262. integer endy = 176
  263. end type
  264. type r_bar from rectangle within w_sale_msg_view_ljfieb
  265. long linecolor = 16777215
  266. integer linethickness = 4
  267. long fillcolor = 1073741824
  268. integer x = 1947
  269. integer width = 87
  270. integer height = 68
  271. end type
  272. event constructor;this.fillcolor = 14215660
  273. this.linecolor = 14215660
  274. this.x = -1
  275. this.y = -1
  276. this.height = ln_bar.beginy - 5
  277. end event