w_outware_barcodemx.srw 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  1. $PBExportHeader$w_outware_barcodemx.srw
  2. forward
  3. global type w_outware_barcodemx from w_publ_easyq
  4. end type
  5. type cb_barcode from uo_imflatbutton within w_outware_barcodemx
  6. end type
  7. type cb_3 from uo_imflatbutton within w_outware_barcodemx
  8. end type
  9. type cbx_all from checkbox within w_outware_barcodemx
  10. end type
  11. type cb_4 from uo_imflatbutton within w_outware_barcodemx
  12. end type
  13. end forward
  14. global type w_outware_barcodemx from w_publ_easyq
  15. string title = "条码管理"
  16. windowstate windowstate = normal!
  17. cb_barcode cb_barcode
  18. cb_3 cb_3
  19. cbx_all cbx_all
  20. cb_4 cb_4
  21. end type
  22. global w_outware_barcodemx w_outware_barcodemx
  23. type variables
  24. string ins_title //标题
  25. long ins_outwareid //单据id
  26. end variables
  27. forward prototypes
  28. public function integer wf_retrieve ()
  29. end prototypes
  30. public function integer wf_retrieve ();Int rslt = 1
  31. dw_1.Reset()
  32. String arg_msg
  33. Long ll_row, outwareid
  34. If IsNull(ins_outwareid) Then Goto ext
  35. oleobject req, rsp
  36. req = FXAppCom.CreatePbDictionary()
  37. req.SetString('token', app_token_fx)
  38. req.SetInt('outwareid', ins_outwareid)
  39. rsp = FXAppCom.DoExecute('GetFxSaletaskBuyBarcode', req)
  40. arg_msg = rsp.GetString('ErrMsg')
  41. If (arg_msg <> '') Then
  42. rslt = 0
  43. MessageBox('提示', '获取订单条码失败:' + arg_msg)
  44. Goto ext
  45. End If
  46. oleobject list, Item
  47. list = rsp.GetPBArray('barcodeList')
  48. dw_1.SetRedraw(False)
  49. Long i, row
  50. For i = 1 To list.Count
  51. Item = list.GetPBDictionary(i - 1)
  52. row = dw_1.InsertRow(0)
  53. dw_1.SetItem(row, 'taskid', Item.GetInt('taskid'))
  54. dw_1.SetItem(row, 'printid', Item.GetInt('printid'))
  55. dw_1.SetItem(row, 'barcode', Item.GetString('barcode'))
  56. dw_1.SetItem(row, 'taskcode', Item.GetString('taskcode'))
  57. dw_1.SetItem(row, 'mtrlcode', Item.GetString('mtrlcode'))
  58. dw_1.SetItem(row, 'mtrlname', Item.GetString('mtrlname'))
  59. dw_1.SetItem(row, 'mtrlmode', Item.GetString('mtrlmode'))
  60. dw_1.SetItem(row, 'status', Item.GetString('status'))
  61. dw_1.SetItem(row, 'woodcode', Item.GetString('woodcode'))
  62. dw_1.SetItem(row, 'pcode', Item.GetString('pcode'))
  63. dw_1.SetItem(row, 'qty', Item.GetInt('qty'))
  64. dw_1.SetItem(row, 'printnum', Item.GetInt('printnum'))
  65. dw_1.SetItem(row, 'packqty', Item.GetDouble('packqty'))
  66. Next
  67. dw_1.SetRedraw(True)
  68. ext:
  69. Return rslt
  70. end function
  71. on w_outware_barcodemx.create
  72. int iCurrent
  73. call super::create
  74. this.cb_barcode=create cb_barcode
  75. this.cb_3=create cb_3
  76. this.cbx_all=create cbx_all
  77. this.cb_4=create cb_4
  78. iCurrent=UpperBound(this.Control)
  79. this.Control[iCurrent+1]=this.cb_barcode
  80. this.Control[iCurrent+2]=this.cb_3
  81. this.Control[iCurrent+3]=this.cbx_all
  82. this.Control[iCurrent+4]=this.cb_4
  83. end on
  84. on w_outware_barcodemx.destroy
  85. call super::destroy
  86. destroy(this.cb_barcode)
  87. destroy(this.cb_3)
  88. destroy(this.cbx_all)
  89. destroy(this.cb_4)
  90. end on
  91. event open;call super::open;s_edit_index_tran s_tran //翻页功能窗口 传递参数使用
  92. s_tran = Message.PowerObjectParm
  93. //单据id
  94. IF NOT IsNull(s_tran.e_long ) THEN
  95. ins_outwareid = s_tran.e_long //标题
  96. ELSE
  97. MessageBox('系统提示','单据ID不正确或没有指定')
  98. Close(THIS)
  99. RETURN
  100. END IF
  101. //标题
  102. IF NOT IsNull(s_tran.d_string ) THEN
  103. ins_title = s_tran.d_string
  104. ELSE
  105. ins_title = "条码管理"
  106. END IF
  107. THIS.Title = ins_title
  108. wf_retrieve()
  109. end event
  110. type cb_func from w_publ_easyq`cb_func within w_outware_barcodemx
  111. boolean visible = false
  112. end type
  113. type cb_exit from w_publ_easyq`cb_exit within w_outware_barcodemx
  114. integer x = 1221
  115. end type
  116. type cb_2 from w_publ_easyq`cb_2 within w_outware_barcodemx
  117. boolean visible = false
  118. end type
  119. type cb_psetup from w_publ_easyq`cb_psetup within w_outware_barcodemx
  120. boolean visible = false
  121. end type
  122. type cb_1 from w_publ_easyq`cb_1 within w_outware_barcodemx
  123. integer width = 302
  124. string text = "刷新还原"
  125. end type
  126. event cb_1::clicked;call super::clicked;wf_retrieve()
  127. end event
  128. type st_3 from w_publ_easyq`st_3 within w_outware_barcodemx
  129. boolean visible = false
  130. end type
  131. type st_4 from w_publ_easyq`st_4 within w_outware_barcodemx
  132. boolean visible = false
  133. end type
  134. type em_1 from w_publ_easyq`em_1 within w_outware_barcodemx
  135. boolean visible = false
  136. end type
  137. type em_2 from w_publ_easyq`em_2 within w_outware_barcodemx
  138. boolean visible = false
  139. end type
  140. type ddlb_yl from w_publ_easyq`ddlb_yl within w_outware_barcodemx
  141. boolean visible = false
  142. end type
  143. type cbx_yl from w_publ_easyq`cbx_yl within w_outware_barcodemx
  144. boolean visible = false
  145. end type
  146. type dw_1 from w_publ_easyq`dw_1 within w_outware_barcodemx
  147. integer y = 188
  148. integer height = 2044
  149. string dataobject = "dw_fx_saletask_buy_barcode"
  150. end type
  151. type sle_mtrl from w_publ_easyq`sle_mtrl within w_outware_barcodemx
  152. end type
  153. type sle_cust from w_publ_easyq`sle_cust within w_outware_barcodemx
  154. end type
  155. type st_mtrl from w_publ_easyq`st_mtrl within w_outware_barcodemx
  156. end type
  157. type st_cust from w_publ_easyq`st_cust within w_outware_barcodemx
  158. end type
  159. type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_outware_barcodemx
  160. end type
  161. type pb_em1 from w_publ_easyq`pb_em1 within w_outware_barcodemx
  162. boolean visible = false
  163. end type
  164. type pb_em2 from w_publ_easyq`pb_em2 within w_outware_barcodemx
  165. boolean visible = false
  166. end type
  167. type pb_2 from w_publ_easyq`pb_2 within w_outware_barcodemx
  168. boolean visible = false
  169. end type
  170. type cb_help from w_publ_easyq`cb_help within w_outware_barcodemx
  171. boolean visible = false
  172. end type
  173. type cb_copyself from w_publ_easyq`cb_copyself within w_outware_barcodemx
  174. boolean visible = false
  175. end type
  176. type gb_1 from w_publ_easyq`gb_1 within w_outware_barcodemx
  177. end type
  178. type ln_bar from w_publ_easyq`ln_bar within w_outware_barcodemx
  179. end type
  180. type ln_bar2 from w_publ_easyq`ln_bar2 within w_outware_barcodemx
  181. end type
  182. type r_bar from w_publ_easyq`r_bar within w_outware_barcodemx
  183. end type
  184. type ln_1 from w_publ_easyq`ln_1 within w_outware_barcodemx
  185. integer beginy = 172
  186. integer endy = 172
  187. end type
  188. type ln_2 from w_publ_easyq`ln_2 within w_outware_barcodemx
  189. integer beginy = 176
  190. integer endy = 176
  191. end type
  192. type ln_3 from w_publ_easyq`ln_3 within w_outware_barcodemx
  193. integer beginy = 176
  194. integer endy = 176
  195. end type
  196. type ln_4 from w_publ_easyq`ln_4 within w_outware_barcodemx
  197. integer beginy = 176
  198. integer endy = 176
  199. end type
  200. type cb_barcode from uo_imflatbutton within w_outware_barcodemx
  201. integer x = 608
  202. integer height = 164
  203. integer taborder = 60
  204. boolean bringtotop = true
  205. string text = "录入条码"
  206. string normalpicname = "new.bmp"
  207. integer picsize = 16
  208. toolbaralignment pic_align = alignattop!
  209. boolean border = false
  210. end type
  211. event clicked;call super::clicked;s_edit_index_tran s_tran, s_ret
  212. OpenWithParm(w_outware_barcode_ch, s_tran)
  213. s_ret = Message.PowerObjectParm
  214. Long i,num
  215. num = UpperBound(s_ret.arr_string)
  216. If num <= 0 Then Return
  217. If Not IsNull(s_ret) Then
  218. For i = 1 To num
  219. Next
  220. End If
  221. end event
  222. type cb_3 from uo_imflatbutton within w_outware_barcodemx
  223. integer x = 914
  224. integer height = 164
  225. integer taborder = 70
  226. boolean bringtotop = true
  227. string text = "删除条码"
  228. string normalpicname = "delete.bmp"
  229. integer picsize = 16
  230. toolbaralignment pic_align = alignattop!
  231. boolean border = false
  232. end type
  233. event clicked;call super::clicked;if dw_1.RowCount() <= 0 then
  234. Messagebox('提示', '请先添加明细!')
  235. return
  236. end if
  237. long i, index
  238. index = 0
  239. FOR i = dw_1.RowCount() TO 1 STEP -1
  240. IF dw_1.Object.ch[i] = 1 THEN
  241. index++
  242. dw_1.DeleteRow(0)
  243. END IF
  244. NEXT
  245. IF index = 0 THEN
  246. MessageBox('提示', '请先勾选要删除的发货明细!')
  247. END IF
  248. end event
  249. type cbx_all from checkbox within w_outware_barcodemx
  250. integer x = 1445
  251. integer y = 108
  252. integer width = 261
  253. integer height = 60
  254. boolean bringtotop = true
  255. integer textsize = -9
  256. integer weight = 400
  257. fontcharset fontcharset = gb2312charset!
  258. fontpitch fontpitch = variable!
  259. string facename = "宋体"
  260. long textcolor = 33554432
  261. long backcolor = 67108864
  262. string text = "全选"
  263. end type
  264. event clicked;Long ll_i
  265. dw_1.SetRedraw(FALSE)
  266. FOR ll_i = 1 TO dw_1.RowCount()
  267. IF THIS.Checked THEN
  268. dw_1.Object.ch[ll_i] = 1
  269. ELSE
  270. dw_1.Object.ch[ll_i] = 0
  271. END IF
  272. NEXT
  273. dw_1.SetRedraw(TRUE)
  274. end event
  275. type cb_4 from uo_imflatbutton within w_outware_barcodemx
  276. integer x = 306
  277. integer height = 164
  278. integer taborder = 70
  279. boolean bringtotop = true
  280. string text = "保存"
  281. string normalpicname = "ok.bmp"
  282. integer picsize = 16
  283. toolbaralignment pic_align = alignattop!
  284. boolean border = false
  285. end type
  286. event clicked;call super::clicked;
  287. //OpenWithParm(w_fj_manage_saletask,s_pic)
  288. end event