(一)sql 如下(請自己調整)(待辦 + 經辦 ) ms_sql = "SELECT DISTINCT a.flow_desc,c.username,b.form_present_ct,b.UPDATE_DATE,b.UPDATE_TIME,b.SEND TO_KIND,b.SENDTO_KIND,c.GROUPID,d.GROUPNAME,b.D_STEP_ID,b.STATUS,a.LISTID ,a.UPDATE_DATE,a.UPDATE_TIME,a.FORM_PRESENTATION,a.WEBFORM_NAME from sys_todohis a, sys_todolist b, users c, GROUPS d WHERE a.listid = b.listid and b.applicant = c.userid and c.GROUPID *= d.GROUPID and a.status = 'NF' and b.status <> 'NF' "; 模仿待辦事項開啟單據內容(dataform)(重點是要有三個欄位 LISTID,FORM_PRESENTATION,WEBFORM_NAME) function wf_open() { var selectedRow = $(dataGridView).datagrid('getSelected'); var urlPrdfix = ""; var urlParam = "?"; var flowtype = "flowtodo"; selectedRow.FLNAVMODE = 6; selectedRow.NAVMODE = 0; selectedRow.NAVIGATOR_MODE = 0; flowtype = "flowtohis"; for (var field in selectedRow) { if (field == 'PARAMETERS') { if (selectedRow[field]) { urlParam += '&' + selectedRow[field]; } } else if (field != 'REMARK') { urlParam += "&" + field + "=" + encodeURI(selectedRow[field]); } } if (selectedRow.WEBFORM_NAME != null) { var url = ''; if (selectedRow.WEBFORM_NAME.toUpperCase().indexOf('WEB.') == 0) { var webform = selectedRow.WEBFORM_NAME.split('.'); url = "InnerPages/EEPSingleSignOn.aspx" + urlParam + "&Type=" + flowtype + "&Package=" + webform[1] + "&Form=" + webform[2]; } else { url = selectedRow.WEBFORM_NAME.replace(".", "/") + ".aspx" + urlParam; } self.parent.addTab('', url); } };