$PBExportHeader$w_outware_barcodemx.srw forward global type w_outware_barcodemx from w_publ_easyq end type type cb_barcode from uo_imflatbutton within w_outware_barcodemx end type type cb_3 from uo_imflatbutton within w_outware_barcodemx end type type cbx_all from checkbox within w_outware_barcodemx end type type cb_4 from uo_imflatbutton within w_outware_barcodemx end type end forward global type w_outware_barcodemx from w_publ_easyq string title = "条码管理" windowstate windowstate = normal! cb_barcode cb_barcode cb_3 cb_3 cbx_all cbx_all cb_4 cb_4 end type global w_outware_barcodemx w_outware_barcodemx type variables string ins_title //标题 long ins_outwareid //单据id end variables forward prototypes public function integer wf_retrieve () end prototypes public function integer wf_retrieve ();Int rslt = 1 dw_1.Reset() String arg_msg Long ll_row, outwareid If IsNull(ins_outwareid) Then Goto ext oleobject req, rsp req = FXAppCom.CreatePbDictionary() req.SetString('token', app_token_fx) req.SetInt('outwareid', ins_outwareid) rsp = FXAppCom.DoExecute('GetFxSaletaskBuyBarcode', req) arg_msg = rsp.GetString('ErrMsg') If (arg_msg <> '') Then rslt = 0 MessageBox('提示', '获取订单条码失败:' + arg_msg) Goto ext End If oleobject list, Item list = rsp.GetPBArray('barcodeList') dw_1.SetRedraw(False) Long i, row For i = 1 To list.Count Item = list.GetPBDictionary(i - 1) row = dw_1.InsertRow(0) dw_1.SetItem(row, 'taskid', Item.GetInt('taskid')) dw_1.SetItem(row, 'printid', Item.GetInt('printid')) dw_1.SetItem(row, 'barcode', Item.GetString('barcode')) dw_1.SetItem(row, 'taskcode', Item.GetString('taskcode')) dw_1.SetItem(row, 'mtrlcode', Item.GetString('mtrlcode')) dw_1.SetItem(row, 'mtrlname', Item.GetString('mtrlname')) dw_1.SetItem(row, 'mtrlmode', Item.GetString('mtrlmode')) dw_1.SetItem(row, 'status', Item.GetString('status')) dw_1.SetItem(row, 'woodcode', Item.GetString('woodcode')) dw_1.SetItem(row, 'pcode', Item.GetString('pcode')) dw_1.SetItem(row, 'qty', Item.GetInt('qty')) dw_1.SetItem(row, 'printnum', Item.GetInt('printnum')) dw_1.SetItem(row, 'packqty', Item.GetDouble('packqty')) Next dw_1.SetRedraw(True) ext: Return rslt end function on w_outware_barcodemx.create int iCurrent call super::create this.cb_barcode=create cb_barcode this.cb_3=create cb_3 this.cbx_all=create cbx_all this.cb_4=create cb_4 iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.cb_barcode this.Control[iCurrent+2]=this.cb_3 this.Control[iCurrent+3]=this.cbx_all this.Control[iCurrent+4]=this.cb_4 end on on w_outware_barcodemx.destroy call super::destroy destroy(this.cb_barcode) destroy(this.cb_3) destroy(this.cbx_all) destroy(this.cb_4) end on event open;call super::open;s_edit_index_tran s_tran //翻页功能窗口 传递参数使用 s_tran = Message.PowerObjectParm //单据id IF NOT IsNull(s_tran.e_long ) THEN ins_outwareid = s_tran.e_long //标题 ELSE MessageBox('系统提示','单据ID不正确或没有指定') Close(THIS) RETURN END IF //标题 IF NOT IsNull(s_tran.d_string ) THEN ins_title = s_tran.d_string ELSE ins_title = "条码管理" END IF THIS.Title = ins_title wf_retrieve() end event type cb_func from w_publ_easyq`cb_func within w_outware_barcodemx boolean visible = false end type type cb_exit from w_publ_easyq`cb_exit within w_outware_barcodemx integer x = 1221 end type type cb_2 from w_publ_easyq`cb_2 within w_outware_barcodemx boolean visible = false end type type cb_psetup from w_publ_easyq`cb_psetup within w_outware_barcodemx boolean visible = false end type type cb_1 from w_publ_easyq`cb_1 within w_outware_barcodemx integer width = 302 string text = "刷新还原" end type event cb_1::clicked;call super::clicked;wf_retrieve() end event type st_3 from w_publ_easyq`st_3 within w_outware_barcodemx boolean visible = false end type type st_4 from w_publ_easyq`st_4 within w_outware_barcodemx boolean visible = false end type type em_1 from w_publ_easyq`em_1 within w_outware_barcodemx boolean visible = false end type type em_2 from w_publ_easyq`em_2 within w_outware_barcodemx boolean visible = false end type type ddlb_yl from w_publ_easyq`ddlb_yl within w_outware_barcodemx boolean visible = false end type type cbx_yl from w_publ_easyq`cbx_yl within w_outware_barcodemx boolean visible = false end type type dw_1 from w_publ_easyq`dw_1 within w_outware_barcodemx integer y = 188 integer height = 2044 string dataobject = "dw_fx_saletask_buy_barcode" end type type sle_mtrl from w_publ_easyq`sle_mtrl within w_outware_barcodemx end type type sle_cust from w_publ_easyq`sle_cust within w_outware_barcodemx end type type st_mtrl from w_publ_easyq`st_mtrl within w_outware_barcodemx end type type st_cust from w_publ_easyq`st_cust within w_outware_barcodemx end type type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_outware_barcodemx end type type pb_em1 from w_publ_easyq`pb_em1 within w_outware_barcodemx boolean visible = false end type type pb_em2 from w_publ_easyq`pb_em2 within w_outware_barcodemx boolean visible = false end type type pb_2 from w_publ_easyq`pb_2 within w_outware_barcodemx boolean visible = false end type type cb_help from w_publ_easyq`cb_help within w_outware_barcodemx boolean visible = false end type type cb_copyself from w_publ_easyq`cb_copyself within w_outware_barcodemx boolean visible = false end type type gb_1 from w_publ_easyq`gb_1 within w_outware_barcodemx end type type ln_bar from w_publ_easyq`ln_bar within w_outware_barcodemx end type type ln_bar2 from w_publ_easyq`ln_bar2 within w_outware_barcodemx end type type r_bar from w_publ_easyq`r_bar within w_outware_barcodemx end type type ln_1 from w_publ_easyq`ln_1 within w_outware_barcodemx integer beginy = 172 integer endy = 172 end type type ln_2 from w_publ_easyq`ln_2 within w_outware_barcodemx integer beginy = 176 integer endy = 176 end type type ln_3 from w_publ_easyq`ln_3 within w_outware_barcodemx integer beginy = 176 integer endy = 176 end type type ln_4 from w_publ_easyq`ln_4 within w_outware_barcodemx integer beginy = 176 integer endy = 176 end type type cb_barcode from uo_imflatbutton within w_outware_barcodemx integer x = 608 integer height = 164 integer taborder = 60 boolean bringtotop = true string text = "录入条码" string normalpicname = "new.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;s_edit_index_tran s_tran, s_ret OpenWithParm(w_outware_barcode_ch, s_tran) s_ret = Message.PowerObjectParm Long i,num num = UpperBound(s_ret.arr_string) If num <= 0 Then Return If Not IsNull(s_ret) Then For i = 1 To num Next End If end event type cb_3 from uo_imflatbutton within w_outware_barcodemx integer x = 914 integer height = 164 integer taborder = 70 boolean bringtotop = true string text = "删除条码" string normalpicname = "delete.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;if dw_1.RowCount() <= 0 then Messagebox('提示', '请先添加明细!') return end if long i, index index = 0 FOR i = dw_1.RowCount() TO 1 STEP -1 IF dw_1.Object.ch[i] = 1 THEN index++ dw_1.DeleteRow(0) END IF NEXT IF index = 0 THEN MessageBox('提示', '请先勾选要删除的发货明细!') END IF end event type cbx_all from checkbox within w_outware_barcodemx integer x = 1445 integer y = 108 integer width = 261 integer height = 60 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 67108864 string text = "全选" end type event clicked;Long ll_i dw_1.SetRedraw(FALSE) FOR ll_i = 1 TO dw_1.RowCount() IF THIS.Checked THEN dw_1.Object.ch[ll_i] = 1 ELSE dw_1.Object.ch[ll_i] = 0 END IF NEXT dw_1.SetRedraw(TRUE) end event type cb_4 from uo_imflatbutton within w_outware_barcodemx integer x = 306 integer height = 164 integer taborder = 70 boolean bringtotop = true string text = "保存" string normalpicname = "ok.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked; //OpenWithParm(w_fj_manage_saletask,s_pic) end event