$PBExportHeader$w_mtrl_propel_ljfieb.srw forward global type w_mtrl_propel_ljfieb from w_publ_base end type type cb_post from uo_imflatbutton within w_mtrl_propel_ljfieb end type type dw_1 from u_dw_rbtnfilter within w_mtrl_propel_ljfieb end type type dw_2 from u_dw_rbtnfilter within w_mtrl_propel_ljfieb end type type cb_add_mtrl from uo_imflatbutton within w_mtrl_propel_ljfieb end type type cb_del_mtrl from uo_imflatbutton within w_mtrl_propel_ljfieb end type type cb_reset_mtrl from uo_imflatbutton within w_mtrl_propel_ljfieb end type type st_1 from statictext within w_mtrl_propel_ljfieb end type type st_2 from statictext within w_mtrl_propel_ljfieb end type type cb_add_cus from uo_imflatbutton within w_mtrl_propel_ljfieb end type type cb_del_cus from uo_imflatbutton within w_mtrl_propel_ljfieb end type type cb_reset_cus from uo_imflatbutton within w_mtrl_propel_ljfieb end type type st_3 from statictext within w_mtrl_propel_ljfieb end type type mle_1 from multilineedit within w_mtrl_propel_ljfieb end type type st_4 from statictext within w_mtrl_propel_ljfieb end type type mle_2 from multilineedit within w_mtrl_propel_ljfieb end type type rb_1 from radiobutton within w_mtrl_propel_ljfieb end type type rb_2 from radiobutton within w_mtrl_propel_ljfieb end type type cb_push_op from uo_imflatbutton within w_mtrl_propel_ljfieb end type type cb_add_spt from uo_imflatbutton within w_mtrl_propel_ljfieb end type type ln_bar from line within w_mtrl_propel_ljfieb end type type ln_bar2 from line within w_mtrl_propel_ljfieb end type type r_bar from rectangle within w_mtrl_propel_ljfieb end type end forward global type w_mtrl_propel_ljfieb from w_publ_base integer width = 3602 integer height = 2380 string title = "资料推送" boolean maxbox = true windowstate windowstate = maximized! cb_post cb_post dw_1 dw_1 dw_2 dw_2 cb_add_mtrl cb_add_mtrl cb_del_mtrl cb_del_mtrl cb_reset_mtrl cb_reset_mtrl st_1 st_1 st_2 st_2 cb_add_cus cb_add_cus cb_del_cus cb_del_cus cb_reset_cus cb_reset_cus st_3 st_3 mle_1 mle_1 st_4 st_4 mle_2 mle_2 rb_1 rb_1 rb_2 rb_2 cb_push_op cb_push_op cb_add_spt cb_add_spt ln_bar ln_bar ln_bar2 ln_bar2 r_bar r_bar end type global w_mtrl_propel_ljfieb w_mtrl_propel_ljfieb type variables uo_ljfieb uo_fieb Transaction tr_eb_sqlca end variables forward prototypes public function integer wf_fillmtrltype (long arg_mtrltypeid, ref long arg_mtrltypeid_arr[], ref string arg_msg) end prototypes public function integer wf_fillmtrltype (long arg_mtrltypeid, ref long arg_mtrltypeid_arr[], ref string arg_msg);Int rslt = 1 Long i Long mx mx = UpperBound(arg_mtrltypeid_arr) FOR i = 1 To mx IF arg_mtrltypeid_arr[i] = arg_mtrltypeid THEN RETURN rslt END IF NEXT mx++ arg_mtrltypeid_arr[mx] = arg_mtrltypeid Long pid SELECT parentid INTO :pid FROM u_mtrltype Where mtrltypeid = :arg_mtrltypeid; IF sqlca.SQLCode <> 0 THEN pid = 0 END IF if pid > 0 then if wf_fillmtrltype(pid, arg_mtrltypeid_arr, arg_msg) <> 1 then rslt = 0 goto ext end if end if ext: return rslt end function on w_mtrl_propel_ljfieb.create int iCurrent call super::create this.cb_post=create cb_post this.dw_1=create dw_1 this.dw_2=create dw_2 this.cb_add_mtrl=create cb_add_mtrl this.cb_del_mtrl=create cb_del_mtrl this.cb_reset_mtrl=create cb_reset_mtrl this.st_1=create st_1 this.st_2=create st_2 this.cb_add_cus=create cb_add_cus this.cb_del_cus=create cb_del_cus this.cb_reset_cus=create cb_reset_cus this.st_3=create st_3 this.mle_1=create mle_1 this.st_4=create st_4 this.mle_2=create mle_2 this.rb_1=create rb_1 this.rb_2=create rb_2 this.cb_push_op=create cb_push_op this.cb_add_spt=create cb_add_spt this.ln_bar=create ln_bar this.ln_bar2=create ln_bar2 this.r_bar=create r_bar iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.cb_post this.Control[iCurrent+2]=this.dw_1 this.Control[iCurrent+3]=this.dw_2 this.Control[iCurrent+4]=this.cb_add_mtrl this.Control[iCurrent+5]=this.cb_del_mtrl this.Control[iCurrent+6]=this.cb_reset_mtrl this.Control[iCurrent+7]=this.st_1 this.Control[iCurrent+8]=this.st_2 this.Control[iCurrent+9]=this.cb_add_cus this.Control[iCurrent+10]=this.cb_del_cus this.Control[iCurrent+11]=this.cb_reset_cus this.Control[iCurrent+12]=this.st_3 this.Control[iCurrent+13]=this.mle_1 this.Control[iCurrent+14]=this.st_4 this.Control[iCurrent+15]=this.mle_2 this.Control[iCurrent+16]=this.rb_1 this.Control[iCurrent+17]=this.rb_2 this.Control[iCurrent+18]=this.cb_push_op this.Control[iCurrent+19]=this.cb_add_spt this.Control[iCurrent+20]=this.ln_bar this.Control[iCurrent+21]=this.ln_bar2 this.Control[iCurrent+22]=this.r_bar end on on w_mtrl_propel_ljfieb.destroy call super::destroy destroy(this.cb_post) destroy(this.dw_1) destroy(this.dw_2) destroy(this.cb_add_mtrl) destroy(this.cb_del_mtrl) destroy(this.cb_reset_mtrl) destroy(this.st_1) destroy(this.st_2) destroy(this.cb_add_cus) destroy(this.cb_del_cus) destroy(this.cb_reset_cus) destroy(this.st_3) destroy(this.mle_1) destroy(this.st_4) destroy(this.mle_2) destroy(this.rb_1) destroy(this.rb_2) destroy(this.cb_push_op) destroy(this.cb_add_spt) destroy(this.ln_bar) destroy(this.ln_bar2) destroy(this.r_bar) end on event open;call super::open;tr_eb_sqlca = sys_email_sqlca // 电子商务连接 uo_fieb = create uo_ljfieb uo_fieb.commit_transaction = tr_eb_sqlca end event event resize;call super::resize;ln_bar.endx = this.width ln_bar2.endx = this.width r_bar.width = this.width //dw_1.width = this.WorkSpaceWidth() - 10 dw_2.width = this.WorkSpaceWidth() - 10 dw_2.height = this.workspaceheight() - dw_2.y - 30 mle_1.width = dw_2.width - dw_1.width - 4 mle_2.width = mle_1.width end event event close;call super::close;destroy uo_fieb end event type cb_func from w_publ_base`cb_func within w_mtrl_propel_ljfieb boolean visible = false integer width = 311 integer height = 96 string text = "功能" string normalpicname = "" integer picsize = 0 toolbaralignment pic_align = alignatleft! boolean border = true end type type cb_exit from w_publ_base`cb_exit within w_mtrl_propel_ljfieb integer x = 270 integer width = 151 integer height = 164 integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type type cb_post from uo_imflatbutton within w_mtrl_propel_ljfieb integer x = 14 integer width = 219 integer height = 164 integer taborder = 30 boolean bringtotop = true string text = "提交" string normalpicname = "update2.BMP" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked; IF sys_email_sqlca.DBHandle() = 0 THEN MessageBox('Error','电子商务数据库连接失败,请检查') RETURN END IF Long ll_sendcuscommid,ll_receivecuscommid Long ll_i,ll_j,ll_k String ls_commcode,ls_mtrlcode,ls_commsccode,ls_cuscode s_mtrldef_array s_post_mtrl String arg_msg,arg_msg_tmp Long ll_suc,ll_fail String arg_summary,arg_postscript,arg_remark Long ll_commid_ec Long arr_mtrltypeid[] IF rb_1.Checked THEN IF dw_1.RowCount() = 0 THEN MessageBox('系统提示','请先选择接收者!') RETURN END IF ELSE SELECT CusCommID INTO :ll_commid_ec FROM LJFIEB_CusComm Where CusType = 5 Using tr_eb_sqlca; IF tr_eb_sqlca.SQLCode <> 0 THEN MessageBox('Error','查询电子商务网站通讯连接失败,请先确认已设置电子商务网站通讯连接'+tr_eb_sqlca.SQLErrText) RETURN END IF IF ll_commid_ec = 0 THEN MessageBox('系统提示','请先确认已设置电子商务网站通讯连接!') RETURN END IF END IF IF dw_2.RowCount() = 0 THEN MessageBox('系统提示','请先选择要推送的产品资料!') RETURN END IF IF MessageBox('系统提示','确定要把资料列表中的产品推送到列表中的接收者吗?',question!,yesno!) = 2 THEN RETURN arg_msg = '' dw_1.AcceptText() dw_2.AcceptText() SELECT CusCommID INTO :ll_sendcuscommid FROM LJFIEB_CusComm Where CusType = 0 Using tr_eb_sqlca; IF tr_eb_sqlca.SQLCode <> 0 THEN MessageBox('Error','查询本公司企业编号失败,'+tr_eb_sqlca.SQLErrText) RETURN END IF IF rb_1.Checked THEN FOR ll_i = 1 To dw_1.RowCount() ll_receivecuscommid = dw_1.Object.CusCommID[ll_i] IF IsNull(ll_receivecuscommid) THEN ll_receivecuscommid = 0 IF ll_receivecuscommid = 0 THEN MessageBox('系统提示','接收者列表第'+String(ll_i)+'行,找不到对应的企业编号,请检查') RETURN END IF NEXT END IF Long ll_ifsend = 0 FOR ll_i = 1 To dw_2.RowCount() ls_mtrlcode = dw_2.Object.mtrlcode[ll_i] // ll_ifsend = dw_2.Object.withpic[ll_i] IF f_ljfieb_fillmtrl(ls_mtrlcode, ll_ifsend, s_post_mtrl, arg_msg) <> 1 THEN MessageBox('Error','资料列表第'+String(ll_i)+'行,' + arg_msg) RETURN END IF NEXT s_packet_ljfieb s_pack,s_return // // //s_pack.summary = '资料推送' // //OpenWithParm(w_dscrp_edit_ljfieb,s_pack) // //s_return = Message.PowerObjectParm //IF s_return.returnflag <> 1 THEN RETURN ////arg_summary = s_return.summary arg_postscript = mle_1.Text arg_remark = mle_2.Text IF rb_1.Checked THEN FOR ll_i = 1 To dw_1.RowCount() ll_receivecuscommid = dw_1.Object.CusCommID[ll_i] ls_commsccode = dw_1.Object.commsccode[ll_i] ls_cuscode = dw_1.Object.cuscode[ll_i] 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 arg_msg = arg_msg + '第'+String(ll_i)+'行,客户:'+ls_cuscode+',提交资料失败,'+arg_msg_tmp + '~r~n' ll_fail++ CONTINUE END IF ll_suc++ NEXT ELSE ll_receivecuscommid = ll_commid_ec FOR ll_i = 1 To UpperBound(s_post_mtrl.mtrltypeid) IF wf_fillmtrltype(s_post_mtrl.mtrltypeid[ll_i], arr_mtrltypeid, arg_msg_tmp) <> 1 THEN arg_msg = '查询资料类别失败,'+arg_msg_tmp + '~r~n' ll_fail++ END IF NEXT IF uo_fieb.send_mtrltype(ll_sendcuscommid,'',ll_receivecuscommid,'',arr_mtrltypeid,arg_msg_tmp,True) = 0 THEN arg_msg = '提交类别到电子商务网站失败,'+arg_msg_tmp + '~r~n' ll_fail++ END IF IF uo_fieb.add_mtrldef(ll_sendcuscommid,'',ll_receivecuscommid,'',s_post_mtrl,arg_summary,arg_postscript,arg_remark,arg_msg_tmp,True) = 0 THEN arg_msg = '提交资料到电子商务网站失败,'+arg_msg_tmp + '~r~n' ll_fail++ END IF END IF IF rb_1.Checked THEN MessageBox(publ_operator,'提交资料完成!成功:'+String(ll_suc)+',失败:'+String(ll_fail)) ELSE MessageBox(publ_operator,'提交资料完成!') END IF IF ll_fail > 0 THEN OpenWithParm(w_message_err,arg_msg) ELSE Close(Parent) END IF end event type dw_1 from u_dw_rbtnfilter within w_mtrl_propel_ljfieb integer y = 284 integer width = 2149 integer height = 720 integer taborder = 20 boolean bringtotop = true string title = "接收者" string dataobject = "dw_cust_comm_accept_propel" boolean hscrollbar = true boolean vscrollbar = true end type event rowfocuschanged;call super::rowfocuschanged; IF currentrow <= 0 THEN RETURN THIS.SelectRow(0,FALSE) THIS.SelectRow(currentrow,TRUE) end event type dw_2 from u_dw_rbtnfilter within w_mtrl_propel_ljfieb integer y = 1132 integer width = 3579 integer height = 1108 integer taborder = 20 boolean bringtotop = true string dataobject = "dw_mtrldef_comm_propel" boolean hscrollbar = true boolean vscrollbar = true end type event rowfocuschanged;call super::rowfocuschanged; IF currentrow <= 0 THEN RETURN THIS.SelectRow(0,FALSE) THIS.SelectRow(currentrow,TRUE) end event type cb_add_mtrl from uo_imflatbutton within w_mtrl_propel_ljfieb integer x = 466 integer y = 1020 integer width = 347 integer taborder = 30 boolean bringtotop = true string text = "增加产品" string normalpicname = "OPEN.BMP" integer picsize = 16 end type event clicked;call super::clicked;Long child_row Long ll_storageid = 0 Int li_int String ls_str child_row = dw_2.GetRow() IF NOT IsValid(W_mtrldef_edit) THEN s_edit_index_tran s_ch_tran //传递参数使用 s_ch_tran.if_retrieve_all = FALSE //是否一次RETRIEVE所有行 s_ch_tran.work_mode = 1 //0-单纯编辑模式 1-选择\编辑模式 s_ch_tran.arg_pkid = 0 //目标定位PKID (备用) s_ch_tran.arg_string_code = '' //查询列(物料编码)部分内容,用于初步筛选 s_ch_tran.if_select_all = TRUE s_ch_tran.b_long = 0 s_ch_tran.c_long = -1 s_ch_tran.f_long = 0 Long chc = 1,ls_j dw_2.AcceptText() THIS.Enabled = FALSE OpenWithParm(W_mtrldef_edit,s_ch_tran) THIS.Enabled = TRUE s_mtrldef_array S_INSCUST S_INSCUST = Message.PowerObjectParm dw_2.setredraw(false) FOR ls_j = 1 TO UpperBound(S_INSCUST.mtrlid) IF S_INSCUST.mtrlid[ls_j] > 0 THEN IF dw_2.Find("mtrlid =" + String(s_inscust.mtrlid[ls_j]), 1, dw_2.RowCount()) > 0 THEN CONTINUE IF dw_2.GetRow() > 0 THEN IF dw_2.Object.mtrlid[child_row] <> 0 THEN child_row = dw_2.InsertRow (0) ELSE child_row = dw_2.GetRow() END IF ELSE child_row = dw_2.InsertRow (0) END IF dw_2.Object.mtrlcode[child_row] = S_INSCUST.mtrlcode[ls_j] dw_2.Object.mtrlname[child_row] = S_INSCUST.mtrlname[ls_j] dw_2.Object.mtrlmode[child_row] = S_INSCUST.mtrlmode[ls_j] dw_2.Object.unit[child_row] = S_INSCUST.unit[ls_j] dw_2.Object.mtrlid[child_row] = S_INSCUST.mtrlid[ls_j] dw_2.Object.mtrlsectype[child_row] = S_INSCUST.mtrlsectype[ls_j] dw_2.Object.zxmtrlmode[child_row] = S_INSCUST.zxmtrlmode[ls_j] dw_2.Object.usermtrlmode[child_row] = S_INSCUST.usermtrlmode[ls_j] dw_2.Object.mtrltype[child_row] = S_INSCUST.mtrltype[ls_j] dw_2.Object.ifcustom[child_row] = S_INSCUST.ifcustom[ls_j] dw_2.Object.packqty[child_row] = S_INSCUST.packqty[ls_j] dw_2.Object.prdpackcode[child_row] = S_INSCUST.prdpackcode[ls_j] dw_2.Object.ifpacktype[child_row] = S_INSCUST.ifpacktype[ls_j] dw_2.Object.unit_buy[child_row] = S_INSCUST.unit_buy[ls_j] dw_2.Object.rate_buy[child_row] = S_INSCUST.rate_buy[ls_j] dw_2.Object.unit_scll[child_row] = S_INSCUST.unit_scll[ls_j] dw_2.Object.rate_scll[child_row] = S_INSCUST.rate_scll[ls_j] dw_2.Object.unit_sale[child_row] = S_INSCUST.unit_sale[ls_j] dw_2.Object.rate_sale[child_row] = S_INSCUST.rate_sale[ls_j] dw_2.Object.net_weight[child_row] = S_INSCUST.net_weight[ls_j] dw_2.Object.gross_weight[child_row] = S_INSCUST.gross_weight[ls_j] dw_2.Object.cubage[child_row] = S_INSCUST.cubage[ls_j] dw_2.Object.ifpackpro[child_row] = 0 //S_INSCUST.ifpackpro[ls_j] dw_2.Object.ifpackpro2[child_row] = 0 //S_INSCUST.ifpackpro2[ls_j] dw_2.Object.ifpack[child_row] = 0 //S_INSCUST.ifpack[ls_j] dw_2.Object.handtype[child_row] = S_INSCUST.handtype[ls_j] dw_2.Object.mtrlorigin[child_row] = S_INSCUST.mtrlorigin[ls_j] dw_2.Object.mtrlprp[child_row] = S_INSCUST.mtrlprp[ls_j] END IF NEXT dw_2.setredraw(true) dw_2.SetFocus() END IF end event type cb_del_mtrl from uo_imflatbutton within w_mtrl_propel_ljfieb integer x = 864 integer y = 1020 integer width = 366 integer taborder = 40 boolean bringtotop = true string text = "删除产品" string normalpicname = "DELETE.BMP" integer picsize = 16 end type event clicked;call super::clicked;IF dw_2.GetRow() <= 0 THEN MessageBox('系统提示','请选择要删除的对象') RETURN END IF IF MessageBox ("询问","是否确定要删除当前选中的产品资料?",Question!,YesNo! ) = 2 THEN RETURN dw_2.DeleteRow (dw_2.GetRow()) end event type cb_reset_mtrl from uo_imflatbutton within w_mtrl_propel_ljfieb integer x = 1280 integer y = 1020 integer width = 457 integer taborder = 40 boolean bringtotop = true string text = "清空产品列表" string normalpicname = "p2.BMP" integer picsize = 16 end type event clicked;call super::clicked;if dw_2.rowcount() = 0 then messagebox('系统提示','接收者列表已清空') return end if IF MessageBox ("询问","是否确定要清空产品列表?",Question!,YesNo! ) = 2 THEN RETURN dw_2.reset() end event type st_1 from statictext within w_mtrl_propel_ljfieb integer x = 37 integer y = 1060 integer width = 402 integer height = 48 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "推送产品列表" boolean focusrectangle = false end type type st_2 from statictext within w_mtrl_propel_ljfieb integer x = 37 integer y = 220 integer width = 325 integer height = 52 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "接收者列表" boolean focusrectangle = false end type type cb_add_cus from uo_imflatbutton within w_mtrl_propel_ljfieb integer x = 466 integer y = 180 integer width = 389 integer taborder = 40 boolean bringtotop = true string text = "增加客户" string normalpicname = "OPEN.BMP" integer picsize = 16 end type event clicked;call super::clicked;Long uc_row,ls_j Long child_row,ll_receivecuscommid IF Not IsValid(w_cust_comm_ch) THEN s_edit_index_tran s_open //传递参数使用 s_open.if_select_any = True s_open.b_string = '' This.Enabled = False OpenWithParm(w_cust_comm_ch,s_open) This.Enabled = True s_custom_arr s_inscust s_inscust = Message.PowerObjectParm //接受返回结构 dw_1.SetRedraw(False) FOR ls_j = 1 To UpperBound(s_inscust.cusid) IF s_inscust.cusid[ls_j] > 0 THEN //正常返回值则可以取以下值 IF dw_1.Find("commcode ='" + s_inscust.commcode[ls_j] + "'", 1, dw_1.RowCount()) > 0 THEN CONTINUE IF dw_1.GetRow() > 0 THEN IF dw_1.Object.cusid[dw_1.GetRow()] <> 0 THEN child_row = dw_1.InsertRow (0) ELSE child_row = dw_1.GetRow() END IF ELSE child_row = dw_1.InsertRow (0) END IF dw_1.Object.cusid[child_row] = s_inscust.cusid[ls_j] dw_1.Object.cuscode[child_row] = s_inscust.cuscode[ls_j] dw_1.Object.Name[child_row] = s_inscust.Name[ls_j] dw_1.Object.cusareaname[child_row] = s_inscust.cusareaname[ls_j] dw_1.Object.commcode[child_row] = s_inscust.commcode[ls_j] dw_1.Object.commsccode[child_row] = s_inscust.commsccode[ls_j] SELECT CusCommID INTO :ll_receivecuscommid FROM LJFIEB_CusComm Where cuscode = :s_inscust.commcode[ls_j] using tr_eb_sqlca; IF tr_eb_sqlca.SQLCode <> 0 THEN ll_receivecuscommid = 0 END IF dw_1.Object.CusCommID[child_row] = ll_receivecuscommid END IF NEXT dw_1.SetRedraw(True) END IF end event type cb_del_cus from uo_imflatbutton within w_mtrl_propel_ljfieb integer x = 1289 integer y = 180 integer width = 384 integer taborder = 40 boolean bringtotop = true string text = "删除接收者" string normalpicname = "DELETE.BMP" integer picsize = 16 end type event clicked;call super::clicked;IF dw_1.GetRow() <= 0 THEN MessageBox('系统提示','请选择要删除的对象') RETURN END IF IF MessageBox ("询问","是否确定要删除当前选中的接收者?",Question!,YesNo! ) = 2 THEN RETURN dw_1.DeleteRow (dw_1.GetRow()) end event type cb_reset_cus from uo_imflatbutton within w_mtrl_propel_ljfieb integer x = 1696 integer y = 180 integer width = 494 integer taborder = 50 boolean bringtotop = true string text = "清空接收者列表" string normalpicname = "p2.BMP" integer picsize = 16 end type event clicked;call super::clicked;if dw_1.rowcount() = 0 then return end if IF MessageBox ("询问","是否确定要清空接收者列表?",Question!,YesNo! ) = 2 THEN RETURN dw_1.reset() end event type st_3 from statictext within w_mtrl_propel_ljfieb integer x = 2162 integer y = 292 integer width = 142 integer height = 56 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "附言" boolean focusrectangle = false end type type mle_1 from multilineedit within w_mtrl_propel_ljfieb integer x = 2153 integer y = 352 integer width = 1426 integer height = 408 integer taborder = 50 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 boolean vscrollbar = true boolean autovscroll = true borderstyle borderstyle = stylelowered! end type type st_4 from statictext within w_mtrl_propel_ljfieb integer x = 2162 integer y = 772 integer width = 128 integer height = 48 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "备注" boolean focusrectangle = false end type type mle_2 from multilineedit within w_mtrl_propel_ljfieb integer x = 2153 integer y = 832 integer width = 1426 integer height = 164 integer taborder = 60 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 boolean vscrollbar = true boolean autovscroll = true borderstyle borderstyle = stylelowered! end type type rb_1 from radiobutton within w_mtrl_propel_ljfieb integer x = 562 integer y = 60 integer width = 402 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 = "供应链模式" boolean checked = true end type event constructor;this.backcolor = 14215660 end event event clicked;cb_add_cus.Enabled = true cb_del_cus.Enabled = true cb_reset_cus.Enabled = true dw_1.Enabled = true cb_push_op.Visible = False end event type rb_2 from radiobutton within w_mtrl_propel_ljfieb integer x = 1033 integer y = 60 integer width = 411 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 constructor;this.backcolor = 14215660 end event event clicked;cb_add_cus.Enabled = False cb_del_cus.Enabled = False cb_reset_cus.Enabled = False dw_1.Enabled = False cb_push_op.Visible = True dw_1.reset() end event type cb_push_op from uo_imflatbutton within w_mtrl_propel_ljfieb boolean visible = false integer x = 1522 integer width = 274 integer height = 164 integer taborder = 40 boolean bringtotop = true string text = "同步选项" string normalpicname = "update2.BMP" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked; IF sys_email_sqlca.DBHandle() = 0 THEN MessageBox('Error','电子商务数据库连接失败,请检查') RETURN END IF String ls_msg IF uo_fieb.send_web_option(ls_msg) = 0 THEN MessageBox('Error',ls_msg) RETURN END IF IF uo_fieb.send_web_scdef(ls_msg) = 0 THEN MessageBox('Error',ls_msg) RETURN END IF IF uo_fieb.send_web_currency(ls_msg) = 0 THEN MessageBox('Error',ls_msg) RETURN END IF IF uo_fieb.send_web_banktype(ls_msg) = 0 THEN MessageBox('Error',ls_msg) RETURN END IF MessageBox('OK', '同步成功') end event type cb_add_spt from uo_imflatbutton within w_mtrl_propel_ljfieb integer x = 878 integer y = 180 integer width = 389 integer taborder = 50 boolean bringtotop = true string text = "增加供应商" string normalpicname = "OPEN.BMP" integer picsize = 16 end type event clicked;call super::clicked;Long uc_row,ls_j Long child_row,ll_receivecuscommid IF Not IsValid(w_spt_ecomm_ch) THEN s_edit_index_tran s_open //传递参数使用 s_open.if_select_any = True s_open.b_string = '' This.Enabled = False OpenWithParm(w_spt_ecomm_ch,s_open) This.Enabled = True s_custom_arr s_inscust s_inscust = Message.PowerObjectParm //接受返回结构 dw_1.SetRedraw(False) FOR ls_j = 1 To UpperBound(s_inscust.cusid) IF s_inscust.cusid[ls_j] > 0 THEN //正常返回值则可以取以下值 IF dw_1.Find("commcode ='" + s_inscust.commcode[ls_j] + "'", 1, dw_1.RowCount()) > 0 THEN CONTINUE IF dw_1.GetRow() > 0 THEN IF dw_1.Object.cusid[dw_1.GetRow()] <> 0 THEN child_row = dw_1.InsertRow (0) ELSE child_row = dw_1.GetRow() END IF ELSE child_row = dw_1.InsertRow (0) END IF dw_1.Object.cusid[child_row] = s_inscust.cusid[ls_j] dw_1.Object.cuscode[child_row] = s_inscust.cuscode[ls_j] dw_1.Object.Name[child_row] = s_inscust.Name[ls_j] // dw_1.Object.cusareaname[child_row] = s_inscust.cusareaname[ls_j] dw_1.Object.commcode[child_row] = s_inscust.commcode[ls_j] dw_1.Object.commsccode[child_row] = s_inscust.commsccode[ls_j] SELECT CusCommID INTO :ll_receivecuscommid FROM LJFIEB_CusComm Where cuscode = :s_inscust.commcode[ls_j] using tr_eb_sqlca; IF tr_eb_sqlca.SQLCode <> 0 THEN ll_receivecuscommid = 0 END IF dw_1.Object.CusCommID[child_row] = ll_receivecuscommid END IF NEXT dw_1.SetRedraw(True) END IF end event type ln_bar from line within w_mtrl_propel_ljfieb long linecolor = 268435456 integer linethickness = 4 integer beginy = 168 integer endx = 2007 integer endy = 168 end type type ln_bar2 from line within w_mtrl_propel_ljfieb long linecolor = 16777215 integer linethickness = 4 integer beginy = 172 integer endx = 2039 integer endy = 172 end type type r_bar from rectangle within w_mtrl_propel_ljfieb long linecolor = 16777215 integer linethickness = 4 long fillcolor = 1073741824 integer x = 1531 integer width = 146 integer height = 68 end type event constructor;this.fillcolor = 14215660 this.linecolor = 14215660 this.x = -1 this.y = -1 this.height = ln_bar.beginy - 5 end event