$PBExportHeader$w_cd_saletask_bj.srw forward global type w_cd_saletask_bj from w_publ_base end type type dw_1 from datawindow within w_cd_saletask_bj end type type cb_1 from uo_imflatbutton within w_cd_saletask_bj end type type dw_2 from datawindow within w_cd_saletask_bj end type type cb_2 from uo_imflatbutton within w_cd_saletask_bj end type end forward global type w_cd_saletask_bj from w_publ_base integer width = 2793 integer height = 1872 string title = "询价订单" boolean minbox = false windowtype windowtype = response! dw_1 dw_1 cb_1 cb_1 dw_2 dw_2 cb_2 cb_2 end type global w_cd_saletask_bj w_cd_saletask_bj type variables end variables on w_cd_saletask_bj.create int iCurrent call super::create this.dw_1=create dw_1 this.cb_1=create cb_1 this.dw_2=create dw_2 this.cb_2=create cb_2 iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.dw_1 this.Control[iCurrent+2]=this.cb_1 this.Control[iCurrent+3]=this.dw_2 this.Control[iCurrent+4]=this.cb_2 end on on w_cd_saletask_bj.destroy call super::destroy destroy(this.dw_1) destroy(this.cb_1) destroy(this.dw_2) destroy(this.cb_2) end on event open;call super::open;// DONE: 显示待报价订单信息 oleobject lo_dict lo_dict = Message.PowerObjectParm Long row row = dw_1.InsertRow(0) dw_1.SetItem(row, 'taskid', lo_dict.GetInt('taskid')) dw_1.SetItem(row, 'tid', lo_dict.GetString('tid')) dw_1.SetItem(row, 'taskdate', lo_dict.GetDateTime('taskdate')) dw_1.SetItem(row, 'cusid', lo_dict.GetInt('cusid')) dw_1.SetItem(row, 'cus_rep', lo_dict.GetString('cus_rep')) dw_1.SetItem(row, 'cus_tele', lo_dict.GetString('cus_tele')) dw_1.SetItem(row, 'cus_address', lo_dict.GetString('cus_address')) dw_1.SetItem(row, 'freight', lo_dict.GetString('freight')) dw_1.SetItem(row, 'freight_tele', lo_dict.GetString('freight_tele')) dw_1.SetItem(row, 'opemp', lo_dict.GetString('opemp')) dw_1.SetItem(row, 'opdate', lo_dict.GetDateTime('opdate')) dw_1.SetItem(row, 'modemp', lo_dict.GetString('modemp')) dw_1.SetItem(row, 'moddate', lo_dict.GetDateTime('moddate')) dw_1.SetItem(row, 'buyer_name', lo_dict.GetString('buyer_name')) dw_1.SetItem(row, 'buyer_tele', lo_dict.GetString('buyer_tele')) dw_1.SetItem(row, 'requiredate', lo_dict.GetDateTime('requiredate')) dw_1.SetItem(row, 'temp1', lo_dict.GetString('temp1')) dw_1.SetItem(row, 'temp2', lo_dict.GetString('temp2')) dw_1.SetItem(row, 'temp3', lo_dict.GetString('temp3')) dw_1.SetItem(row, 'temp4', lo_dict.GetString('temp4')) dw_1.SetItem(row, 'temp5', lo_dict.GetString('temp5')) dw_1.SetItem(row, 'temp6', lo_dict.GetString('temp6')) dw_1.SetItem(row, 'confirmemp', lo_dict.GetString('confirmemp')) dw_1.SetItem(row, 'confirmdate', lo_dict.GetDateTime('confirmdate')) dw_1.SetItem(row, 'status', lo_dict.GetString('status')) dw_1.SetItem(row, 'taskcode', lo_dict.GetString('taskcode')) dw_1.SetItem(row, 'outwarecode', lo_dict.GetString('outwarecode')) dw_1.SetItem(row, 'cuscode', lo_dict.GetString('cuscode')) dw_1.SetItem(row, 'cusname', lo_dict.GetString('cusname')) dw_1.SetItem(row, 'price_emp', publ_operator) dw_1.SetItem(row, 'replyrqdate', lo_dict.GetDateTime('requiredate')) dw_1.SetItem(row, 'replydscrp', '') string arg_msg = '' oleobject parms, lo_rslt, lo_item parms = AppCom.CreatePbDictionary() parms.SetString('token', app_token) parms.SetInt('taskid', lo_dict.GetInt('taskid')) lo_rslt = AppCom.GetTaskFJs(parms, ref arg_msg) if arg_msg <> '' then MessageBox('ERROR', arg_msg) return end if long ll_cnt, i ll_cnt = lo_rslt.Count dw_2.SetRedraw(false) for i = 1 to ll_cnt lo_item = lo_rslt.GetItem(i - 1) row = dw_2.InsertRow(0) dw_2.SetItem(row, 'taskid', lo_item.GetInt('taskid')) dw_2.SetItem(row, 'printid', lo_item.GetInt('printid')) dw_2.SetItem(row, 'mxcode', lo_item.GetString('mxcode')) dw_2.SetItem(row, 'price_ls', lo_item.GetDouble('price_ls')) dw_2.SetItem(row, 'price_jm', lo_item.GetDouble('price_jm')) dw_2.SetItem(row, 'mtrltype', lo_item.GetString('mtrltype')) dw_2.SetItem(row, 'fjname', lo_item.GetString('fjname')) dw_2.SetItem(row, 'fjdscrp', lo_item.GetString('fjdscrp')) next dw_2.SetRedraw(true) end event type cb_func from w_publ_base`cb_func within w_cd_saletask_bj boolean visible = false integer x = 23 integer y = 892 end type type cb_exit from w_publ_base`cb_exit within w_cd_saletask_bj integer x = 2437 integer y = 1660 end type type dw_1 from datawindow within w_cd_saletask_bj integer width = 2770 integer height = 1640 integer taborder = 10 boolean bringtotop = true string title = "none" string dataobject = "dw_cd_saletask_bj" boolean livescroll = true borderstyle borderstyle = stylelowered! end type type cb_1 from uo_imflatbutton within w_cd_saletask_bj integer x = 2048 integer y = 1660 integer width = 370 integer taborder = 20 boolean bringtotop = true string text = "报价" string normalpicname = "ok.bmp" end type event clicked;call super::clicked;dw_1.AcceptText() dw_2.AcceptText() Long i FOR i = 1 To dw_2.RowCount() IF dw_2.Object.price_jm[i] <= 0 THEN MessageBox('提示', '明细报价必须为正数') dw_2.SetRow(i) dw_2.SetFocus() RETURN END IF NEXT oleobject parms parms = AppCom.CreatePbDictionary() parms.SetString('token', app_token) parms.SetInt('taskid', dw_1.Object.taskid[1]) parms.SetString('price_emp', publ_operator) parms.SetDateTime('replyrqdate', dw_1.Object.replyrqdate[1]) parms.SetString('replydscrp', dw_1.Object.replydscrp[1]) oleobject fj, fjs fjs = AppCom.CreArrOfPbDictionary() for i = 1 to dw_2.RowCount() fj = AppCom.CreatePbDictionary() fj.SetInt('printid', dw_2.Object.printid[i]) fj.SetDouble('price_jm', dw_2.Object.price_jm[i]) fjs.Add(fj) next parms.SetObject('fjs', fjs) string arg_msg = '' AppCom.TaskBJ(parms, ref arg_msg) if arg_msg <> '' then MessageBox('ERROR', arg_msg) return end if MessageBox('OK', '订单报价成功') close(parent) end event type dw_2 from datawindow within w_cd_saletask_bj integer x = 23 integer y = 672 integer width = 2670 integer height = 308 integer taborder = 20 boolean bringtotop = true string title = "none" string dataobject = "dw_cd_saletask_bj_fj" boolean hscrollbar = true boolean vscrollbar = true boolean livescroll = true borderstyle borderstyle = stylelowered! end type type cb_2 from uo_imflatbutton within w_cd_saletask_bj integer x = 219 integer y = 1660 integer width = 370 integer taborder = 30 boolean bringtotop = true string text = "退回" string normalpicname = "UNDO.bmp" end type event clicked;call super::clicked;dw_1.AcceptText() dw_2.AcceptText() oleobject parms parms = AppCom.CreatePbDictionary() parms.SetString('token', app_token) parms.SetInt('taskid', dw_1.Object.taskid[1]) parms.SetString('price_emp', publ_operator) parms.SetString('replydscrp', dw_1.Object.replydscrp[1]) string arg_msg = '' AppCom.TaskTH(parms, ref arg_msg) if arg_msg <> '' then MessageBox('ERROR', arg_msg) return end if MessageBox('OK', '订单退回成功') close(parent) end event