$PBExportHeader$w_saletask_audit.srw forward global type w_saletask_audit from w_publ_base end type type dw_1 from datawindow within w_saletask_audit end type type cb_audit from uo_imflatbutton within w_saletask_audit end type type tab_1 from uo_task_detail within w_saletask_audit end type type tab_1 from uo_task_detail within w_saletask_audit end type type cb_back from uo_imflatbutton within w_saletask_audit end type type cb_confirm from uo_imflatbutton within w_saletask_audit end type type cb_back_1 from uo_imflatbutton within w_saletask_audit end type type cb_save from uo_imflatbutton within w_saletask_audit end type end forward global type w_saletask_audit from w_publ_base integer width = 2793 integer height = 2024 string title = "询价订单" boolean minbox = false windowtype windowtype = response! dw_1 dw_1 cb_audit cb_audit tab_1 tab_1 cb_back cb_back cb_confirm cb_confirm cb_back_1 cb_back_1 cb_save cb_save end type global w_saletask_audit w_saletask_audit type variables long ins_confirm = 0 end variables forward prototypes public subroutine wf_face () public subroutine wf_save () end prototypes public subroutine wf_face ();// 按当前状态显示可操作按钮 cb_back.Visible = False cb_confirm.Visible = False cb_audit.Visible = False cb_back_1.Visible = False cb_back_1.X = cb_back.X cb_save.Visible = False cb_save.X = cb_audit.X cb_back.Text = '询价确认' IF dw_1.Object.status[1] = 1 Or dw_1.Object.status[1] = 8 THEN IF dw_1.Object.ifexcelerr[1] = 0 THEN cb_audit.Visible = True ELSE cb_back.Visible = True cb_back.Text = '重新询价' END IF ELSEIF dw_1.Object.status[1] = 4 THEN cb_confirm.Visible = True ELSEIF dw_1.Object.status[1] = 2 THEN IF dw_1.Object.ifexcelerr[1] = 1 THEN cb_back.Visible = True END IF cb_save.Visible = True ELSEIF dw_1.Object.status[1] = 6 THEN cb_back.Visible = True cb_save.Visible = True ELSEIF dw_1.Object.status[1] = 0 THEN cb_back_1.Visible = True END IF end subroutine public subroutine wf_save ();long row = 1 dw_1.AcceptText() oleobject task task = AppCom.CreatePbDictionary() task.SetString("token", app_token) task.SetInt("taskid", dw_1.Object.taskid[row]) task.SetString("cus_rep", dw_1.Object.cus_rep[row]) task.SetString("cus_tele", dw_1.Object.cus_tele[row]) task.SetString("cus_address", dw_1.Object.cus_address[row]) task.SetString("freight", dw_1.Object.freight[row]) task.SetString("freight_tele", dw_1.Object.freight_tele[row]) task.SetString("buyer_name", dw_1.Object.buyer_name[row]) task.SetString("buyer_tele", dw_1.Object.buyer_tele[row]) task.SetDateTime("requiredate", dw_1.Object.requiredate[row]) task.SetString("temp1", dw_1.Object.temp1[row]) task.SetString("temp2", dw_1.Object.temp2[row]) task.SetString("temp3", dw_1.Object.temp3[row]) task.SetString("temp4", dw_1.Object.temp4[row]) task.SetString("temp5", dw_1.Object.temp5[row]) task.SetString("temp6", dw_1.Object.temp6[row]) task.SetInt('confirm', ins_confirm) string arg_msg = '' AppCom.SaveTask(task, Ref arg_msg) if arg_msg <> '' then MessageBox('ERROR', arg_msg) RETURN end if close(this) end subroutine on w_saletask_audit.create int iCurrent call super::create this.dw_1=create dw_1 this.cb_audit=create cb_audit this.tab_1=create tab_1 this.cb_back=create cb_back this.cb_confirm=create cb_confirm this.cb_back_1=create cb_back_1 this.cb_save=create cb_save iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.dw_1 this.Control[iCurrent+2]=this.cb_audit this.Control[iCurrent+3]=this.tab_1 this.Control[iCurrent+4]=this.cb_back this.Control[iCurrent+5]=this.cb_confirm this.Control[iCurrent+6]=this.cb_back_1 this.Control[iCurrent+7]=this.cb_save end on on w_saletask_audit.destroy call super::destroy destroy(this.dw_1) destroy(this.cb_audit) destroy(this.tab_1) destroy(this.cb_back) destroy(this.cb_confirm) destroy(this.cb_back_1) destroy(this.cb_save) 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.GetInt('status')) dw_1.SetItem(row, 'fstatus', lo_dict.GetInt('fstatus')) dw_1.SetItem(row, 'ifexcelerr', lo_dict.GetInt('ifexcelerr')) 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', '') tab_1.uof_retrieve(lo_dict.GetInt('taskid')) wf_face() //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_saletask_audit boolean visible = false integer x = 23 integer y = 892 end type type cb_exit from w_publ_base`cb_exit within w_saletask_audit integer x = 2437 integer y = 1828 end type type dw_1 from datawindow within w_saletask_audit integer width = 2770 integer height = 1348 integer taborder = 10 boolean bringtotop = true string title = "none" string dataobject = "dw_saletask_audit" boolean livescroll = true borderstyle borderstyle = stylelowered! end type type cb_audit from uo_imflatbutton within w_saletask_audit integer x = 2048 integer y = 1828 integer width = 370 integer taborder = 20 boolean bringtotop = true string text = "审核" string normalpicname = "ok.bmp" end type event clicked;call super::clicked;oleobject parms IF MessageBox('提问', '是否审核当前订单?', Question!, YesNO!, 1) <> 1 THEN RETURN parms = AppCom.CreatePbDictionary() parms.SetString('token', app_token) parms.SetInt('taskid', dw_1.Object.taskid[1]) String arg_msg = '' AppCom.TaskAudit(parms, Ref arg_msg) IF arg_msg <> '' THEN MessageBox('ERROR', arg_msg) RETURN END IF MessageBox('OK', '订单审核成功') Close(Parent) end event type tab_1 from uo_task_detail within w_saletask_audit integer y = 1356 integer width = 2766 integer height = 456 integer taborder = 30 boolean bringtotop = true end type event constructor;call super::constructor;this.tabpage_3.visible = false this.tabpage_4.visible = false this.tabpage_5.visible = false end event event ue_fjchanged;call super::ue_fjchanged;parent.dw_1.Object.ifexcelerr[parent.dw_1.GetRow()] = 1 wf_face() end event type cb_back from uo_imflatbutton within w_saletask_audit integer x = 146 integer y = 1828 integer width = 416 integer taborder = 30 boolean bringtotop = true string text = "询价确认" string normalpicname = "ok.bmp" end type event clicked;call super::clicked;IF dw_1.Object.status[1] = 2 Or dw_1.Object.status[1] = 6 THEN ins_confirm = 1 wf_save() RETURN END IF // DONE: 重新询价 If (dw_1.Object.status[1] = 1 Or dw_1.Object.status[1] = 8) And dw_1.Object.ifexcelerr[1] = 1 THEN oleobject parms IF MessageBox('提问', '是否重新询价当前订单?', Question!, YesNO!, 1) <> 1 THEN RETURN parms = AppCom.CreatePbDictionary() parms.SetString('token', app_token) parms.SetInt('taskid', dw_1.Object.taskid[1]) String arg_msg = '' AppCom.TaskReturn(parms, Ref arg_msg) IF arg_msg <> '' THEN MessageBox('ERROR', arg_msg) RETURN END IF MessageBox('OK', '重新询价成功') Close(Parent) END IF end event type cb_confirm from uo_imflatbutton within w_saletask_audit integer x = 581 integer y = 1828 integer width = 416 integer taborder = 40 boolean bringtotop = true string text = "收货确认" string normalpicname = "ok.bmp" end type event clicked;call super::clicked;// DONE: 收货确认 oleobject parms IF MessageBox('提问', '是否收货确认当前订单?', Question!, YesNO!, 1) <> 1 THEN RETURN parms = AppCom.CreatePbDictionary() parms.SetString('token', app_token) parms.SetInt('taskid', dw_1.Object.taskid[1]) String arg_msg = '' AppCom.FinishTask(parms, Ref arg_msg) IF arg_msg <> '' THEN MessageBox('ERROR', arg_msg) RETURN END IF MessageBox('OK', '收货确认成功') Close(Parent) end event type cb_back_1 from uo_imflatbutton within w_saletask_audit integer x = 1015 integer y = 1828 integer width = 416 integer taborder = 40 boolean bringtotop = true string text = "撤回" string normalpicname = "UNDO.bmp" end type event clicked;call super::clicked;// DONE: 重新询价 oleobject parms IF MessageBox('提问', '是否要撤回当前订单?', Question!, YesNO!, 1) <> 1 THEN RETURN parms = AppCom.CreatePbDictionary() parms.SetString('token', app_token) parms.SetInt('taskid', dw_1.Object.taskid[1]) parms.SetString('price_emp', app_username) parms.SetString('replydscrp', '店面撤回') String arg_msg = '' AppCom.TaskTH(parms, Ref arg_msg) IF arg_msg <> '' THEN MessageBox('ERROR', arg_msg) RETURN END IF dw_1.Object.status[1] = 2 dw_1.Object.ifexcelerr[1] = 0 dw_1.Object.price_emp[1] = app_username dw_1.Object.replydscrp[1] = '店面撤回' dw_1.Object.replydate[1] = DateTime(Today(), Now()) wf_face() MessageBox('OK', '订单撤回成功') end event type cb_save from uo_imflatbutton within w_saletask_audit integer x = 1600 integer y = 1828 integer width = 370 integer taborder = 30 boolean bringtotop = true string text = "保存" string normalpicname = "save.bmp" end type event clicked;call super::clicked;ins_confirm = 0 wf_save() end event