w_mtrl_propel_ljfieb.srw 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014
  1. $PBExportHeader$w_mtrl_propel_ljfieb.srw
  2. forward
  3. global type w_mtrl_propel_ljfieb from w_publ_base
  4. end type
  5. type cb_post from uo_imflatbutton within w_mtrl_propel_ljfieb
  6. end type
  7. type dw_1 from u_dw_rbtnfilter within w_mtrl_propel_ljfieb
  8. end type
  9. type dw_2 from u_dw_rbtnfilter within w_mtrl_propel_ljfieb
  10. end type
  11. type cb_add_mtrl from uo_imflatbutton within w_mtrl_propel_ljfieb
  12. end type
  13. type cb_del_mtrl from uo_imflatbutton within w_mtrl_propel_ljfieb
  14. end type
  15. type cb_reset_mtrl from uo_imflatbutton within w_mtrl_propel_ljfieb
  16. end type
  17. type st_1 from statictext within w_mtrl_propel_ljfieb
  18. end type
  19. type st_2 from statictext within w_mtrl_propel_ljfieb
  20. end type
  21. type cb_add_cus from uo_imflatbutton within w_mtrl_propel_ljfieb
  22. end type
  23. type cb_del_cus from uo_imflatbutton within w_mtrl_propel_ljfieb
  24. end type
  25. type cb_reset_cus from uo_imflatbutton within w_mtrl_propel_ljfieb
  26. end type
  27. type st_3 from statictext within w_mtrl_propel_ljfieb
  28. end type
  29. type mle_1 from multilineedit within w_mtrl_propel_ljfieb
  30. end type
  31. type st_4 from statictext within w_mtrl_propel_ljfieb
  32. end type
  33. type mle_2 from multilineedit within w_mtrl_propel_ljfieb
  34. end type
  35. type rb_1 from radiobutton within w_mtrl_propel_ljfieb
  36. end type
  37. type rb_2 from radiobutton within w_mtrl_propel_ljfieb
  38. end type
  39. type cb_push_op from uo_imflatbutton within w_mtrl_propel_ljfieb
  40. end type
  41. type cb_add_spt from uo_imflatbutton within w_mtrl_propel_ljfieb
  42. end type
  43. type ln_bar from line within w_mtrl_propel_ljfieb
  44. end type
  45. type ln_bar2 from line within w_mtrl_propel_ljfieb
  46. end type
  47. type r_bar from rectangle within w_mtrl_propel_ljfieb
  48. end type
  49. end forward
  50. global type w_mtrl_propel_ljfieb from w_publ_base
  51. integer width = 3602
  52. integer height = 2380
  53. string title = "资料推送"
  54. boolean maxbox = true
  55. windowstate windowstate = maximized!
  56. cb_post cb_post
  57. dw_1 dw_1
  58. dw_2 dw_2
  59. cb_add_mtrl cb_add_mtrl
  60. cb_del_mtrl cb_del_mtrl
  61. cb_reset_mtrl cb_reset_mtrl
  62. st_1 st_1
  63. st_2 st_2
  64. cb_add_cus cb_add_cus
  65. cb_del_cus cb_del_cus
  66. cb_reset_cus cb_reset_cus
  67. st_3 st_3
  68. mle_1 mle_1
  69. st_4 st_4
  70. mle_2 mle_2
  71. rb_1 rb_1
  72. rb_2 rb_2
  73. cb_push_op cb_push_op
  74. cb_add_spt cb_add_spt
  75. ln_bar ln_bar
  76. ln_bar2 ln_bar2
  77. r_bar r_bar
  78. end type
  79. global w_mtrl_propel_ljfieb w_mtrl_propel_ljfieb
  80. type variables
  81. uo_ljfieb uo_fieb
  82. Transaction tr_eb_sqlca
  83. end variables
  84. forward prototypes
  85. public function integer wf_fillmtrltype (long arg_mtrltypeid, ref long arg_mtrltypeid_arr[], ref string arg_msg)
  86. end prototypes
  87. public function integer wf_fillmtrltype (long arg_mtrltypeid, ref long arg_mtrltypeid_arr[], ref string arg_msg);Int rslt = 1
  88. Long i
  89. Long mx
  90. mx = UpperBound(arg_mtrltypeid_arr)
  91. FOR i = 1 To mx
  92. IF arg_mtrltypeid_arr[i] = arg_mtrltypeid THEN
  93. RETURN rslt
  94. END IF
  95. NEXT
  96. mx++
  97. arg_mtrltypeid_arr[mx] = arg_mtrltypeid
  98. Long pid
  99. SELECT parentid
  100. INTO :pid
  101. FROM u_mtrltype
  102. Where mtrltypeid = :arg_mtrltypeid;
  103. IF sqlca.SQLCode <> 0 THEN
  104. pid = 0
  105. END IF
  106. if pid > 0 then
  107. if wf_fillmtrltype(pid, arg_mtrltypeid_arr, arg_msg) <> 1 then
  108. rslt = 0
  109. goto ext
  110. end if
  111. end if
  112. ext:
  113. return rslt
  114. end function
  115. on w_mtrl_propel_ljfieb.create
  116. int iCurrent
  117. call super::create
  118. this.cb_post=create cb_post
  119. this.dw_1=create dw_1
  120. this.dw_2=create dw_2
  121. this.cb_add_mtrl=create cb_add_mtrl
  122. this.cb_del_mtrl=create cb_del_mtrl
  123. this.cb_reset_mtrl=create cb_reset_mtrl
  124. this.st_1=create st_1
  125. this.st_2=create st_2
  126. this.cb_add_cus=create cb_add_cus
  127. this.cb_del_cus=create cb_del_cus
  128. this.cb_reset_cus=create cb_reset_cus
  129. this.st_3=create st_3
  130. this.mle_1=create mle_1
  131. this.st_4=create st_4
  132. this.mle_2=create mle_2
  133. this.rb_1=create rb_1
  134. this.rb_2=create rb_2
  135. this.cb_push_op=create cb_push_op
  136. this.cb_add_spt=create cb_add_spt
  137. this.ln_bar=create ln_bar
  138. this.ln_bar2=create ln_bar2
  139. this.r_bar=create r_bar
  140. iCurrent=UpperBound(this.Control)
  141. this.Control[iCurrent+1]=this.cb_post
  142. this.Control[iCurrent+2]=this.dw_1
  143. this.Control[iCurrent+3]=this.dw_2
  144. this.Control[iCurrent+4]=this.cb_add_mtrl
  145. this.Control[iCurrent+5]=this.cb_del_mtrl
  146. this.Control[iCurrent+6]=this.cb_reset_mtrl
  147. this.Control[iCurrent+7]=this.st_1
  148. this.Control[iCurrent+8]=this.st_2
  149. this.Control[iCurrent+9]=this.cb_add_cus
  150. this.Control[iCurrent+10]=this.cb_del_cus
  151. this.Control[iCurrent+11]=this.cb_reset_cus
  152. this.Control[iCurrent+12]=this.st_3
  153. this.Control[iCurrent+13]=this.mle_1
  154. this.Control[iCurrent+14]=this.st_4
  155. this.Control[iCurrent+15]=this.mle_2
  156. this.Control[iCurrent+16]=this.rb_1
  157. this.Control[iCurrent+17]=this.rb_2
  158. this.Control[iCurrent+18]=this.cb_push_op
  159. this.Control[iCurrent+19]=this.cb_add_spt
  160. this.Control[iCurrent+20]=this.ln_bar
  161. this.Control[iCurrent+21]=this.ln_bar2
  162. this.Control[iCurrent+22]=this.r_bar
  163. end on
  164. on w_mtrl_propel_ljfieb.destroy
  165. call super::destroy
  166. destroy(this.cb_post)
  167. destroy(this.dw_1)
  168. destroy(this.dw_2)
  169. destroy(this.cb_add_mtrl)
  170. destroy(this.cb_del_mtrl)
  171. destroy(this.cb_reset_mtrl)
  172. destroy(this.st_1)
  173. destroy(this.st_2)
  174. destroy(this.cb_add_cus)
  175. destroy(this.cb_del_cus)
  176. destroy(this.cb_reset_cus)
  177. destroy(this.st_3)
  178. destroy(this.mle_1)
  179. destroy(this.st_4)
  180. destroy(this.mle_2)
  181. destroy(this.rb_1)
  182. destroy(this.rb_2)
  183. destroy(this.cb_push_op)
  184. destroy(this.cb_add_spt)
  185. destroy(this.ln_bar)
  186. destroy(this.ln_bar2)
  187. destroy(this.r_bar)
  188. end on
  189. event open;call super::open;tr_eb_sqlca = sys_email_sqlca // 电子商务连接
  190. uo_fieb = create uo_ljfieb
  191. uo_fieb.commit_transaction = tr_eb_sqlca
  192. end event
  193. event resize;call super::resize;ln_bar.endx = this.width
  194. ln_bar2.endx = this.width
  195. r_bar.width = this.width
  196. //dw_1.width = this.WorkSpaceWidth() - 10
  197. dw_2.width = this.WorkSpaceWidth() - 10
  198. dw_2.height = this.workspaceheight() - dw_2.y - 30
  199. mle_1.width = dw_2.width - dw_1.width - 4
  200. mle_2.width = mle_1.width
  201. end event
  202. event close;call super::close;destroy uo_fieb
  203. end event
  204. type cb_func from w_publ_base`cb_func within w_mtrl_propel_ljfieb
  205. boolean visible = false
  206. integer width = 311
  207. integer height = 96
  208. string text = "功能"
  209. string normalpicname = ""
  210. integer picsize = 0
  211. toolbaralignment pic_align = alignatleft!
  212. boolean border = true
  213. end type
  214. type cb_exit from w_publ_base`cb_exit within w_mtrl_propel_ljfieb
  215. integer x = 270
  216. integer width = 151
  217. integer height = 164
  218. integer picsize = 16
  219. toolbaralignment pic_align = alignattop!
  220. boolean border = false
  221. end type
  222. type cb_post from uo_imflatbutton within w_mtrl_propel_ljfieb
  223. integer x = 14
  224. integer width = 219
  225. integer height = 164
  226. integer taborder = 30
  227. boolean bringtotop = true
  228. string text = "提交"
  229. string normalpicname = "update2.BMP"
  230. integer picsize = 16
  231. toolbaralignment pic_align = alignattop!
  232. boolean border = false
  233. end type
  234. event clicked;call super::clicked;
  235. IF sys_email_sqlca.DBHandle() = 0 THEN
  236. MessageBox('Error','电子商务数据库连接失败,请检查')
  237. RETURN
  238. END IF
  239. Long ll_sendcuscommid,ll_receivecuscommid
  240. Long ll_i,ll_j,ll_k
  241. String ls_commcode,ls_mtrlcode,ls_commsccode,ls_cuscode
  242. s_mtrldef_array s_post_mtrl
  243. String arg_msg,arg_msg_tmp
  244. Long ll_suc,ll_fail
  245. String arg_summary,arg_postscript,arg_remark
  246. Long ll_commid_ec
  247. Long arr_mtrltypeid[]
  248. IF rb_1.Checked THEN
  249. IF dw_1.RowCount() = 0 THEN
  250. MessageBox('系统提示','请先选择接收者!')
  251. RETURN
  252. END IF
  253. ELSE
  254. SELECT CusCommID
  255. INTO :ll_commid_ec
  256. FROM LJFIEB_CusComm
  257. Where CusType = 5 Using tr_eb_sqlca;
  258. IF tr_eb_sqlca.SQLCode <> 0 THEN
  259. MessageBox('Error','查询电子商务网站通讯连接失败,请先确认已设置电子商务网站通讯连接'+tr_eb_sqlca.SQLErrText)
  260. RETURN
  261. END IF
  262. IF ll_commid_ec = 0 THEN
  263. MessageBox('系统提示','请先确认已设置电子商务网站通讯连接!')
  264. RETURN
  265. END IF
  266. END IF
  267. IF dw_2.RowCount() = 0 THEN
  268. MessageBox('系统提示','请先选择要推送的产品资料!')
  269. RETURN
  270. END IF
  271. IF MessageBox('系统提示','确定要把资料列表中的产品推送到列表中的接收者吗?',question!,yesno!) = 2 THEN RETURN
  272. arg_msg = ''
  273. dw_1.AcceptText()
  274. dw_2.AcceptText()
  275. SELECT CusCommID
  276. INTO :ll_sendcuscommid
  277. FROM LJFIEB_CusComm
  278. Where CusType = 0 Using tr_eb_sqlca;
  279. IF tr_eb_sqlca.SQLCode <> 0 THEN
  280. MessageBox('Error','查询本公司企业编号失败,'+tr_eb_sqlca.SQLErrText)
  281. RETURN
  282. END IF
  283. IF rb_1.Checked THEN
  284. FOR ll_i = 1 To dw_1.RowCount()
  285. ll_receivecuscommid = dw_1.Object.CusCommID[ll_i]
  286. IF IsNull(ll_receivecuscommid) THEN ll_receivecuscommid = 0
  287. IF ll_receivecuscommid = 0 THEN
  288. MessageBox('系统提示','接收者列表第'+String(ll_i)+'行,找不到对应的企业编号,请检查')
  289. RETURN
  290. END IF
  291. NEXT
  292. END IF
  293. Long ll_ifsend = 0
  294. FOR ll_i = 1 To dw_2.RowCount()
  295. ls_mtrlcode = dw_2.Object.mtrlcode[ll_i]
  296. // ll_ifsend = dw_2.Object.withpic[ll_i]
  297. IF f_ljfieb_fillmtrl(ls_mtrlcode, ll_ifsend, s_post_mtrl, arg_msg) <> 1 THEN
  298. MessageBox('Error','资料列表第'+String(ll_i)+'行,' + arg_msg)
  299. RETURN
  300. END IF
  301. NEXT
  302. s_packet_ljfieb s_pack,s_return
  303. //
  304. //
  305. //s_pack.summary = '资料推送'
  306. //
  307. //OpenWithParm(w_dscrp_edit_ljfieb,s_pack)
  308. //
  309. //s_return = Message.PowerObjectParm
  310. //IF s_return.returnflag <> 1 THEN RETURN
  311. ////arg_summary = s_return.summary
  312. arg_postscript = mle_1.Text
  313. arg_remark = mle_2.Text
  314. IF rb_1.Checked THEN
  315. FOR ll_i = 1 To dw_1.RowCount()
  316. ll_receivecuscommid = dw_1.Object.CusCommID[ll_i]
  317. ls_commsccode = dw_1.Object.commsccode[ll_i]
  318. ls_cuscode = dw_1.Object.cuscode[ll_i]
  319. IF uo_fieb.add_mtrldef(ll_sendcuscommid,'',ll_receivecuscommid,ls_commsccode,s_post_mtrl,arg_summary,arg_postscript,arg_remark,arg_msg_tmp,True) = 0 THEN
  320. arg_msg = arg_msg + '第'+String(ll_i)+'行,客户:'+ls_cuscode+',提交资料失败,'+arg_msg_tmp + '~r~n'
  321. ll_fail++
  322. CONTINUE
  323. END IF
  324. ll_suc++
  325. NEXT
  326. ELSE
  327. ll_receivecuscommid = ll_commid_ec
  328. FOR ll_i = 1 To UpperBound(s_post_mtrl.mtrltypeid)
  329. IF wf_fillmtrltype(s_post_mtrl.mtrltypeid[ll_i], arr_mtrltypeid, arg_msg_tmp) <> 1 THEN
  330. arg_msg = '查询资料类别失败,'+arg_msg_tmp + '~r~n'
  331. ll_fail++
  332. END IF
  333. NEXT
  334. IF uo_fieb.send_mtrltype(ll_sendcuscommid,'',ll_receivecuscommid,'',arr_mtrltypeid,arg_msg_tmp,True) = 0 THEN
  335. arg_msg = '提交类别到电子商务网站失败,'+arg_msg_tmp + '~r~n'
  336. ll_fail++
  337. END IF
  338. IF uo_fieb.add_mtrldef(ll_sendcuscommid,'',ll_receivecuscommid,'',s_post_mtrl,arg_summary,arg_postscript,arg_remark,arg_msg_tmp,True) = 0 THEN
  339. arg_msg = '提交资料到电子商务网站失败,'+arg_msg_tmp + '~r~n'
  340. ll_fail++
  341. END IF
  342. END IF
  343. IF rb_1.Checked THEN
  344. MessageBox(publ_operator,'提交资料完成!成功:'+String(ll_suc)+',失败:'+String(ll_fail))
  345. ELSE
  346. MessageBox(publ_operator,'提交资料完成!')
  347. END IF
  348. IF ll_fail > 0 THEN
  349. OpenWithParm(w_message_err,arg_msg)
  350. ELSE
  351. Close(Parent)
  352. END IF
  353. end event
  354. type dw_1 from u_dw_rbtnfilter within w_mtrl_propel_ljfieb
  355. integer y = 284
  356. integer width = 2149
  357. integer height = 720
  358. integer taborder = 20
  359. boolean bringtotop = true
  360. string title = "接收者"
  361. string dataobject = "dw_cust_comm_accept_propel"
  362. boolean hscrollbar = true
  363. boolean vscrollbar = true
  364. end type
  365. event rowfocuschanged;call super::rowfocuschanged; IF currentrow <= 0 THEN RETURN
  366. THIS.SelectRow(0,FALSE)
  367. THIS.SelectRow(currentrow,TRUE)
  368. end event
  369. type dw_2 from u_dw_rbtnfilter within w_mtrl_propel_ljfieb
  370. integer y = 1132
  371. integer width = 3579
  372. integer height = 1108
  373. integer taborder = 20
  374. boolean bringtotop = true
  375. string dataobject = "dw_mtrldef_comm_propel"
  376. boolean hscrollbar = true
  377. boolean vscrollbar = true
  378. end type
  379. event rowfocuschanged;call super::rowfocuschanged; IF currentrow <= 0 THEN RETURN
  380. THIS.SelectRow(0,FALSE)
  381. THIS.SelectRow(currentrow,TRUE)
  382. end event
  383. type cb_add_mtrl from uo_imflatbutton within w_mtrl_propel_ljfieb
  384. integer x = 466
  385. integer y = 1020
  386. integer width = 347
  387. integer taborder = 30
  388. boolean bringtotop = true
  389. string text = "增加产品"
  390. string normalpicname = "OPEN.BMP"
  391. integer picsize = 16
  392. end type
  393. event clicked;call super::clicked;Long child_row
  394. Long ll_storageid = 0
  395. Int li_int
  396. String ls_str
  397. child_row = dw_2.GetRow()
  398. IF NOT IsValid(W_mtrldef_edit) THEN
  399. s_edit_index_tran s_ch_tran //传递参数使用
  400. s_ch_tran.if_retrieve_all = FALSE //是否一次RETRIEVE所有行
  401. s_ch_tran.work_mode = 1 //0-单纯编辑模式 1-选择\编辑模式
  402. s_ch_tran.arg_pkid = 0 //目标定位PKID (备用)
  403. s_ch_tran.arg_string_code = '' //查询列(物料编码)部分内容,用于初步筛选
  404. s_ch_tran.if_select_all = TRUE
  405. s_ch_tran.b_long = 0
  406. s_ch_tran.c_long = -1
  407. s_ch_tran.f_long = 0
  408. Long chc = 1,ls_j
  409. dw_2.AcceptText()
  410. THIS.Enabled = FALSE
  411. OpenWithParm(W_mtrldef_edit,s_ch_tran)
  412. THIS.Enabled = TRUE
  413. s_mtrldef_array S_INSCUST
  414. S_INSCUST = Message.PowerObjectParm
  415. dw_2.setredraw(false)
  416. FOR ls_j = 1 TO UpperBound(S_INSCUST.mtrlid)
  417. IF S_INSCUST.mtrlid[ls_j] > 0 THEN
  418. IF dw_2.Find("mtrlid =" + String(s_inscust.mtrlid[ls_j]), 1, dw_2.RowCount()) > 0 THEN CONTINUE
  419. IF dw_2.GetRow() > 0 THEN
  420. IF dw_2.Object.mtrlid[child_row] <> 0 THEN
  421. child_row = dw_2.InsertRow (0)
  422. ELSE
  423. child_row = dw_2.GetRow()
  424. END IF
  425. ELSE
  426. child_row = dw_2.InsertRow (0)
  427. END IF
  428. dw_2.Object.mtrlcode[child_row] = S_INSCUST.mtrlcode[ls_j]
  429. dw_2.Object.mtrlname[child_row] = S_INSCUST.mtrlname[ls_j]
  430. dw_2.Object.mtrlmode[child_row] = S_INSCUST.mtrlmode[ls_j]
  431. dw_2.Object.unit[child_row] = S_INSCUST.unit[ls_j]
  432. dw_2.Object.mtrlid[child_row] = S_INSCUST.mtrlid[ls_j]
  433. dw_2.Object.mtrlsectype[child_row] = S_INSCUST.mtrlsectype[ls_j]
  434. dw_2.Object.zxmtrlmode[child_row] = S_INSCUST.zxmtrlmode[ls_j]
  435. dw_2.Object.usermtrlmode[child_row] = S_INSCUST.usermtrlmode[ls_j]
  436. dw_2.Object.mtrltype[child_row] = S_INSCUST.mtrltype[ls_j]
  437. dw_2.Object.ifcustom[child_row] = S_INSCUST.ifcustom[ls_j]
  438. dw_2.Object.packqty[child_row] = S_INSCUST.packqty[ls_j]
  439. dw_2.Object.prdpackcode[child_row] = S_INSCUST.prdpackcode[ls_j]
  440. dw_2.Object.ifpacktype[child_row] = S_INSCUST.ifpacktype[ls_j]
  441. dw_2.Object.unit_buy[child_row] = S_INSCUST.unit_buy[ls_j]
  442. dw_2.Object.rate_buy[child_row] = S_INSCUST.rate_buy[ls_j]
  443. dw_2.Object.unit_scll[child_row] = S_INSCUST.unit_scll[ls_j]
  444. dw_2.Object.rate_scll[child_row] = S_INSCUST.rate_scll[ls_j]
  445. dw_2.Object.unit_sale[child_row] = S_INSCUST.unit_sale[ls_j]
  446. dw_2.Object.rate_sale[child_row] = S_INSCUST.rate_sale[ls_j]
  447. dw_2.Object.net_weight[child_row] = S_INSCUST.net_weight[ls_j]
  448. dw_2.Object.gross_weight[child_row] = S_INSCUST.gross_weight[ls_j]
  449. dw_2.Object.cubage[child_row] = S_INSCUST.cubage[ls_j]
  450. dw_2.Object.ifpackpro[child_row] = 0 //S_INSCUST.ifpackpro[ls_j]
  451. dw_2.Object.ifpackpro2[child_row] = 0 //S_INSCUST.ifpackpro2[ls_j]
  452. dw_2.Object.ifpack[child_row] = 0 //S_INSCUST.ifpack[ls_j]
  453. dw_2.Object.handtype[child_row] = S_INSCUST.handtype[ls_j]
  454. dw_2.Object.mtrlorigin[child_row] = S_INSCUST.mtrlorigin[ls_j]
  455. dw_2.Object.mtrlprp[child_row] = S_INSCUST.mtrlprp[ls_j]
  456. END IF
  457. NEXT
  458. dw_2.setredraw(true)
  459. dw_2.SetFocus()
  460. END IF
  461. end event
  462. type cb_del_mtrl from uo_imflatbutton within w_mtrl_propel_ljfieb
  463. integer x = 864
  464. integer y = 1020
  465. integer width = 366
  466. integer taborder = 40
  467. boolean bringtotop = true
  468. string text = "删除产品"
  469. string normalpicname = "DELETE.BMP"
  470. integer picsize = 16
  471. end type
  472. event clicked;call super::clicked;IF dw_2.GetRow() <= 0 THEN
  473. MessageBox('系统提示','请选择要删除的对象')
  474. RETURN
  475. END IF
  476. IF MessageBox ("询问","是否确定要删除当前选中的产品资料?",Question!,YesNo! ) = 2 THEN RETURN
  477. dw_2.DeleteRow (dw_2.GetRow())
  478. end event
  479. type cb_reset_mtrl from uo_imflatbutton within w_mtrl_propel_ljfieb
  480. integer x = 1280
  481. integer y = 1020
  482. integer width = 457
  483. integer taborder = 40
  484. boolean bringtotop = true
  485. string text = "清空产品列表"
  486. string normalpicname = "p2.BMP"
  487. integer picsize = 16
  488. end type
  489. event clicked;call super::clicked;if dw_2.rowcount() = 0 then
  490. messagebox('系统提示','接收者列表已清空')
  491. return
  492. end if
  493. IF MessageBox ("询问","是否确定要清空产品列表?",Question!,YesNo! ) = 2 THEN RETURN
  494. dw_2.reset()
  495. end event
  496. type st_1 from statictext within w_mtrl_propel_ljfieb
  497. integer x = 37
  498. integer y = 1060
  499. integer width = 402
  500. integer height = 48
  501. boolean bringtotop = true
  502. integer textsize = -9
  503. integer weight = 400
  504. fontcharset fontcharset = gb2312charset!
  505. fontpitch fontpitch = variable!
  506. string facename = "宋体"
  507. long textcolor = 33554432
  508. long backcolor = 134217739
  509. string text = "推送产品列表"
  510. boolean focusrectangle = false
  511. end type
  512. type st_2 from statictext within w_mtrl_propel_ljfieb
  513. integer x = 37
  514. integer y = 220
  515. integer width = 325
  516. integer height = 52
  517. boolean bringtotop = true
  518. integer textsize = -9
  519. integer weight = 400
  520. fontcharset fontcharset = gb2312charset!
  521. fontpitch fontpitch = variable!
  522. string facename = "宋体"
  523. long textcolor = 33554432
  524. long backcolor = 134217739
  525. string text = "接收者列表"
  526. boolean focusrectangle = false
  527. end type
  528. type cb_add_cus from uo_imflatbutton within w_mtrl_propel_ljfieb
  529. integer x = 466
  530. integer y = 180
  531. integer width = 389
  532. integer taborder = 40
  533. boolean bringtotop = true
  534. string text = "增加客户"
  535. string normalpicname = "OPEN.BMP"
  536. integer picsize = 16
  537. end type
  538. event clicked;call super::clicked;Long uc_row,ls_j
  539. Long child_row,ll_receivecuscommid
  540. IF Not IsValid(w_cust_comm_ch) THEN
  541. s_edit_index_tran s_open //传递参数使用
  542. s_open.if_select_any = True
  543. s_open.b_string = ''
  544. This.Enabled = False
  545. OpenWithParm(w_cust_comm_ch,s_open)
  546. This.Enabled = True
  547. s_custom_arr s_inscust
  548. s_inscust = Message.PowerObjectParm //接受返回结构
  549. dw_1.SetRedraw(False)
  550. FOR ls_j = 1 To UpperBound(s_inscust.cusid)
  551. IF s_inscust.cusid[ls_j] > 0 THEN //正常返回值则可以取以下值
  552. IF dw_1.Find("commcode ='" + s_inscust.commcode[ls_j] + "'", 1, dw_1.RowCount()) > 0 THEN CONTINUE
  553. IF dw_1.GetRow() > 0 THEN
  554. IF dw_1.Object.cusid[dw_1.GetRow()] <> 0 THEN
  555. child_row = dw_1.InsertRow (0)
  556. ELSE
  557. child_row = dw_1.GetRow()
  558. END IF
  559. ELSE
  560. child_row = dw_1.InsertRow (0)
  561. END IF
  562. dw_1.Object.cusid[child_row] = s_inscust.cusid[ls_j]
  563. dw_1.Object.cuscode[child_row] = s_inscust.cuscode[ls_j]
  564. dw_1.Object.Name[child_row] = s_inscust.Name[ls_j]
  565. dw_1.Object.cusareaname[child_row] = s_inscust.cusareaname[ls_j]
  566. dw_1.Object.commcode[child_row] = s_inscust.commcode[ls_j]
  567. dw_1.Object.commsccode[child_row] = s_inscust.commsccode[ls_j]
  568. SELECT CusCommID
  569. INTO :ll_receivecuscommid
  570. FROM LJFIEB_CusComm
  571. Where cuscode = :s_inscust.commcode[ls_j] using tr_eb_sqlca;
  572. IF tr_eb_sqlca.SQLCode <> 0 THEN
  573. ll_receivecuscommid = 0
  574. END IF
  575. dw_1.Object.CusCommID[child_row] = ll_receivecuscommid
  576. END IF
  577. NEXT
  578. dw_1.SetRedraw(True)
  579. END IF
  580. end event
  581. type cb_del_cus from uo_imflatbutton within w_mtrl_propel_ljfieb
  582. integer x = 1289
  583. integer y = 180
  584. integer width = 384
  585. integer taborder = 40
  586. boolean bringtotop = true
  587. string text = "删除接收者"
  588. string normalpicname = "DELETE.BMP"
  589. integer picsize = 16
  590. end type
  591. event clicked;call super::clicked;IF dw_1.GetRow() <= 0 THEN
  592. MessageBox('系统提示','请选择要删除的对象')
  593. RETURN
  594. END IF
  595. IF MessageBox ("询问","是否确定要删除当前选中的接收者?",Question!,YesNo! ) = 2 THEN RETURN
  596. dw_1.DeleteRow (dw_1.GetRow())
  597. end event
  598. type cb_reset_cus from uo_imflatbutton within w_mtrl_propel_ljfieb
  599. integer x = 1696
  600. integer y = 180
  601. integer width = 494
  602. integer taborder = 50
  603. boolean bringtotop = true
  604. string text = "清空接收者列表"
  605. string normalpicname = "p2.BMP"
  606. integer picsize = 16
  607. end type
  608. event clicked;call super::clicked;if dw_1.rowcount() = 0 then
  609. return
  610. end if
  611. IF MessageBox ("询问","是否确定要清空接收者列表?",Question!,YesNo! ) = 2 THEN RETURN
  612. dw_1.reset()
  613. end event
  614. type st_3 from statictext within w_mtrl_propel_ljfieb
  615. integer x = 2162
  616. integer y = 292
  617. integer width = 142
  618. integer height = 56
  619. boolean bringtotop = true
  620. integer textsize = -9
  621. integer weight = 400
  622. fontcharset fontcharset = gb2312charset!
  623. fontpitch fontpitch = variable!
  624. string facename = "宋体"
  625. long textcolor = 33554432
  626. long backcolor = 134217739
  627. string text = "附言"
  628. boolean focusrectangle = false
  629. end type
  630. type mle_1 from multilineedit within w_mtrl_propel_ljfieb
  631. integer x = 2153
  632. integer y = 352
  633. integer width = 1426
  634. integer height = 408
  635. integer taborder = 50
  636. boolean bringtotop = true
  637. integer textsize = -9
  638. integer weight = 400
  639. fontcharset fontcharset = gb2312charset!
  640. fontpitch fontpitch = variable!
  641. string facename = "宋体"
  642. long textcolor = 33554432
  643. boolean vscrollbar = true
  644. boolean autovscroll = true
  645. borderstyle borderstyle = stylelowered!
  646. end type
  647. type st_4 from statictext within w_mtrl_propel_ljfieb
  648. integer x = 2162
  649. integer y = 772
  650. integer width = 128
  651. integer height = 48
  652. boolean bringtotop = true
  653. integer textsize = -9
  654. integer weight = 400
  655. fontcharset fontcharset = gb2312charset!
  656. fontpitch fontpitch = variable!
  657. string facename = "宋体"
  658. long textcolor = 33554432
  659. long backcolor = 134217739
  660. string text = "备注"
  661. boolean focusrectangle = false
  662. end type
  663. type mle_2 from multilineedit within w_mtrl_propel_ljfieb
  664. integer x = 2153
  665. integer y = 832
  666. integer width = 1426
  667. integer height = 164
  668. integer taborder = 60
  669. boolean bringtotop = true
  670. integer textsize = -9
  671. integer weight = 400
  672. fontcharset fontcharset = gb2312charset!
  673. fontpitch fontpitch = variable!
  674. string facename = "宋体"
  675. long textcolor = 33554432
  676. boolean vscrollbar = true
  677. boolean autovscroll = true
  678. borderstyle borderstyle = stylelowered!
  679. end type
  680. type rb_1 from radiobutton within w_mtrl_propel_ljfieb
  681. integer x = 562
  682. integer y = 60
  683. integer width = 402
  684. integer height = 60
  685. boolean bringtotop = true
  686. integer textsize = -9
  687. integer weight = 400
  688. fontcharset fontcharset = gb2312charset!
  689. fontpitch fontpitch = variable!
  690. string facename = "宋体"
  691. long textcolor = 33554432
  692. long backcolor = 67108864
  693. string text = "供应链模式"
  694. boolean checked = true
  695. end type
  696. event constructor;this.backcolor = 14215660
  697. end event
  698. event clicked;cb_add_cus.Enabled = true
  699. cb_del_cus.Enabled = true
  700. cb_reset_cus.Enabled = true
  701. dw_1.Enabled = true
  702. cb_push_op.Visible = False
  703. end event
  704. type rb_2 from radiobutton within w_mtrl_propel_ljfieb
  705. integer x = 1033
  706. integer y = 60
  707. integer width = 411
  708. integer height = 60
  709. boolean bringtotop = true
  710. integer textsize = -9
  711. integer weight = 400
  712. fontcharset fontcharset = gb2312charset!
  713. fontpitch fontpitch = variable!
  714. string facename = "宋体"
  715. long textcolor = 33554432
  716. long backcolor = 67108864
  717. string text = "客户协同模式"
  718. end type
  719. event constructor;this.backcolor = 14215660
  720. end event
  721. event clicked;cb_add_cus.Enabled = False
  722. cb_del_cus.Enabled = False
  723. cb_reset_cus.Enabled = False
  724. dw_1.Enabled = False
  725. cb_push_op.Visible = True
  726. dw_1.reset()
  727. end event
  728. type cb_push_op from uo_imflatbutton within w_mtrl_propel_ljfieb
  729. boolean visible = false
  730. integer x = 1522
  731. integer width = 274
  732. integer height = 164
  733. integer taborder = 40
  734. boolean bringtotop = true
  735. string text = "同步选项"
  736. string normalpicname = "update2.BMP"
  737. integer picsize = 16
  738. toolbaralignment pic_align = alignattop!
  739. boolean border = false
  740. end type
  741. event clicked;call super::clicked;
  742. IF sys_email_sqlca.DBHandle() = 0 THEN
  743. MessageBox('Error','电子商务数据库连接失败,请检查')
  744. RETURN
  745. END IF
  746. String ls_msg
  747. IF uo_fieb.send_web_option(ls_msg) = 0 THEN
  748. MessageBox('Error',ls_msg)
  749. RETURN
  750. END IF
  751. IF uo_fieb.send_web_scdef(ls_msg) = 0 THEN
  752. MessageBox('Error',ls_msg)
  753. RETURN
  754. END IF
  755. IF uo_fieb.send_web_currency(ls_msg) = 0 THEN
  756. MessageBox('Error',ls_msg)
  757. RETURN
  758. END IF
  759. IF uo_fieb.send_web_banktype(ls_msg) = 0 THEN
  760. MessageBox('Error',ls_msg)
  761. RETURN
  762. END IF
  763. MessageBox('OK', '同步成功')
  764. end event
  765. type cb_add_spt from uo_imflatbutton within w_mtrl_propel_ljfieb
  766. integer x = 878
  767. integer y = 180
  768. integer width = 389
  769. integer taborder = 50
  770. boolean bringtotop = true
  771. string text = "增加供应商"
  772. string normalpicname = "OPEN.BMP"
  773. integer picsize = 16
  774. end type
  775. event clicked;call super::clicked;Long uc_row,ls_j
  776. Long child_row,ll_receivecuscommid
  777. IF Not IsValid(w_spt_ecomm_ch) THEN
  778. s_edit_index_tran s_open //传递参数使用
  779. s_open.if_select_any = True
  780. s_open.b_string = ''
  781. This.Enabled = False
  782. OpenWithParm(w_spt_ecomm_ch,s_open)
  783. This.Enabled = True
  784. s_custom_arr s_inscust
  785. s_inscust = Message.PowerObjectParm //接受返回结构
  786. dw_1.SetRedraw(False)
  787. FOR ls_j = 1 To UpperBound(s_inscust.cusid)
  788. IF s_inscust.cusid[ls_j] > 0 THEN //正常返回值则可以取以下值
  789. IF dw_1.Find("commcode ='" + s_inscust.commcode[ls_j] + "'", 1, dw_1.RowCount()) > 0 THEN CONTINUE
  790. IF dw_1.GetRow() > 0 THEN
  791. IF dw_1.Object.cusid[dw_1.GetRow()] <> 0 THEN
  792. child_row = dw_1.InsertRow (0)
  793. ELSE
  794. child_row = dw_1.GetRow()
  795. END IF
  796. ELSE
  797. child_row = dw_1.InsertRow (0)
  798. END IF
  799. dw_1.Object.cusid[child_row] = s_inscust.cusid[ls_j]
  800. dw_1.Object.cuscode[child_row] = s_inscust.cuscode[ls_j]
  801. dw_1.Object.Name[child_row] = s_inscust.Name[ls_j]
  802. // dw_1.Object.cusareaname[child_row] = s_inscust.cusareaname[ls_j]
  803. dw_1.Object.commcode[child_row] = s_inscust.commcode[ls_j]
  804. dw_1.Object.commsccode[child_row] = s_inscust.commsccode[ls_j]
  805. SELECT CusCommID
  806. INTO :ll_receivecuscommid
  807. FROM LJFIEB_CusComm
  808. Where cuscode = :s_inscust.commcode[ls_j] using tr_eb_sqlca;
  809. IF tr_eb_sqlca.SQLCode <> 0 THEN
  810. ll_receivecuscommid = 0
  811. END IF
  812. dw_1.Object.CusCommID[child_row] = ll_receivecuscommid
  813. END IF
  814. NEXT
  815. dw_1.SetRedraw(True)
  816. END IF
  817. end event
  818. type ln_bar from line within w_mtrl_propel_ljfieb
  819. long linecolor = 268435456
  820. integer linethickness = 4
  821. integer beginy = 168
  822. integer endx = 2007
  823. integer endy = 168
  824. end type
  825. type ln_bar2 from line within w_mtrl_propel_ljfieb
  826. long linecolor = 16777215
  827. integer linethickness = 4
  828. integer beginy = 172
  829. integer endx = 2039
  830. integer endy = 172
  831. end type
  832. type r_bar from rectangle within w_mtrl_propel_ljfieb
  833. long linecolor = 16777215
  834. integer linethickness = 4
  835. long fillcolor = 1073741824
  836. integer x = 1531
  837. integer width = 146
  838. integer height = 68
  839. end type
  840. event constructor;this.fillcolor = 14215660
  841. this.linecolor = 14215660
  842. this.x = -1
  843. this.y = -1
  844. this.height = ln_bar.beginy - 5
  845. end event