$PBExportHeader$w_buytask_feedback_ljfieb.srw forward global type w_buytask_feedback_ljfieb from w_publ_base end type type dw_uc from datawindow within w_buytask_feedback_ljfieb end type type dw_child from u_dw_rbtnfilter within w_buytask_feedback_ljfieb end type type mle_1 from multilineedit within w_buytask_feedback_ljfieb end type type st_1 from statictext within w_buytask_feedback_ljfieb end type type st_2 from statictext within w_buytask_feedback_ljfieb end type type sle_scname from singlelineedit within w_buytask_feedback_ljfieb end type type st_remark from statictext within w_buytask_feedback_ljfieb end type type cb_ok from uo_imflatbutton within w_buytask_feedback_ljfieb end type type cb_bill from uo_imflatbutton within w_buytask_feedback_ljfieb end type type ln_bar from line within w_buytask_feedback_ljfieb end type type ln_bar2 from line within w_buytask_feedback_ljfieb end type type ln_1 from line within w_buytask_feedback_ljfieb end type type ln_2 from line within w_buytask_feedback_ljfieb end type type r_bar from rectangle within w_buytask_feedback_ljfieb end type end forward global type w_buytask_feedback_ljfieb from w_publ_base integer width = 3611 integer height = 2380 string title = "采购订单供应商反馈" boolean minbox = false windowtype windowtype = response! windowstate windowstate = maximized! dw_uc dw_uc dw_child dw_child mle_1 mle_1 st_1 st_1 st_2 st_2 sle_scname sle_scname st_remark st_remark cb_ok cb_ok cb_bill cb_bill ln_bar ln_bar ln_bar2 ln_bar2 ln_1 ln_1 ln_2 ln_2 r_bar r_bar end type global w_buytask_feedback_ljfieb w_buytask_feedback_ljfieb type variables Transaction tr_eb_sqlca s_packet_ljfieb s_inscust uo_ljfieb uo_fieb long ins_scid string ins_sn long ins_sendid,ins_receid string ins_sendsccode,ins_reccesccode string ins_RelatedCode end variables forward prototypes public function integer wf_retrieve (string arg_sn, ref string arg_msg) end prototypes public function integer wf_retrieve (string arg_sn, ref string arg_msg);Int rslt = 1 Long scid, TaskID String TaskCode Long Kind, sptID DateTime requiredate, moddate, opdate String Opemp, Modemp, Dscrp, Assign_Emp, relcode Long banktypeid String train, reason Long moneyid Decimal mrate String ls_sptcode,ls_sptname Long uc_row,ll_i,ll_rowcnt,ll_row Long ll_mtrlid String mtrlcode,mtrlname,mtrlmode,unit,mtrlsectype,zxmtrlmode,usermtrlmode SELECT scid, TaskID, TaskCode, kind, sptID, requiredate, Opemp, Modemp, moddate, opdate, Dscrp, Assign_Emp, relcode, banktypeid, train, reason, moneyid, mrate INTO :scid, :TaskID, :TaskCode, :Kind, :sptID, :requiredate, :Opemp, :Modemp, :moddate, :opdate, :Dscrp, :Assign_Emp, :relcode, :banktypeid, :train, :reason, :moneyid, :mrate FROM LJFIEB_tempbuyTask Where serialnum = :arg_sn Using tr_eb_sqlca; IF tr_eb_sqlca.SQLCode <> 0 THEN rslt = 0 arg_msg = '查询临时采购订单内容失败,'+tr_eb_sqlca.SQLErrText GOTO ext END IF SELECT sptcode,name INTO :ls_sptcode,:ls_sptname FROM u_spt Where sptID = :sptID Using sqlca; IF sqlca.SQLCode <> 0 THEN rslt = 0 arg_msg = '查询供应商信息失败,'+sqlca.SQLErrText GOTO ext END IF dw_uc.Reset() uc_row = dw_uc.InsertRow(0) datawindowchild childdwmx dw_uc.SetTransObject (sqlca) dw_uc.GetChild("u_buytask_banktypeid",childdwmx) childdwmx.SetTransObject (sqlca) IF childdwmx.Retrieve() = 0 THEN childdwmx.InsertRow(0) END IF datawindowchild childdwmx_m dw_uc.SetTransObject (sqlca) dw_uc.GetChild("u_buytask_moneyid",childdwmx_m) childdwmx_m.SetTransObject (sqlca) IF childdwmx_m.Retrieve() = 0 THEN childdwmx_m.InsertRow(0) END IF datawindowchild childdwmx_s dw_child.SetTransObject (sqlca) dw_child.GetChild("u_buytaskmx_storageid",childdwmx_s) childdwmx_s.SetTransObject (sqlca) IF childdwmx_s.Retrieve() = 0 THEN childdwmx_s.InsertRow(0) END IF dw_uc.Object.TaskCode[uc_row] = TaskCode dw_uc.Object.u_buytask_moneyid[uc_row] = moneyid dw_uc.Object.u_buytask_mrate[uc_row] = mrate dw_uc.Object.requiredate[uc_row] = requiredate dw_uc.Object.Assign_Emp[uc_row] = Assign_Emp dw_uc.Object.Kind[uc_row] = Kind dw_uc.Object.u_buytask_reason[uc_row] = reason dw_uc.Object.u_buytask_relcode[uc_row] = relcode dw_uc.Object.u_buytask_banktypeid[uc_row] = banktypeid dw_uc.Object.u_buytask_train[uc_row] = train dw_uc.Object.Dscrp[uc_row] = Dscrp dw_uc.Object.Opemp[uc_row] = Opemp dw_uc.Object.opdate[uc_row] = opdate dw_uc.Object.u_buytask_modemp[uc_row] = Modemp dw_uc.Object.u_buytask_moddate[uc_row] = moddate dw_uc.Object.sptcode[uc_row] = ls_sptcode dw_uc.Object.u_spt_name[uc_row] = ls_sptname Long ll_status String ls_ConfirmUser DateTime ld_ConfirmTime SELECT status,ConfirmUser,ConfirmTime INTO :ll_status,:ls_ConfirmUser,:ld_ConfirmTime FROM LJFIEB_packet Where serialnum = :ins_sn Using tr_eb_sqlca; IF tr_eb_sqlca.SQLCode <> 0 THEN rslt = 0 arg_msg = '查询通信信息失败' GOTO ext END IF IF ll_status = 5 THEN dw_uc.Object.confirmflag[uc_row] = 0 ELSE dw_uc.Object.confirmflag[uc_row] = 1 END IF dw_uc.Object.u_buytask_confirmuser[uc_row] = ls_ConfirmUser dw_uc.Object.u_buytask_confirmtime[uc_row] = ld_ConfirmTime datastore ds_mx ds_mx = Create datastore ds_mx.DataObject = 'ds_buytaskmx_receive_ljfieb' ds_mx.SetTransObject(tr_eb_sqlca) ll_rowcnt = ds_mx.Retrieve(arg_sn) IF ll_rowcnt = 0 THEN rslt = 0 arg_msg = '没有正确的明细内容' GOTO ext END IF FOR ll_i = 1 To ll_rowcnt ll_row = dw_child.InsertRow(0) dw_child.Object.mtrlid[ll_row] = ds_mx.Object.mtrlid[ll_i] dw_child.Object.u_buytaskmx_storageid[ll_row] = ds_mx.Object.storageid[ll_i] dw_child.Object.u_buytaskmx_unit[ll_row] = ds_mx.Object.unit[ll_i] dw_child.Object.u_buytaskmx_uqty[ll_row] = ds_mx.Object.uqty[ll_i] dw_child.Object.u_buytaskmx_enprice[ll_row] = ds_mx.Object.enprice[ll_i] dw_child.Object.u_buytaskmx_rebate[ll_row] = ds_mx.Object.rebate[ll_i] dw_child.Object.u_buytaskmx_uprice[ll_row] = ds_mx.Object.uprice[ll_i] dw_child.Object.u_buytaskmx_tax[ll_row] = ds_mx.Object.tax[ll_i] dw_child.Object.enprice_notax[ll_row] = ds_mx.Object.enprice[ll_i] / (1 + ds_mx.Object.tax[ll_i]) dw_child.Object.uprice_notax[ll_row] = ds_mx.Object.uprice[ll_i] / (1 + ds_mx.Object.tax[ll_i]) dw_child.Object.u_buytaskmx_requiredate[ll_row] = ds_mx.Object.requiredate[ll_i] dw_child.Object.u_buytaskmx_status[ll_row] = ds_mx.Object.status[ll_i] dw_child.Object.u_buytaskmx_woodcode[ll_row] = ds_mx.Object.woodcode[ll_i] dw_child.Object.u_buytaskmx_pcode[ll_row] = ds_mx.Object.pcode[ll_i] dw_child.Object.Dscrp[ll_row] = ds_mx.Object.Dscrp[ll_i] dw_child.Object.u_buytaskmx_rate[ll_row] = ds_mx.Object.rate[ll_i] dw_child.Object.qty[ll_row] = ds_mx.Object.qty[ll_i] dw_child.Object.u_buytaskmx_spt_uqty[ll_row] = ds_mx.Object.spt_uqty[ll_i] dw_child.Object.u_buytaskmx_spt_enprice[ll_row] = ds_mx.Object.spt_enprice[ll_i] dw_child.Object.u_buytaskmx_spt_requiredate[ll_row] = ds_mx.Object.spt_requiredate[ll_i] ll_mtrlid = ds_mx.Object.mtrlid[ll_i] SELECT mtrlcode, mtrlname, mtrlmode, unit, mtrlsectype, zxmtrlmode, usermtrlmode INTO :mtrlcode, :mtrlname, :mtrlmode, :unit, :mtrlsectype, :zxmtrlmode, :usermtrlmode FROM u_mtrldef Where mtrlid = :ll_mtrlid ; IF sqlca.SQLCode = 0 THEN dw_child.Object.u_mtrldef_mtrlcode[ll_row] = mtrlcode dw_child.Object.mtrlname[ll_row] = mtrlname dw_child.Object.u_mtrldef_mtrlmode[ll_row] = mtrlmode dw_child.Object.u_mtrldef_mtrlsectype[ll_row] = mtrlsectype dw_child.Object.u_mtrldef_zxmtrlmode[ll_row] = zxmtrlmode dw_child.Object.u_mtrldef_usermtrlmode[ll_row] = usermtrlmode END IF NEXT ext: RETURN rslt end function on w_buytask_feedback_ljfieb.create int iCurrent call super::create this.dw_uc=create dw_uc this.dw_child=create dw_child this.mle_1=create mle_1 this.st_1=create st_1 this.st_2=create st_2 this.sle_scname=create sle_scname this.st_remark=create st_remark this.cb_ok=create cb_ok this.cb_bill=create cb_bill this.ln_bar=create ln_bar this.ln_bar2=create ln_bar2 this.ln_1=create ln_1 this.ln_2=create ln_2 this.r_bar=create r_bar iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.dw_uc this.Control[iCurrent+2]=this.dw_child this.Control[iCurrent+3]=this.mle_1 this.Control[iCurrent+4]=this.st_1 this.Control[iCurrent+5]=this.st_2 this.Control[iCurrent+6]=this.sle_scname this.Control[iCurrent+7]=this.st_remark this.Control[iCurrent+8]=this.cb_ok this.Control[iCurrent+9]=this.cb_bill this.Control[iCurrent+10]=this.ln_bar this.Control[iCurrent+11]=this.ln_bar2 this.Control[iCurrent+12]=this.ln_1 this.Control[iCurrent+13]=this.ln_2 this.Control[iCurrent+14]=this.r_bar end on on w_buytask_feedback_ljfieb.destroy call super::destroy destroy(this.dw_uc) destroy(this.dw_child) destroy(this.mle_1) destroy(this.st_1) destroy(this.st_2) destroy(this.sle_scname) destroy(this.st_remark) destroy(this.cb_ok) destroy(this.cb_bill) destroy(this.ln_bar) destroy(this.ln_bar2) destroy(this.ln_1) destroy(this.ln_2) destroy(this.r_bar) end on event open;call super::open;tr_eb_sqlca = sys_email_sqlca // 电子商务连接 IF sys_email_sqlca.DBHandle() = 0 THEN MessageBox('Error','电子商务数据库连接失败,请检查') RETURN END IF uo_fieb = Create uo_ljfieb uo_fieb.commit_transaction = tr_eb_sqlca s_inscust = Message.PowerObjectParm ins_sn = s_inscust.serialnum ins_sendid = s_inscust.sendcuscommid ins_receid = s_inscust.receivecuscommid ins_sendsccode = s_inscust.sendsccode ins_reccesccode = s_inscust.receivesccode ins_RelatedCode = s_inscust.RelatedCode String ls_sccode,ls_scname String arg_msg ls_sccode = s_inscust.receivesccode SELECT scid,scname INTO :ins_scid,:ls_scname FROM u_scdef Where sccode = :ls_sccode; IF sqlca.SQLCode <> 0 THEN MessageBox('Error','查询分部信息失败,'+sqlca.SQLErrText) RETURN END IF sle_scname.Text = ls_scname st_remark.Text = '备注:'+s_inscust.remark mle_1.Text = s_inscust.postscript Long ll_status SELECT status INTO :ll_status FROM LJFIEB_packet Where serialnum = :ins_sn Using tr_eb_sqlca; IF tr_eb_sqlca.SQLCode <> 0 THEN MessageBox('Error','查询通信数据失败,'+sqlca.SQLErrText) RETURN END IF IF ll_status <> 5 THEN cb_ok.Enabled = False END IF IF wf_retrieve(ins_sn,arg_msg) = 0 THEN MessageBox('Error',arg_msg) RETURN END IF //更新对方状态-已打开 String ls_SerialNum SELECT TOP 1 NEWID() INTO :ls_SerialNum From u_user Using sqlca; IF sqlca.SQLCode <> 0 THEN RETURN END IF IF IsNull(ls_SerialNum) THEN ls_SerialNum = '' IF ls_SerialNum = '' THEN RETURN END IF IF uo_fieb.add_packet(ls_SerialNum,'',ins_receid,ins_reccesccode,ins_sendid,ins_sendsccode,5,'打开消息','','',ins_sn,'',0,arg_msg,True) = 0 THEN RETURN END IF end event event resize;call super::resize;ln_bar.endx = this.width ln_bar2.endx = this.width r_bar.width = this.width ln_1.endx = this.width ln_2.endx = this.width dw_child.width = this.WorkSpaceWidth() - 10 mle_1.width = dw_child.width - dw_uc.width - 4 dw_child.height = this.workspaceheight() - dw_child.y - 30 end event type cb_func from w_publ_base`cb_func within w_buytask_feedback_ljfieb boolean visible = false end type type cb_exit from w_publ_base`cb_exit within w_buytask_feedback_ljfieb integer x = 581 integer width = 183 integer height = 164 integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type type dw_uc from datawindow within w_buytask_feedback_ljfieb integer y = 296 integer width = 1920 integer height = 1072 integer taborder = 30 boolean bringtotop = true string title = "none" string dataobject = "dw_buytask_feedback_ljfieb" boolean livescroll = true borderstyle borderstyle = stylelowered! end type type dw_child from u_dw_rbtnfilter within w_buytask_feedback_ljfieb integer y = 1368 integer width = 3584 integer height = 888 integer taborder = 20 boolean bringtotop = true boolean titlebar = true string title = "单据明细内容" string dataobject = "dw_buytaskmx_feedback_ljfieb" boolean maxbox = true boolean hscrollbar = true boolean vscrollbar = true boolean hsplitscroll = true end type event rowfocuschanged;call super::rowfocuschanged; IF currentrow <= 0 THEN RETURN THIS.SelectRow(0,FALSE) THIS.SelectRow(currentrow,TRUE) this.setrow(currentrow) end event event clicked;call super::clicked; IF row <= 0 THEN RETURN THIS.SelectRow(0,FALSE) THIS.SelectRow(row,TRUE) this.setrow(row) end event type mle_1 from multilineedit within w_buytask_feedback_ljfieb integer x = 1929 integer y = 356 integer width = 1193 integer height = 1004 integer taborder = 40 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 boolean displayonly = true borderstyle borderstyle = stylelowered! end type type st_1 from statictext within w_buytask_feedback_ljfieb integer x = 1938 integer y = 300 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 st_2 from statictext within w_buytask_feedback_ljfieb integer x = 23 integer y = 204 integer width = 155 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 = "分部" alignment alignment = right! boolean focusrectangle = false end type type sle_scname from singlelineedit within w_buytask_feedback_ljfieb integer x = 210 integer y = 188 integer width = 443 integer height = 84 integer taborder = 30 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 boolean displayonly = true borderstyle borderstyle = stylelowered! end type type st_remark from statictext within w_buytask_feedback_ljfieb integer x = 727 integer y = 200 integer width = 2848 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_ok from uo_imflatbutton within w_buytask_feedback_ljfieb integer width = 187 integer height = 164 integer taborder = 30 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;if messagebox('询问','是否要确认本消息?',question!,yesno!) = 2 then return UPDATE LJFIEB_packet SET Complete = 1 , status = 6, ConfirmTime = getdate(), ConfirmUser = :publ_operator Where SerialNum = :ins_sn Using tr_eb_sqlca; IF tr_eb_sqlca.SQLCode <> 0 THEN ROLLBACK Using tr_eb_sqlca; MessageBox('Errr','更新通信记录状态失败,'+tr_eb_sqlca.SQLErrText) RETURN END IF commit Using tr_eb_sqlca; messagebox('系统提示','消息已确认') close(parent) end event type cb_bill from uo_imflatbutton within w_buytask_feedback_ljfieb integer x = 187 integer width = 384 integer height = 164 integer taborder = 10 boolean bringtotop = true string text = "打开采购订单" string normalpicname = "open.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;long ll_row string ls_code ll_row = dw_uc.getrow() if ll_row <= 0 then return ls_code = dw_uc.object.taskcode[ll_row] f_open_win(ins_scid,ls_code) end event type ln_bar from line within w_buytask_feedback_ljfieb long linecolor = 268435456 integer linethickness = 4 integer beginy = 172 integer endx = 3200 integer endy = 172 end type type ln_bar2 from line within w_buytask_feedback_ljfieb long linecolor = 16777215 integer linethickness = 4 integer beginx = 9 integer beginy = 176 integer endx = 3273 integer endy = 176 end type type ln_1 from line within w_buytask_feedback_ljfieb long linecolor = 268435456 integer linethickness = 4 integer beginy = 284 integer endx = 3250 integer endy = 284 end type type ln_2 from line within w_buytask_feedback_ljfieb long linecolor = 16777215 integer linethickness = 4 integer beginy = 288 integer endx = 3282 integer endy = 288 end type type r_bar from rectangle within w_buytask_feedback_ljfieb long linecolor = 16777215 integer linethickness = 4 long fillcolor = 1073741824 integer x = 3351 integer width = 87 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