w_mtrl_propel_ljfieb_bak.srw 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776
  1. $PBExportHeader$w_mtrl_propel_ljfieb_bak.srw
  2. forward
  3. global type w_mtrl_propel_ljfieb_bak from w_publ_base
  4. end type
  5. type cb_post from uo_imflatbutton within w_mtrl_propel_ljfieb_bak
  6. end type
  7. type dw_1 from u_dw_rbtnfilter within w_mtrl_propel_ljfieb_bak
  8. end type
  9. type dw_2 from u_dw_rbtnfilter within w_mtrl_propel_ljfieb_bak
  10. end type
  11. type cb_add_mtrl from uo_imflatbutton within w_mtrl_propel_ljfieb_bak
  12. end type
  13. type cb_del_mtrl from uo_imflatbutton within w_mtrl_propel_ljfieb_bak
  14. end type
  15. type cb_reset_mtrl from uo_imflatbutton within w_mtrl_propel_ljfieb_bak
  16. end type
  17. type st_1 from statictext within w_mtrl_propel_ljfieb_bak
  18. end type
  19. type st_2 from statictext within w_mtrl_propel_ljfieb_bak
  20. end type
  21. type cb_add_cus from uo_imflatbutton within w_mtrl_propel_ljfieb_bak
  22. end type
  23. type cb_del_cus from uo_imflatbutton within w_mtrl_propel_ljfieb_bak
  24. end type
  25. type cb_reset_cus from uo_imflatbutton within w_mtrl_propel_ljfieb_bak
  26. end type
  27. type st_3 from statictext within w_mtrl_propel_ljfieb_bak
  28. end type
  29. type mle_1 from multilineedit within w_mtrl_propel_ljfieb_bak
  30. end type
  31. type st_4 from statictext within w_mtrl_propel_ljfieb_bak
  32. end type
  33. type mle_2 from multilineedit within w_mtrl_propel_ljfieb_bak
  34. end type
  35. type ln_bar from line within w_mtrl_propel_ljfieb_bak
  36. end type
  37. type ln_bar2 from line within w_mtrl_propel_ljfieb_bak
  38. end type
  39. type r_bar from rectangle within w_mtrl_propel_ljfieb_bak
  40. end type
  41. end forward
  42. global type w_mtrl_propel_ljfieb_bak from w_publ_base
  43. integer width = 3602
  44. integer height = 2380
  45. string title = "资料推送"
  46. boolean maxbox = true
  47. windowstate windowstate = maximized!
  48. cb_post cb_post
  49. dw_1 dw_1
  50. dw_2 dw_2
  51. cb_add_mtrl cb_add_mtrl
  52. cb_del_mtrl cb_del_mtrl
  53. cb_reset_mtrl cb_reset_mtrl
  54. st_1 st_1
  55. st_2 st_2
  56. cb_add_cus cb_add_cus
  57. cb_del_cus cb_del_cus
  58. cb_reset_cus cb_reset_cus
  59. st_3 st_3
  60. mle_1 mle_1
  61. st_4 st_4
  62. mle_2 mle_2
  63. ln_bar ln_bar
  64. ln_bar2 ln_bar2
  65. r_bar r_bar
  66. end type
  67. global w_mtrl_propel_ljfieb_bak w_mtrl_propel_ljfieb_bak
  68. type variables
  69. uo_ljfieb uo_fieb
  70. Transaction tr_eb_sqlca
  71. end variables
  72. on w_mtrl_propel_ljfieb_bak.create
  73. int iCurrent
  74. call super::create
  75. this.cb_post=create cb_post
  76. this.dw_1=create dw_1
  77. this.dw_2=create dw_2
  78. this.cb_add_mtrl=create cb_add_mtrl
  79. this.cb_del_mtrl=create cb_del_mtrl
  80. this.cb_reset_mtrl=create cb_reset_mtrl
  81. this.st_1=create st_1
  82. this.st_2=create st_2
  83. this.cb_add_cus=create cb_add_cus
  84. this.cb_del_cus=create cb_del_cus
  85. this.cb_reset_cus=create cb_reset_cus
  86. this.st_3=create st_3
  87. this.mle_1=create mle_1
  88. this.st_4=create st_4
  89. this.mle_2=create mle_2
  90. this.ln_bar=create ln_bar
  91. this.ln_bar2=create ln_bar2
  92. this.r_bar=create r_bar
  93. iCurrent=UpperBound(this.Control)
  94. this.Control[iCurrent+1]=this.cb_post
  95. this.Control[iCurrent+2]=this.dw_1
  96. this.Control[iCurrent+3]=this.dw_2
  97. this.Control[iCurrent+4]=this.cb_add_mtrl
  98. this.Control[iCurrent+5]=this.cb_del_mtrl
  99. this.Control[iCurrent+6]=this.cb_reset_mtrl
  100. this.Control[iCurrent+7]=this.st_1
  101. this.Control[iCurrent+8]=this.st_2
  102. this.Control[iCurrent+9]=this.cb_add_cus
  103. this.Control[iCurrent+10]=this.cb_del_cus
  104. this.Control[iCurrent+11]=this.cb_reset_cus
  105. this.Control[iCurrent+12]=this.st_3
  106. this.Control[iCurrent+13]=this.mle_1
  107. this.Control[iCurrent+14]=this.st_4
  108. this.Control[iCurrent+15]=this.mle_2
  109. this.Control[iCurrent+16]=this.ln_bar
  110. this.Control[iCurrent+17]=this.ln_bar2
  111. this.Control[iCurrent+18]=this.r_bar
  112. end on
  113. on w_mtrl_propel_ljfieb_bak.destroy
  114. call super::destroy
  115. destroy(this.cb_post)
  116. destroy(this.dw_1)
  117. destroy(this.dw_2)
  118. destroy(this.cb_add_mtrl)
  119. destroy(this.cb_del_mtrl)
  120. destroy(this.cb_reset_mtrl)
  121. destroy(this.st_1)
  122. destroy(this.st_2)
  123. destroy(this.cb_add_cus)
  124. destroy(this.cb_del_cus)
  125. destroy(this.cb_reset_cus)
  126. destroy(this.st_3)
  127. destroy(this.mle_1)
  128. destroy(this.st_4)
  129. destroy(this.mle_2)
  130. destroy(this.ln_bar)
  131. destroy(this.ln_bar2)
  132. destroy(this.r_bar)
  133. end on
  134. event open;call super::open;tr_eb_sqlca = sys_email_sqlca // 电子商务连接
  135. uo_fieb = create uo_ljfieb
  136. uo_fieb.commit_transaction = tr_eb_sqlca
  137. end event
  138. event resize;call super::resize;ln_bar.endx = this.width
  139. ln_bar2.endx = this.width
  140. r_bar.width = this.width
  141. //dw_1.width = this.WorkSpaceWidth() - 10
  142. dw_2.width = this.WorkSpaceWidth() - 10
  143. dw_2.height = this.workspaceheight() - dw_2.y - 30
  144. mle_1.width = dw_2.width - dw_1.width - 4
  145. mle_2.width = mle_1.width
  146. end event
  147. event close;call super::close;destroy uo_fieb
  148. end event
  149. type cb_func from w_publ_base`cb_func within w_mtrl_propel_ljfieb_bak
  150. boolean visible = false
  151. end type
  152. type cb_exit from w_publ_base`cb_exit within w_mtrl_propel_ljfieb_bak
  153. integer x = 219
  154. integer width = 151
  155. integer height = 164
  156. integer picsize = 16
  157. toolbaralignment pic_align = alignattop!
  158. boolean border = false
  159. end type
  160. type cb_post from uo_imflatbutton within w_mtrl_propel_ljfieb_bak
  161. integer width = 219
  162. integer height = 164
  163. integer taborder = 30
  164. boolean bringtotop = true
  165. string text = "提交"
  166. string normalpicname = "update2.BMP"
  167. integer picsize = 16
  168. toolbaralignment pic_align = alignattop!
  169. boolean border = false
  170. end type
  171. event clicked;call super::clicked;
  172. IF sys_email_sqlca.DBHandle() = 0 THEN
  173. MessageBox('Error','电子商务数据库连接失败,请检查')
  174. RETURN
  175. END IF
  176. IF dw_1.RowCount() = 0 THEN
  177. MessageBox('系统提示','请先选择接收者!')
  178. RETURN
  179. END IF
  180. IF dw_2.RowCount() = 0 THEN
  181. MessageBox('系统提示','请先选择要推送的产品资料!')
  182. RETURN
  183. END IF
  184. IF MessageBox('系统提示','确定要把资料列表中的产品推送到列表中的接收者吗?',question!,yesno!) = 2 THEN RETURN
  185. Long ll_sendcuscommid,ll_receivecuscommid
  186. Long ll_i
  187. String ls_commcode,ls_mtrlcode,ls_commsccode,ls_cuscode
  188. s_mtrldef_array arg_s_mtrldef,s_post_mtrl,s_empty
  189. Long ll_itmx = 0
  190. String arg_msg,arg_msg_tmp
  191. Long ll_suc,ll_fail
  192. String arg_summary,arg_postscript,arg_remark
  193. arg_msg = ''
  194. dw_1.AcceptText()
  195. dw_2.AcceptText()
  196. SELECT CusCommID
  197. INTO :ll_sendcuscommid
  198. FROM LJFIEB_CusComm
  199. Where CusType = 0 Using tr_eb_sqlca;
  200. IF tr_eb_sqlca.SQLCode <> 0 THEN
  201. MessageBox('Error','查询本公司企业编号失败,'+tr_eb_sqlca.SQLErrText)
  202. RETURN
  203. END IF
  204. FOR ll_i = 1 To dw_1.RowCount()
  205. ll_receivecuscommid = dw_1.Object.CusCommID[ll_i]
  206. IF IsNull(ll_receivecuscommid) THEN ll_receivecuscommid = 0
  207. IF ll_receivecuscommid = 0 THEN
  208. MessageBox('系统提示','接收者列表第'+String(ll_i)+'行,找不到对应的企业编号,请检查')
  209. RETURN
  210. END IF
  211. NEXT
  212. FOR ll_i = 1 To dw_2.RowCount()
  213. ls_mtrlcode = dw_2.Object.mtrlcode[ll_i]
  214. arg_s_mtrldef = s_empty
  215. IF f_find_mtrl_ljfieb(ls_mtrlcode,arg_s_mtrldef) = 0 THEN
  216. MessageBox('Error','资料列表第'+String(ll_i)+'行,查询编码:'+ls_mtrlcode+'信息失败')
  217. RETURN
  218. END IF
  219. ll_itmx++
  220. s_post_mtrl.mtrlid[ll_itmx] = arg_s_mtrldef.mtrlid[1]
  221. s_post_mtrl.mtrlcode[ll_itmx] = arg_s_mtrldef.mtrlcode[1]
  222. s_post_mtrl.mtrlname[ll_itmx] = arg_s_mtrldef.mtrlname[1]
  223. s_post_mtrl.mtrltype[ll_itmx] = arg_s_mtrldef.mtrltype[1]
  224. s_post_mtrl.mtrlsectype[ll_itmx] = arg_s_mtrldef.mtrlsectype[1]
  225. s_post_mtrl.mtrlmode[ll_itmx] = arg_s_mtrldef.mtrlmode[1]
  226. s_post_mtrl.Mtrlorigin[ll_itmx] = arg_s_mtrldef.Mtrlorigin[1]
  227. s_post_mtrl.unit[ll_itmx] = arg_s_mtrldef.unit[1]
  228. s_post_mtrl.dscrp[ll_itmx] = arg_s_mtrldef.dscrp[1]
  229. s_post_mtrl.isuse[ll_itmx] = 1
  230. s_post_mtrl.packqty[ll_itmx] = arg_s_mtrldef.packqty[1]
  231. s_post_mtrl.prdpackcode[ll_itmx] = arg_s_mtrldef.prdpackcode[1]
  232. s_post_mtrl.net_weight[ll_itmx] = arg_s_mtrldef.net_weight[1]
  233. s_post_mtrl.gross_weight[ll_itmx] = arg_s_mtrldef.gross_weight[1]
  234. s_post_mtrl.cubage[ll_itmx] = arg_s_mtrldef.cubage[1]
  235. s_post_mtrl.mtrlengname[ll_itmx] = arg_s_mtrldef.mtrlengname[1]
  236. s_post_mtrl.zxmtrlmode[ll_itmx] = arg_s_mtrldef.zxmtrlmode[1]
  237. s_post_mtrl.unit_scll[ll_itmx] = arg_s_mtrldef.unit_scll[1]
  238. s_post_mtrl.unit_buy[ll_itmx] = arg_s_mtrldef.unit_buy[1]
  239. s_post_mtrl.rate_buy[ll_itmx] = arg_s_mtrldef.rate_buy[1]
  240. s_post_mtrl.rate_scll[ll_itmx] = arg_s_mtrldef.rate_scll[1]
  241. s_post_mtrl.rate_sale[ll_itmx] = arg_s_mtrldef.rate_sale[1]
  242. s_post_mtrl.unit_sale[ll_itmx] = arg_s_mtrldef.unit_sale[1]
  243. s_post_mtrl.statusflag[ll_itmx] = arg_s_mtrldef.statusflag[1]
  244. s_post_mtrl.statustype[ll_itmx] = arg_s_mtrldef.statustype[1]
  245. s_post_mtrl.woodcodeflag[ll_itmx] = arg_s_mtrldef.woodcodeflag[1]
  246. s_post_mtrl.woodcodetype[ll_itmx] = arg_s_mtrldef.woodcodetype[1]
  247. s_post_mtrl.pcodeflag[ll_itmx] = arg_s_mtrldef.pcodeflag[1]
  248. s_post_mtrl.pcodetype[ll_itmx] = arg_s_mtrldef.pcodetype[1]
  249. s_post_mtrl.usermtrlmode[ll_itmx] = arg_s_mtrldef.usermtrlmode[1]
  250. s_post_mtrl.ifcustom[ll_itmx] = arg_s_mtrldef.ifcustom[1]
  251. s_post_mtrl.buyunit[ll_itmx] = arg_s_mtrldef.buyunit[1]
  252. s_post_mtrl.wfjgunit[ll_itmx] = arg_s_mtrldef.wfjgunit[1]
  253. s_post_mtrl.scllunit[ll_itmx] = arg_s_mtrldef.scllunit[1]
  254. s_post_mtrl.saleunit[ll_itmx] = arg_s_mtrldef.saleunit[1]
  255. s_post_mtrl.buydec[ll_itmx] = arg_s_mtrldef.buydec[1]
  256. s_post_mtrl.wfjgdec[ll_itmx] = arg_s_mtrldef.wfjgdec[1]
  257. s_post_mtrl.sclldec[ll_itmx] = arg_s_mtrldef.sclldec[1]
  258. s_post_mtrl.saledec[ll_itmx] = arg_s_mtrldef.saledec[1]
  259. s_post_mtrl.status_check[ll_itmx] = arg_s_mtrldef.status_check[1]
  260. s_post_mtrl.woodcode_check[ll_itmx] = arg_s_mtrldef.woodcode_check[1]
  261. s_post_mtrl.pcode_check[ll_itmx] = arg_s_mtrldef.pcode_check[1]
  262. s_post_mtrl.status_config[ll_itmx] = arg_s_mtrldef.status_config[1]
  263. s_post_mtrl.woodcode_config[ll_itmx] = arg_s_mtrldef.woodcode_config[1]
  264. s_post_mtrl.pcode_config[ll_itmx] = arg_s_mtrldef.pcode_config[1]
  265. s_post_mtrl.configcodetype[ll_itmx] = arg_s_mtrldef.configcodetype[1]
  266. s_post_mtrl.configcode[ll_itmx] = arg_s_mtrldef.configcode[1]
  267. s_post_mtrl.configname[ll_itmx] = arg_s_mtrldef.configname[1]
  268. s_post_mtrl.mtrlcolor[ll_itmx] = arg_s_mtrldef.mtrlcolor[1]
  269. s_post_mtrl.handtype[ll_itmx] = arg_s_mtrldef.handtype[1]
  270. s_post_mtrl.ifpack[ll_itmx] = arg_s_mtrldef.ifpack[1]
  271. s_post_mtrl.ifpackpro[ll_itmx] = arg_s_mtrldef.ifpackpro [1]
  272. s_post_mtrl.ifpackpz[ll_itmx] = arg_s_mtrldef.ifpackpz [1]
  273. s_post_mtrl.ifpackpro2[ll_itmx] = arg_s_mtrldef.ifpackpro2[1]
  274. s_post_mtrl.ifpacktype[ll_itmx] = arg_s_mtrldef.ifpacktype[1]
  275. s_post_mtrl.mtrlprp[ll_itmx] = arg_s_mtrldef.mtrlprp[1]
  276. NEXT
  277. s_packet_ljfieb s_pack,s_return
  278. //
  279. //
  280. //s_pack.summary = '资料推送'
  281. //
  282. //OpenWithParm(w_dscrp_edit_ljfieb,s_pack)
  283. //
  284. //s_return = Message.PowerObjectParm
  285. //IF s_return.returnflag <> 1 THEN RETURN
  286. ////arg_summary = s_return.summary
  287. arg_postscript = mle_1.text
  288. arg_remark = mle_2.text
  289. FOR ll_i = 1 To dw_1.RowCount()
  290. ll_receivecuscommid = dw_1.Object.CusCommID[ll_i]
  291. ls_commsccode = dw_1.Object.commsccode[ll_i]
  292. ls_cuscode = dw_1.Object.cuscode[ll_i]
  293. 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
  294. arg_msg = arg_msg + '第'+String(ll_i)+'行,客户:'+ls_cuscode+',提交资料失败,'+arg_msg_tmp + '~r~n'
  295. ll_fail++
  296. CONTINUE
  297. END IF
  298. ll_suc++
  299. NEXT
  300. MessageBox(publ_operator,'提交资料完成!成功:'+String(ll_suc)+',失败:'+String(ll_fail))
  301. IF ll_fail > 0 THEN
  302. OpenWithParm(w_message_err,arg_msg)
  303. ELSE
  304. Close(Parent)
  305. END IF
  306. end event
  307. type dw_1 from u_dw_rbtnfilter within w_mtrl_propel_ljfieb_bak
  308. integer y = 284
  309. integer width = 2149
  310. integer height = 720
  311. integer taborder = 20
  312. boolean bringtotop = true
  313. string title = "接收者"
  314. string dataobject = "dw_cust_comm_accept_propel"
  315. boolean hscrollbar = true
  316. boolean vscrollbar = true
  317. end type
  318. event rowfocuschanged;call super::rowfocuschanged; IF currentrow <= 0 THEN RETURN
  319. THIS.SelectRow(0,FALSE)
  320. THIS.SelectRow(currentrow,TRUE)
  321. end event
  322. type dw_2 from u_dw_rbtnfilter within w_mtrl_propel_ljfieb_bak
  323. integer y = 1132
  324. integer width = 3579
  325. integer height = 1108
  326. integer taborder = 20
  327. boolean bringtotop = true
  328. string dataobject = "dw_mtrldef_comm_propel"
  329. boolean hscrollbar = true
  330. boolean vscrollbar = true
  331. end type
  332. event rowfocuschanged;call super::rowfocuschanged; IF currentrow <= 0 THEN RETURN
  333. THIS.SelectRow(0,FALSE)
  334. THIS.SelectRow(currentrow,TRUE)
  335. end event
  336. type cb_add_mtrl from uo_imflatbutton within w_mtrl_propel_ljfieb_bak
  337. integer x = 466
  338. integer y = 1020
  339. integer width = 347
  340. integer taborder = 30
  341. boolean bringtotop = true
  342. string text = "增加产品"
  343. string normalpicname = "OPEN.BMP"
  344. integer picsize = 16
  345. end type
  346. event clicked;call super::clicked;Long child_row
  347. Long ll_storageid = 0
  348. Int li_int
  349. String ls_str
  350. child_row = dw_2.GetRow()
  351. IF NOT IsValid(W_mtrldef_edit) THEN
  352. s_edit_index_tran s_ch_tran //传递参数使用
  353. s_ch_tran.if_retrieve_all = FALSE //是否一次RETRIEVE所有行
  354. s_ch_tran.work_mode = 1 //0-单纯编辑模式 1-选择\编辑模式
  355. s_ch_tran.arg_pkid = 0 //目标定位PKID (备用)
  356. s_ch_tran.arg_string_code = '' //查询列(物料编码)部分内容,用于初步筛选
  357. s_ch_tran.if_select_all = TRUE
  358. s_ch_tran.b_long = 0
  359. s_ch_tran.c_long = -1
  360. s_ch_tran.f_long = 0
  361. Long chc = 1,ls_j
  362. dw_2.AcceptText()
  363. THIS.Enabled = FALSE
  364. OpenWithParm(W_mtrldef_edit,s_ch_tran)
  365. THIS.Enabled = TRUE
  366. s_mtrldef_array S_INSCUST
  367. S_INSCUST = Message.PowerObjectParm
  368. dw_2.setredraw(false)
  369. FOR ls_j = 1 TO UpperBound(S_INSCUST.mtrlid)
  370. IF S_INSCUST.mtrlid[ls_j] > 0 THEN
  371. IF dw_2.Find("mtrlid =" + String(s_inscust.mtrlid[ls_j]), 1, dw_2.RowCount()) > 0 THEN CONTINUE
  372. IF dw_2.GetRow() > 0 THEN
  373. IF dw_2.Object.mtrlid[child_row] <> 0 THEN
  374. child_row = dw_2.InsertRow (0)
  375. ELSE
  376. child_row = dw_2.GetRow()
  377. END IF
  378. ELSE
  379. child_row = dw_2.InsertRow (0)
  380. END IF
  381. dw_2.Object.mtrlcode[child_row] = S_INSCUST.mtrlcode[ls_j]
  382. dw_2.Object.mtrlname[child_row] = S_INSCUST.mtrlname[ls_j]
  383. dw_2.Object.mtrlmode[child_row] = S_INSCUST.mtrlmode[ls_j]
  384. dw_2.Object.unit[child_row] = S_INSCUST.unit[ls_j]
  385. dw_2.Object.mtrlid[child_row] = S_INSCUST.mtrlid[ls_j]
  386. dw_2.Object.mtrlsectype[child_row] = S_INSCUST.mtrlsectype[ls_j]
  387. dw_2.Object.zxmtrlmode[child_row] = S_INSCUST.zxmtrlmode[ls_j]
  388. dw_2.Object.usermtrlmode[child_row] = S_INSCUST.usermtrlmode[ls_j]
  389. dw_2.Object.mtrltype[child_row] = S_INSCUST.mtrltype[ls_j]
  390. dw_2.Object.ifcustom[child_row] = S_INSCUST.ifcustom[ls_j]
  391. dw_2.Object.packqty[child_row] = S_INSCUST.packqty[ls_j]
  392. dw_2.Object.prdpackcode[child_row] = S_INSCUST.prdpackcode[ls_j]
  393. dw_2.Object.ifpacktype[child_row] = S_INSCUST.ifpacktype[ls_j]
  394. dw_2.Object.unit_buy[child_row] = S_INSCUST.unit_buy[ls_j]
  395. dw_2.Object.rate_buy[child_row] = S_INSCUST.rate_buy[ls_j]
  396. dw_2.Object.unit_scll[child_row] = S_INSCUST.unit_scll[ls_j]
  397. dw_2.Object.rate_scll[child_row] = S_INSCUST.rate_scll[ls_j]
  398. dw_2.Object.unit_sale[child_row] = S_INSCUST.unit_sale[ls_j]
  399. dw_2.Object.rate_sale[child_row] = S_INSCUST.rate_sale[ls_j]
  400. dw_2.Object.ifpackpro[child_row] = S_INSCUST.ifpackpro[ls_j]
  401. dw_2.Object.ifpackpro2[child_row] = S_INSCUST.ifpackpro2[ls_j]
  402. dw_2.Object.net_weight[child_row] = S_INSCUST.net_weight[ls_j]
  403. dw_2.Object.gross_weight[child_row] = S_INSCUST.gross_weight[ls_j]
  404. dw_2.Object.cubage[child_row] = S_INSCUST.cubage[ls_j]
  405. dw_2.Object.handtype[child_row] = S_INSCUST.handtype[ls_j]
  406. dw_2.Object.mtrlorigin[child_row] = S_INSCUST.mtrlorigin[ls_j]
  407. dw_2.Object.mtrlprp[child_row] = S_INSCUST.mtrlprp[ls_j]
  408. END IF
  409. NEXT
  410. dw_2.setredraw(true)
  411. dw_2.SetFocus()
  412. END IF
  413. end event
  414. type cb_del_mtrl from uo_imflatbutton within w_mtrl_propel_ljfieb_bak
  415. integer x = 864
  416. integer y = 1020
  417. integer width = 366
  418. integer taborder = 40
  419. boolean bringtotop = true
  420. string text = "删除产品"
  421. string normalpicname = "DELETE.BMP"
  422. integer picsize = 16
  423. end type
  424. event clicked;call super::clicked;IF dw_2.GetRow() <= 0 THEN
  425. MessageBox('系统提示','请选择要删除的对象')
  426. RETURN
  427. END IF
  428. IF MessageBox ("询问","是否确定要删除当前选中的产品资料?",Question!,YesNo! ) = 2 THEN RETURN
  429. dw_2.DeleteRow (dw_2.GetRow())
  430. end event
  431. type cb_reset_mtrl from uo_imflatbutton within w_mtrl_propel_ljfieb_bak
  432. integer x = 1280
  433. integer y = 1020
  434. integer width = 457
  435. integer taborder = 40
  436. boolean bringtotop = true
  437. string text = "清空产品列表"
  438. string normalpicname = "p2.BMP"
  439. integer picsize = 16
  440. end type
  441. event clicked;call super::clicked;if dw_2.rowcount() = 0 then
  442. messagebox('系统提示','接收者列表已清空')
  443. return
  444. end if
  445. IF MessageBox ("询问","是否确定要清空产品列表?",Question!,YesNo! ) = 2 THEN RETURN
  446. dw_2.reset()
  447. end event
  448. type st_1 from statictext within w_mtrl_propel_ljfieb_bak
  449. integer x = 37
  450. integer y = 1060
  451. integer width = 402
  452. integer height = 48
  453. boolean bringtotop = true
  454. integer textsize = -9
  455. integer weight = 400
  456. fontcharset fontcharset = gb2312charset!
  457. fontpitch fontpitch = variable!
  458. string facename = "宋体"
  459. long textcolor = 33554432
  460. long backcolor = 134217739
  461. string text = "推送产品列表"
  462. boolean focusrectangle = false
  463. end type
  464. type st_2 from statictext within w_mtrl_propel_ljfieb_bak
  465. integer x = 37
  466. integer y = 220
  467. integer width = 325
  468. integer height = 52
  469. boolean bringtotop = true
  470. integer textsize = -9
  471. integer weight = 400
  472. fontcharset fontcharset = gb2312charset!
  473. fontpitch fontpitch = variable!
  474. string facename = "宋体"
  475. long textcolor = 33554432
  476. long backcolor = 134217739
  477. string text = "接收者列表"
  478. boolean focusrectangle = false
  479. end type
  480. type cb_add_cus from uo_imflatbutton within w_mtrl_propel_ljfieb_bak
  481. integer x = 466
  482. integer y = 180
  483. integer width = 389
  484. integer taborder = 40
  485. boolean bringtotop = true
  486. string text = "增加接收者"
  487. string normalpicname = "OPEN.BMP"
  488. integer picsize = 16
  489. end type
  490. event clicked;call super::clicked;Long uc_row,ls_j
  491. Long child_row,ll_receivecuscommid
  492. IF Not IsValid(w_cust_comm_ch) THEN
  493. s_edit_index_tran s_open //传递参数使用
  494. s_open.if_select_any = True
  495. s_open.b_string = ''
  496. This.Enabled = False
  497. OpenWithParm(w_cust_comm_ch,s_open)
  498. This.Enabled = True
  499. s_custom_arr s_inscust
  500. s_inscust = Message.PowerObjectParm //接受返回结构
  501. dw_1.SetRedraw(False)
  502. FOR ls_j = 1 To UpperBound(s_inscust.cusid)
  503. IF s_inscust.cusid[ls_j] > 0 THEN //正常返回值则可以取以下值
  504. IF dw_1.Find("cusid =" + String(s_inscust.cusid[ls_j]), 1, dw_1.RowCount()) > 0 THEN CONTINUE
  505. IF dw_1.GetRow() > 0 THEN
  506. IF dw_1.Object.cusid[dw_1.GetRow()] <> 0 THEN
  507. child_row = dw_1.InsertRow (0)
  508. ELSE
  509. child_row = dw_1.GetRow()
  510. END IF
  511. ELSE
  512. child_row = dw_1.InsertRow (0)
  513. END IF
  514. dw_1.Object.cusid[child_row] = s_inscust.cusid[ls_j]
  515. dw_1.Object.cuscode[child_row] = s_inscust.cuscode[ls_j]
  516. dw_1.Object.Name[child_row] = s_inscust.Name[ls_j]
  517. dw_1.Object.cusareaname[child_row] = s_inscust.cusareaname[ls_j]
  518. dw_1.Object.commcode[child_row] = s_inscust.commcode[ls_j]
  519. dw_1.Object.commsccode[child_row] = s_inscust.commsccode[ls_j]
  520. SELECT CusCommID
  521. INTO :ll_receivecuscommid
  522. FROM LJFIEB_CusComm
  523. Where cuscode = :s_inscust.commcode[ls_j] using tr_eb_sqlca;
  524. IF tr_eb_sqlca.SQLCode <> 0 THEN
  525. ll_receivecuscommid = 0
  526. END IF
  527. dw_1.Object.CusCommID[child_row] = ll_receivecuscommid
  528. END IF
  529. NEXT
  530. dw_1.SetRedraw(True)
  531. END IF
  532. end event
  533. type cb_del_cus from uo_imflatbutton within w_mtrl_propel_ljfieb_bak
  534. integer x = 896
  535. integer y = 180
  536. integer width = 384
  537. integer taborder = 40
  538. boolean bringtotop = true
  539. string text = "删除接收者"
  540. string normalpicname = "DELETE.BMP"
  541. integer picsize = 16
  542. end type
  543. event clicked;call super::clicked;IF dw_1.GetRow() <= 0 THEN
  544. MessageBox('系统提示','请选择要删除的对象')
  545. RETURN
  546. END IF
  547. IF MessageBox ("询问","是否确定要删除当前选中的接收者?",Question!,YesNo! ) = 2 THEN RETURN
  548. dw_1.DeleteRow (dw_1.GetRow())
  549. end event
  550. type cb_reset_cus from uo_imflatbutton within w_mtrl_propel_ljfieb_bak
  551. integer x = 1321
  552. integer y = 180
  553. integer width = 494
  554. integer taborder = 50
  555. boolean bringtotop = true
  556. string text = "清空接收者列表"
  557. string normalpicname = "p2.BMP"
  558. integer picsize = 16
  559. end type
  560. event clicked;call super::clicked;if dw_1.rowcount() = 0 then
  561. return
  562. end if
  563. IF MessageBox ("询问","是否确定要清空接收者列表?",Question!,YesNo! ) = 2 THEN RETURN
  564. dw_1.reset()
  565. end event
  566. type st_3 from statictext within w_mtrl_propel_ljfieb_bak
  567. integer x = 2162
  568. integer y = 292
  569. integer width = 142
  570. integer height = 56
  571. boolean bringtotop = true
  572. integer textsize = -9
  573. integer weight = 400
  574. fontcharset fontcharset = gb2312charset!
  575. fontpitch fontpitch = variable!
  576. string facename = "宋体"
  577. long textcolor = 33554432
  578. long backcolor = 134217739
  579. string text = "附言"
  580. boolean focusrectangle = false
  581. end type
  582. type mle_1 from multilineedit within w_mtrl_propel_ljfieb_bak
  583. integer x = 2153
  584. integer y = 352
  585. integer width = 1426
  586. integer height = 408
  587. integer taborder = 50
  588. boolean bringtotop = true
  589. integer textsize = -9
  590. integer weight = 400
  591. fontcharset fontcharset = gb2312charset!
  592. fontpitch fontpitch = variable!
  593. string facename = "宋体"
  594. long textcolor = 33554432
  595. boolean vscrollbar = true
  596. boolean autovscroll = true
  597. borderstyle borderstyle = stylelowered!
  598. end type
  599. type st_4 from statictext within w_mtrl_propel_ljfieb_bak
  600. integer x = 2162
  601. integer y = 772
  602. integer width = 128
  603. integer height = 48
  604. boolean bringtotop = true
  605. integer textsize = -9
  606. integer weight = 400
  607. fontcharset fontcharset = gb2312charset!
  608. fontpitch fontpitch = variable!
  609. string facename = "宋体"
  610. long textcolor = 33554432
  611. long backcolor = 134217739
  612. string text = "备注"
  613. boolean focusrectangle = false
  614. end type
  615. type mle_2 from multilineedit within w_mtrl_propel_ljfieb_bak
  616. integer x = 2153
  617. integer y = 832
  618. integer width = 1426
  619. integer height = 164
  620. integer taborder = 60
  621. boolean bringtotop = true
  622. integer textsize = -9
  623. integer weight = 400
  624. fontcharset fontcharset = gb2312charset!
  625. fontpitch fontpitch = variable!
  626. string facename = "宋体"
  627. long textcolor = 33554432
  628. boolean vscrollbar = true
  629. boolean autovscroll = true
  630. borderstyle borderstyle = stylelowered!
  631. end type
  632. type ln_bar from line within w_mtrl_propel_ljfieb_bak
  633. long linecolor = 268435456
  634. integer linethickness = 4
  635. integer beginy = 168
  636. integer endx = 2007
  637. integer endy = 168
  638. end type
  639. type ln_bar2 from line within w_mtrl_propel_ljfieb_bak
  640. long linecolor = 16777215
  641. integer linethickness = 4
  642. integer beginy = 172
  643. integer endx = 2039
  644. integer endy = 172
  645. end type
  646. type r_bar from rectangle within w_mtrl_propel_ljfieb_bak
  647. long linecolor = 16777215
  648. integer linethickness = 4
  649. long fillcolor = 1073741824
  650. integer x = 1531
  651. integer width = 146
  652. integer height = 68
  653. end type
  654. event constructor;this.fillcolor = 14215660
  655. this.linecolor = 14215660
  656. this.x = -1
  657. this.y = -1
  658. this.height = ln_bar.beginy - 5
  659. end event