w_associat_sptcust.srw 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660
  1. $PBExportHeader$w_associat_sptcust.srw
  2. forward
  3. global type w_associat_sptcust from w_publ_edit_index
  4. end type
  5. end forward
  6. global type w_associat_sptcust from w_publ_edit_index
  7. integer width = 4425
  8. integer height = 2080
  9. string title = "关联往来单位设置"
  10. boolean minbox = true
  11. windowtype windowtype = popup!
  12. event ue_spt_ch ( )
  13. event ue_cus_ch ( )
  14. end type
  15. global w_associat_sptcust w_associat_sptcust
  16. type variables
  17. s_associat_sptcust INS_RT_STRU
  18. long oldsptid=0,oldcusid=0,newsptid=0,newcusid=0
  19. uo_associat_sptcust uo_sptcust
  20. end variables
  21. event ue_spt_ch();If Not dw_edit_mode Then Return
  22. S_spt S_INSCUST
  23. s_edit_index_tran s_ch_tran
  24. Long uc_row
  25. uc_row = dw_uc.GetRow()
  26. dw_uc.AcceptText()
  27. If Not IsValid(W_spt_edit) Then
  28. s_ch_tran.if_retrieve_all = False //是否一次RETRIEVE所有行
  29. s_ch_tran.work_mode = 1 //0-单纯编辑模式 1-选择\编辑模式
  30. s_ch_tran.arg_pkid = 0 //目标定位PKID (备用)
  31. //查询列(物料编码)部分内容,用于初步筛选
  32. // s_ch_tran.arg_string_code=upper(trim(dw_uc.object.u_spt_sptcode[dw_uc.getrow()]))
  33. OpenWithParm(W_spt_edit,s_ch_tran) //调用
  34. S_INSCUST = Message.PowerObjectParm //接受返回结构
  35. If S_INSCUST.sptid > 0 Then //正常返回值则可以取以下值
  36. dw_uc.SetRedraw(False)
  37. dw_uc.Object.sptid[uc_row] = S_INSCUST.sptid
  38. dw_uc.Object.u_spt_name[uc_row] = S_INSCUST.Name
  39. dw_uc.Object.u_spt_sptcode[uc_row] = S_INSCUST.sptcode
  40. //=S_INSCUST.sptcode
  41. dw_uc.SetRedraw(True)
  42. dw_uc.SetColumn("u_spt_sptcode")
  43. End If
  44. End If
  45. end event
  46. event ue_cus_ch();
  47. If Not dw_edit_mode Then Return
  48. Long child_row
  49. s_custom S_INSCUST_c
  50. s_edit_index_tran s_ch_tran
  51. child_row = dw_uc.GetRow()
  52. If child_row = 0 Then
  53. Return
  54. End If
  55. If Not IsValid(W_cust_edit) Then
  56. // s_edit_index_tran s_ch_tran //传递参数使用
  57. s_ch_tran.if_retrieve_all = False //是否一次RETRIEVE所有行
  58. s_ch_tran.work_mode = 1 //0-单纯编辑模式 1-选择\编辑模式
  59. s_ch_tran.arg_pkid = 0 //目标定位PKID (备用)
  60. //查询列(物料编码)部分内容,用于初步筛选
  61. // dw_uc.AcceptText()
  62. // s_ch_tran.arg_string_code = Upper(Trim(dw_uc.Object.u_cust_cuscode[dw_uc.GetRow()]))
  63. OpenWithParm(W_cust_edit,s_ch_tran) //调用
  64. S_INSCUST_c = Message.PowerObjectParm //接受返回结构
  65. If S_INSCUST_c.cusid > 0 Then //正常返回值则可以取以下值
  66. dw_uc.SetRedraw(False)
  67. dw_uc.Object.cusid[child_row] = S_INSCUST_c.cusid
  68. dw_uc.Object.u_cust_name[child_row] = S_INSCUST_c.Name
  69. dw_uc.Object.u_cust_cuscode[child_row] = S_INSCUST_c.cuscode
  70. dw_uc.SetRedraw(True)
  71. dw_uc.SetFocus()
  72. dw_uc.SetColumn("u_cust_cuscode")
  73. End If
  74. End If
  75. end event
  76. on w_associat_sptcust.create
  77. call super::create
  78. end on
  79. on w_associat_sptcust.destroy
  80. call super::destroy
  81. end on
  82. event close;call super::close;CLOSEWITHRETURN(THIS,INS_RT_STRU)
  83. //<INS_RT_STRU> 窗体级子定义结构变量,用于返回
  84. end event
  85. event retrieve_uc;Boolean cb_firstpage_enabled,cb_nextpage_enabled,cb_retrieveall_enabled
  86. Boolean cb_priorpage_enabled,cb_func_enabled,cb_retrieve_enabled
  87. cb_firstpage_enabled = cb_firstpage.Enabled
  88. cb_nextpage_enabled = cb_nextpage.Enabled
  89. cb_retrieveall_enabled = cb_retrieveall.Enabled
  90. cb_priorpage_enabled = cb_priorpage.Enabled
  91. cb_func_enabled = cb_func.Enabled
  92. cb_retrieve_enabled = cb_retrieve.Enabled
  93. cb_firstpage.Enabled = FALSE
  94. cb_nextpage.Enabled = FALSE
  95. cb_retrieveall.Enabled = FALSE
  96. cb_priorpage.Enabled = FALSE
  97. cb_func.Enabled = FALSE
  98. cb_retrieve.Enabled = FALSE
  99. dw_UC.SetRedraw(FALSE)
  100. dw_index.ShareDataOff()
  101. SetPointer(HourGlass!)
  102. dw_UC.Retrieve(oldsptid)
  103. SetPointer(Arrow!)
  104. dw_UC.ShareData(dw_index)
  105. dw_UC.SetRedraw(TRUE)
  106. IF dw_index.RowCount() >= 1 THEN
  107. dw_index.SelectRow(0,FALSE)
  108. dw_index.SelectRow(1,TRUE)
  109. END IF
  110. cb_firstpage.Enabled = cb_firstpage_enabled
  111. cb_nextpage.Enabled = cb_nextpage_enabled
  112. cb_retrieveall.Enabled = cb_retrieveall_enabled
  113. cb_priorpage.Enabled = cb_priorpage_enabled
  114. cb_func.Enabled = cb_func_enabled
  115. cb_retrieve.Enabled = cb_retrieve_enabled
  116. end event
  117. event ue_usual_query_filt;call super::ue_usual_query_filt;if dw_edit_mode or keydown(keyf4!) or keydown(keyf5!) then return
  118. string obj_expr=''
  119. if trim(sle_usual_query.text)<>'' then
  120. IF POS(trim(sle_usual_query.text),'%')=0 THEN
  121. obj_expr=obj_expr+'( itemcode LIKE "%'+trim(sle_usual_query.text)+'%" )'
  122. ELSE
  123. obj_expr=obj_expr+'( itemcode LIKE "'+trim(sle_usual_query.text)+'" )'
  124. END IF
  125. end if
  126. dw_UC.setfilter(obj_expr)
  127. dw_UC.SetRedraw(False)
  128. dw_INDEX.SetRedraw(False)
  129. dw_UC.filter()
  130. if dw_index.rowcount()>=1 then
  131. dw_index.selectrow(0,false)
  132. dw_index.selectrow(1,true)
  133. end if
  134. dw_UC.SetRedraw(TRUE)
  135. dw_INDEX.SetRedraw(TRUE)
  136. end event
  137. event ue_usual_query_retr;call super::ue_usual_query_retr;if dw_edit_mode or keydown(keyf4!) or keydown(keyf5!) then return
  138. string ls_querystrpart=''
  139. ls_newselect=lower(ori_oldselect)
  140. if trim(sle_usual_query.text)<>'' then
  141. if pos(trim(sle_usual_query.text),'%')=0 then
  142. ls_querystrpart="(itemcode like '%"+trim(sle_usual_query.text)+"%')"
  143. else
  144. ls_querystrpart="(itemcode like '"+trim(sle_usual_query.text)+"')"
  145. end if
  146. if Pos(ls_newselect," where ") <> 0 then
  147. ls_newselect=ls_newselect+" AND ("+ls_querystrpart+')'
  148. else
  149. ls_newselect=ls_newselect+" where ("+ls_querystrpart+')'
  150. end if
  151. end if
  152. wf_retrieveuc(dw_uc,ls_newselect,1)
  153. this.triggerevent('retrieve_uc') //注意必须有此句
  154. end event
  155. event open;call super::open; uo_sptcust = CREATE uo_associat_sptcust
  156. end event
  157. type cb_func from w_publ_edit_index`cb_func within w_associat_sptcust
  158. boolean visible = false
  159. end type
  160. type cb_exit from w_publ_edit_index`cb_exit within w_associat_sptcust
  161. integer x = 773
  162. end type
  163. type sle_usual_query from w_publ_edit_index`sle_usual_query within w_associat_sptcust
  164. boolean visible = false
  165. integer x = 4338
  166. end type
  167. type cb_nextpage from w_publ_edit_index`cb_nextpage within w_associat_sptcust
  168. integer x = 928
  169. integer y = 1600
  170. end type
  171. type cb_priorpage from w_publ_edit_index`cb_priorpage within w_associat_sptcust
  172. integer x = 782
  173. integer y = 1600
  174. end type
  175. type cb_firstpage from w_publ_edit_index`cb_firstpage within w_associat_sptcust
  176. integer x = 635
  177. integer y = 1600
  178. end type
  179. type cb_retrieveall from w_publ_edit_index`cb_retrieveall within w_associat_sptcust
  180. integer x = 489
  181. integer y = 1600
  182. end type
  183. type em_pagerowno from w_publ_edit_index`em_pagerowno within w_associat_sptcust
  184. integer x = 192
  185. integer y = 1600
  186. end type
  187. type st_pagerowno from w_publ_edit_index`st_pagerowno within w_associat_sptcust
  188. integer x = 18
  189. integer y = 1620
  190. end type
  191. type st_1 from w_publ_edit_index`st_1 within w_associat_sptcust
  192. boolean visible = false
  193. integer x = 4329
  194. string text = "编号含"
  195. end type
  196. type cb_add from w_publ_edit_index`cb_add within w_associat_sptcust
  197. integer x = 233
  198. end type
  199. event cb_add::clicked;Long ll_cnt,uc_row
  200. Long ll_sptid,ll_cusid,ll_id
  201. string arg_msg =''
  202. IF dw_edit_mode THEN
  203. dw_uc.AcceptText()
  204. IF dw_uc.GetNextModified(0, Primary!) = 0 THEN
  205. MessageBox('提示','没有任何修改,不可以保存!',information!,ok!)
  206. RETURN
  207. END IF
  208. uc_row = dw_uc.GetRow()
  209. dw_uc.Object.sptid[uc_row] = long(dw_uc.Object.sptid[uc_row])
  210. dw_uc.Object.cusid[uc_row] = long(dw_uc.Object.cusid[uc_row])
  211. dw_uc.Object.dscrp[uc_row] = Trim(dw_uc.Object.dscrp[uc_row])
  212. IF isnull(dw_uc.Object.sptid[uc_row] ) or dw_uc.Object.sptid[uc_row] =0 THEN
  213. MessageBox('提示','请输入供应商编号!',information!,ok!)
  214. dw_uc.SetFocus()
  215. dw_uc.SetColumn("sptid")
  216. RETURN
  217. END IF
  218. IF isnull(dw_uc.Object.cusid[uc_row] ) or dw_uc.Object.cusid[uc_row] =0 THEN
  219. MessageBox('提示','请输入客户编号!',information!,ok!)
  220. dw_uc.SetFocus()
  221. dw_uc.SetColumn("cusid")
  222. RETURN
  223. END IF
  224. //检查往来单位是否已存在
  225. ll_sptid = dw_uc.Object.sptid[uc_row]
  226. ll_cusid = dw_uc.Object.cusid[uc_row]
  227. IF oldsptid <> 0 THEN
  228. ll_cnt = 0
  229. if ll_sptid = oldsptid then
  230. SELECT count(*) INTO :ll_cnt
  231. FROM u_associat_sptcust
  232. WHERE cusid = :ll_cusid;
  233. IF sqlca.SQLCode <> 0 THEN
  234. MessageBox('错误','查询往来单位是否已存在失败',stopsign!,ok!)
  235. RETURN
  236. END IF
  237. if ll_cusid = oldcusid then ll_cnt = 0
  238. else
  239. SELECT count(*) INTO :ll_cnt
  240. FROM u_associat_sptcust
  241. WHERE sptid = :ll_sptid ;
  242. IF sqlca.SQLCode <> 0 THEN
  243. MessageBox('错误','查询往来单位是否已存在失败',stopsign!,ok!)
  244. RETURN
  245. END IF
  246. end if
  247. IF ll_cnt > 0 THEN
  248. MessageBox('提示','已存在往来单位,不能重复建立!',information!,ok!)
  249. dw_uc.SetFocus()
  250. dw_uc.SetColumn("sptid")
  251. RETURN
  252. END IF
  253. ELSE
  254. ll_cnt = 0
  255. SELECT count(*) INTO :ll_cnt
  256. FROM u_associat_sptcust
  257. WHERE sptid = :ll_sptid
  258. or cusid = :ll_cusid;
  259. IF sqlca.SQLCode <> 0 THEN
  260. MessageBox('错误','查询往来单位是否已存在失败',stopsign!,ok!)
  261. RETURN
  262. END IF
  263. IF ll_cnt > 0 THEN
  264. MessageBox('提示','已存在往来单位,不能重复建立!',information!,ok!)
  265. dw_uc.SetFocus()
  266. dw_uc.SetColumn("sptid")
  267. RETURN
  268. END IF
  269. END IF
  270. //////////////////////////////////////////////////
  271. uo_sptcust.sptid = dw_uc.Object.sptid[uc_row]
  272. uo_sptcust.cusid = dw_uc.Object.cusid[uc_row]
  273. uo_sptcust.dscrp = dw_uc.Object.dscrp[uc_row]
  274. IF uo_sptcust.save_sptcust (arg_msg,TRUE,oldsptid,oldcusid) = 0 THEN
  275. MessageBox('错误',arg_msg,stopsign!,OK!)
  276. RETURN
  277. END IF
  278. // MessageBox('提示','保存操作成功!',information!,OK!)
  279. END IF
  280. IF dw_edit_mode THEN
  281. dw_uc.Enabled = False
  282. ELSE
  283. Long li_row, li_cur_row
  284. li_cur_row = dw_uc.GetRow()
  285. li_row = dw_uc.InsertRow (li_cur_row)
  286. dw_uc.ScrollToRow (li_row)
  287. dw_uc.Enabled = True
  288. dw_uc.SetFocus()
  289. modifyrow_no = li_row
  290. END IF
  291. dw_edit_mode = Not dw_edit_mode
  292. wf_face_change()
  293. IF dw_edit_mode THEN
  294. IF cb_mode_itfchg.Text = '<<' THEN
  295. cb_mode_itfchg.TriggerEvent(Clicked!)
  296. END IF
  297. ELSE
  298. wf_index_uc()
  299. END IF
  300. dw_index.rbutton_filter_use = Not dw_edit_mode
  301. wf_editindex_lockf()
  302. IF dw_edit_mode THEN
  303. dw_uc.SetFocus()
  304. dw_uc.SetColumn('sptid')
  305. END IF
  306. end event
  307. type cb_edit from w_publ_edit_index`cb_edit within w_associat_sptcust
  308. integer x = 425
  309. end type
  310. event cb_edit::clicked;call super::clicked;if dw_edit_mode then
  311. oldsptid = dw_index.object.u_associat_sptcust_sptid[dw_index.getrow()]
  312. oldcusid = dw_index.object.u_associat_sptcust_cusid[dw_index.getrow()]
  313. else
  314. oldsptid =0
  315. oldcusid =0
  316. parent.triggerevent('retrieve_uc')
  317. end if
  318. end event
  319. type cb_delet from w_publ_edit_index`cb_delet within w_associat_sptcust
  320. integer x = 617
  321. end type
  322. event cb_delet::clicked; long ll_sptid,ll_custid
  323. String ls_code,arg_msg
  324. IF DW_UC.GetRow() <= 0 THEN
  325. MessageBox('提示','没有操作目标记录!',information!,ok!)
  326. RETURN
  327. END IF
  328. ll_sptid = dw_uc.Object.sptid[dw_uc.getrow()]
  329. ll_custid= dw_uc.Object.cusid[dw_uc.getrow()]
  330. IF MessageBox ("询问","是否确定要删除当前记录?(选择确定后记录将不可恢复)",Question!,YesNo! ) = 2 THEN
  331. RETURN
  332. END IF
  333. DW_UC.SetRedraw (FALSE)
  334. DW_UC.DeleteRow (0)
  335. DW_UC.TriggerEvent (RowFocusChanged!)
  336. IF uo_sptcust.del (ll_sptid,ll_custid,arg_msg) = 0 THEN
  337. MessageBox('错误',arg_msg,stopsign!,OK!)
  338. RETURN
  339. END IF
  340. //MessageBox('提示','删除操作成功!',information!,OK!)
  341. DW_UC.SetRedraw (TRUE)
  342. WF_INDEX_UC()
  343. end event
  344. type cb_choice from w_publ_edit_index`cb_choice within w_associat_sptcust
  345. boolean visible = false
  346. integer x = 1029
  347. end type
  348. type cb_cancel from w_publ_edit_index`cb_cancel within w_associat_sptcust
  349. end type
  350. type cbx_mlselect from w_publ_edit_index`cbx_mlselect within w_associat_sptcust
  351. boolean visible = false
  352. integer x = 4338
  353. integer y = 96
  354. integer width = 78
  355. integer height = 172
  356. end type
  357. type cbx_allselect from w_publ_edit_index`cbx_allselect within w_associat_sptcust
  358. boolean visible = false
  359. integer x = 4338
  360. integer y = 92
  361. integer width = 160
  362. end type
  363. type cb_mode_itfchg_b from w_publ_edit_index`cb_mode_itfchg_b within w_associat_sptcust
  364. end type
  365. type cb_mode_itfchg from w_publ_edit_index`cb_mode_itfchg within w_associat_sptcust
  366. integer x = 923
  367. integer width = 78
  368. end type
  369. type gb_1 from w_publ_edit_index`gb_1 within w_associat_sptcust
  370. integer x = 37
  371. integer y = 1596
  372. end type
  373. type dw_uc from w_publ_edit_index`dw_uc within w_associat_sptcust
  374. integer x = 3086
  375. integer y = 180
  376. integer width = 1312
  377. integer height = 1808
  378. string dataobject = "dw_associat_sptcust_edit"
  379. end type
  380. event dw_uc::itemchanged;call super::itemchanged;//long uc_row
  381. //s_edit_index_tran s_ch_tran //传递参数使用
  382. //S_spt S_INSCUST
  383. //s_custom S_INSCUST_c
  384. //
  385. //IF row > 0 THEN
  386. // IF dwo.Name = "sptid" THEN
  387. // if not dw_edit_mode then return
  388. // uc_row=dw_uc.getrow()
  389. // dw_uc.accepttext()
  390. //
  391. // if not isvalid(W_spt_edit) then
  392. //
  393. // s_ch_tran.if_retrieve_all=false //是否一次RETRIEVE所有行
  394. // s_ch_tran.work_mode=1 //0-单纯编辑模式 1-选择\编辑模式
  395. // s_ch_tran.arg_pkid=0 //目标定位PKID (备用)
  396. // //查询列(物料编码)部分内容,用于初步筛选
  397. // // s_ch_tran.arg_string_code=upper(trim(dw_uc.object.u_spt_sptcode[dw_uc.getrow()]))
  398. //
  399. // OPENwithparm(W_spt_edit,s_ch_tran) //调用
  400. //
  401. // S_INSCUST=Message.PowerObjectParm //接受返回结构
  402. //
  403. // IF S_INSCUST.sptid>0 THEN //正常返回值则可以取以下值
  404. // dw_uc.setredraw(false)
  405. // dw_uc.object.sptid[uc_row]=S_INSCUST.sptid
  406. // dw_uc.object.u_spt_name[uc_row]=S_INSCUST.name
  407. // //=S_INSCUST.sptcode
  408. // dw_uc.setredraw(true)
  409. // dw_uc.setcolumn("sptid")
  410. // END IF
  411. // end if
  412. //
  413. // ELSEIF dwo.Name = "cusid" THEN
  414. //
  415. // IF NOT dw_edit_mode THEN RETURN
  416. // Long child_row
  417. //
  418. // child_row = dw_uc.GetRow()
  419. // IF child_row = 0 THEN
  420. // RETURN
  421. // END IF
  422. //
  423. // IF NOT IsValid(W_cust_edit) THEN
  424. // // s_edit_index_tran s_ch_tran //传递参数使用
  425. // s_ch_tran.if_retrieve_all = FALSE //是否一次RETRIEVE所有行
  426. // s_ch_tran.work_mode = 1 //0-单纯编辑模式 1-选择\编辑模式
  427. // s_ch_tran.arg_pkid = 0 //目标定位PKID (备用)
  428. // //查询列(物料编码)部分内容,用于初步筛选
  429. //
  430. //// dw_uc.AcceptText()
  431. //// s_ch_tran.arg_string_code = Upper(Trim(dw_uc.Object.u_cust_cuscode[dw_uc.GetRow()]))
  432. //
  433. // OpenWithParm(W_cust_edit,s_ch_tran) //调用
  434. //
  435. // S_INSCUST_c = Message.PowerObjectParm //接受返回结构
  436. //
  437. // IF S_INSCUST_c.cusid > 0 THEN //正常返回值则可以取以下值
  438. // dw_uc.SetRedraw(FALSE)
  439. // dw_uc.Object.cusid[child_row] = S_INSCUST_c.cusid
  440. // dw_uc.Object.u_cust_name[child_row] = S_INSCUST_c.Name
  441. // //dw_uc.Object.u_cust_cuscode[child_row] = S_INSCUST.cuscode
  442. // dw_uc.SetRedraw(TRUE)
  443. // dw_uc.SetFocus()
  444. // dw_uc.SetColumn("cusid")
  445. // END IF
  446. // END IF
  447. //
  448. // END IF
  449. //END IF
  450. //
  451. end event
  452. event dw_uc::doubleclicked;call super::doubleclicked;Long uc_row
  453. If row > 0 Then
  454. If dwo.Name = "u_spt_sptcode" Or dwo.Name = 'u_spt_name' Then
  455. Parent.TriggerEvent('ue_spt_ch')
  456. ElseIf dwo.Name = "u_cust_cuscode" Or dwo.Name = 'u_cust_name' Then
  457. Parent.TriggerEvent('ue_cus_ch')
  458. End If
  459. End If
  460. end event
  461. event dw_uc::key;call super::key;If dw_uc.GetRow() <= 0 Then Return
  462. Long ll_row
  463. Long ll_id
  464. String ls_name
  465. ll_row = dw_uc.GetRow()
  466. String ls_code
  467. If dw_edit_mode Then
  468. dw_uc.AcceptText()
  469. If dw_uc.GetColumnName() = 'u_spt_sptcode' And Key = keyenter! Then
  470. ls_code = This.Object.u_spt_sptcode[ll_row]
  471. Select sptid,
  472. name
  473. Into :ll_id,
  474. :ls_name
  475. From u_spt
  476. Where sptcode = :ls_code;
  477. If sqlca.SQLCode <> 0 Then
  478. Parent.TriggerEvent('ue_spt_ch')
  479. Return
  480. Else
  481. dw_uc.Object.sptid[ll_row] = ll_id
  482. dw_uc.Object.u_spt_name[ll_row] = ls_name
  483. End If
  484. ElseIf dw_uc.GetColumnName() = 'u_cust_cuscode' And Key = keyenter! Then
  485. ls_code = This.Object.u_cust_cuscode[ll_row]
  486. Select cusid,
  487. name
  488. Into :ll_id,
  489. :ls_name
  490. From u_cust
  491. Where cuscode = :ls_code;
  492. If sqlca.SQLCode <> 0 Then
  493. Parent.TriggerEvent('ue_cus_ch')
  494. Return
  495. Else
  496. dw_uc.Object.cusid[ll_row] = ll_id
  497. dw_uc.Object.u_cust_name[ll_row] = ls_name
  498. End If
  499. End If
  500. End If
  501. end event
  502. type cb_retrieve from w_publ_edit_index`cb_retrieve within w_associat_sptcust
  503. end type
  504. type cb_print from w_publ_edit_index`cb_print within w_associat_sptcust
  505. boolean visible = false
  506. integer x = 1563
  507. integer y = 4
  508. end type
  509. event cb_print::clicked;call super::clicked;S_print_MSG LS_PRMSG
  510. LS_PRMSG.obj_dwNAME='dw_rp_item_index'
  511. LS_PRMSG.SHARE_DW=DW_UC
  512. LS_PRMSG.TAG_TEXT='项目资料表'
  513. LS_PRMSG.SETUP_FLAG=0
  514. LS_PRMSG.PAGECH_FLAG=1
  515. Openwithparm(w_publ_preview,LS_PRMSG)
  516. end event
  517. type ln_bar from w_publ_edit_index`ln_bar within w_associat_sptcust
  518. end type
  519. type ln_bar2 from w_publ_edit_index`ln_bar2 within w_associat_sptcust
  520. end type
  521. type r_bar from w_publ_edit_index`r_bar within w_associat_sptcust
  522. end type
  523. type ln_1 from w_publ_edit_index`ln_1 within w_associat_sptcust
  524. boolean visible = false
  525. end type
  526. type ln_2 from w_publ_edit_index`ln_2 within w_associat_sptcust
  527. boolean visible = false
  528. end type
  529. type dw_index from w_publ_edit_index`dw_index within w_associat_sptcust
  530. integer y = 180
  531. integer width = 3090
  532. integer height = 1808
  533. string dataobject = "dw_associat_sptcust"
  534. end type
  535. type cb_help from w_publ_edit_index`cb_help within w_associat_sptcust
  536. boolean visible = false
  537. end type