監(jiān)理公司管理系統(tǒng) | 工程企業(yè)管理系統(tǒng) | OA系統(tǒng) | ERP系統(tǒng) | 造價咨詢管理系統(tǒng) | 工程設計管理系統(tǒng) | 甲方項目管理系統(tǒng) | 簽約案例 | 客戶案例 | 在線試用
X 關閉
OA辦公協同系統(tǒng)

當前位置:工程項目OA系統(tǒng) > OA軟件營銷 > OA辦公協同系統(tǒng)

協同OA軟件HTML流程運用

申請免費試用、咨詢電話:400-8352-114

第九部分 泛普免費OA軟件Html模式的流程應用
一. 泛普OA軟件破解版接口說明
流程的html模式,允許用戶自己寫js代碼,來對流程表單的數據進行操作
二. OA軟件應用案例
1) 綁定表單字段,這個是為html模式流程開發(fā)的基礎
要綁定一個事件,首先要找到的是字段的id,其實就是對應的html控件的id。
找這個id是比較容易的,我們有下面3種方式來找到控件的id
i. 通過ie的工具查找,ie8在工具的菜單下面有個開發(fā)人員工具,如下圖:
我要查找請假天數這個字段的id
 
可以看到字段的id為field10146。
同事我們還可以看到請假天數的span 的id為field10146span。
ii. 從表單上看,如下圖
 
一樣可以看到字段的id為10146??丶膇d就為field10146。
iii. 從html模板里面查看,如下圖
 
我們一樣可以看到字段的id為10146。
綁定事件
綁定事件可以通過jquery來實現,jquery綁定事件非常簡單。
代碼如下:
 
<script language="javascript">
//綁定主字段
//文本框、瀏覽框、使用propertychange事件綁定
//下拉框使用change事件綁定
//check框不能通過值來判斷,需要通過check框的checked屬性來判斷當前check框是否被選中了,綁定事件可以用click
//主字段命名規(guī)則,field+字段的id,如field10146 10146為字段的id
jQuery(document).ready(function(){
 
//文本框、瀏覽框
jQuery("#field10146").bind("propertychange",function(){
bindfield10146();
});
 
//下拉框
jQuery("#field10147").bind("change",function(){
alert("請假類型:"+jQuery("#field10147").val());
});
 
//check框
jQuery("#field10161").bind("click",function(){
alert("check框:"+jQuery("#field10161").attr("checked"));
});
 
//如果一進入頁面就需要執(zhí)行某件事,比如下面獲得check框是否被選中
//alert("check框:"+jQuery("#field10161").attr("checked"));
 
});
 
function bindfield10146(){
alert("請假天數:"+jQuery("#field10146").val());
}
 
//綁定明細字段
jQuery(document).ready(function(){
//綁定已經存在的數據
//綁定明細表1,indexnum0 代表當前有多少行明細,包括刪除的明細數據
//如果需要綁定明細表2,則需要把indexnum0改成indexnum1,明細表3,indexnum2,后面的類推
//明細字段的命名規(guī)則為field+字段的id+"_"+明細數據的行號
//field10150_0 字段id為10150 行號為0代辦第一行
if(jQuery("#indexnum0").length>0){//判斷該字段是否存在
var indexnum0 = jQuery("#indexnum0").val() * 1.0;
for(var index=0;index<indexnum0;index++){
//綁定核算部門字段
jQuery("#field10150_"+index).bind("propertychange",function(){
alert(this.value);
});
}
}
 
//動態(tài)綁定添加行的里面的字段,當前添加的行,行號等于明細表行數的值 - 1
//也就是indexnum0的值 - 1
jQuery("#indexnum0").bind("propertychange",function(){
var indexnum0 = this.value * 1.0 - 1;
//綁定核算部門字段
jQuery("#field10150_"+indexnum0).bind("propertychange",function(){
alert(this.value);
});
});
});
</script>
 
 
 
 
2) 泛普OA管理系統(tǒng)html 模板 之多tab頁應用
這個功能實現其實很簡單,就是在html模板里面,把流程的主字段table、明細表table分別使用div框起來,然后給div加上不同的id。然后再在頁面上添加幾個點擊(onclick)事件,分別來隱藏或者顯示不同的div里面的內容,就可以達到多tab頁的效果了。
例子如下:
流程頁面有3個明細表
 
 
我們加4個div來實現點擊上面主表數據,明細表1,明細2,明細表3來顯示不同的內容,也就是對流程頁面的數據進行拆分。
 
 
整個html頁面的代碼如下:
<p>
<link rel="STYLESHEET" type="text/css" href="/css/泛普OA系統(tǒng).css" />
<style type="text/css">
<!-- tab頁的樣式-->
span{
cursor:pointer;
font-size:12px;
}
#tab {width:398px;height:34px;border:1px #cfedff solid;border-bottom:0;}
#tab ul{margin:0;padding:0;}
#tab li{list-style:none;float:left;padding:0 30px;height:34px;line-height:34px;text-align:center;border-right:1px #ebf7ff solid;cursor:pointer;}
#tab li.now{color:#5299c4;background:#fff;font-weight:bold;}</style>
</p>
<table class="ViewForm">
    <tbody>
        <tr>
            <td><br />
            <div align="center"><font style="font-size: 14pt; font-weight: bold">html 模板 多tab頁</font></div>
<!-- 下面這部分為增加的代碼,用來顯示添加的onclick時間,類似導航欄。start-->
            <div style="margin: 10px; width: 500px; color: #666; font-size: 12px" id="tab">
            <ul>
                <li id="maintable" class="now" onclick="htmlChangeTab(this,'maindata')">主表數據</li>
                <li id="detailtable1" onclick="htmlChangeTab(this,'detaildata1')">明細表1</li>
                <li id="detailtable2" onclick="htmlChangeTab(this,'detaildata2')">明細表2</li>
                <li id="detailtable3" onclick="htmlChangeTab(this,'detaildata3')">明細表3</li>
            </ul>
            </div>
<!-- 上面這部分為增加的代碼,用來顯示添加的onclick時間,類似導航欄。end-->
 
<!-- 主表數據加上 div-->
            <div id="maindata">
            <table class="ViewForm">
                <colgroup><col width="10%"></col><col width="40%"></col><col width="10%"></col><col width="40%"></col></colgroup>
                <tbody>
                    <tr class="Spacing">
                        <td style="font-size: 0pt" class="Line1" colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td><input id="$label10139$" class="Label" name="label10139" value="申請人" type="text" /></td>
                        <td class="field"><input id="$field10139$" class="InputStyle" name="field10139" value="[可編輯]申請人" type="text" /></td>
                        <td><input id="$label10140$" class="Label" name="label10140" value="申請人部門" type="text" /></td>
                        <td class="field"><input id="$field10140$" class="InputStyle" name="field10140" value="[可編輯]申請人部門" type="text" /></td>
                    </tr>
                    <tr>
                        <td style="font-size: 0pt" class="Line2" colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td><input id="$label10141$" class="Label" name="label10141" value="申請人分部" type="text" /></td>
                        <td class="field"><input id="$field10141$" class="InputStyle" name="field10141" value="[可編輯]申請人分部" type="text" /></td>
                        <td><input id="$label10147$" class="Label" name="label10147" value="請假類型" type="text" /></td>
                        <td class="field"><input id="$field10147$" class="InputStyle" name="field10147" value="[可編輯]請假類型" type="text" /></td>
                    </tr>
                    <tr>
                        <td style="font-size: 0pt" class="Line2" colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td><input id="$label10142$" class="Label" name="label10142" value="請假開始日期" type="text" /></td>
                        <td class="field"><input id="$field10142$" class="InputStyle" name="field10142" value="[可編輯]請假開始日期" type="text" /></td>
                        <td><input id="$label10143$" class="Label" name="label10143" value="請假開始時間" type="text" /></td>
                        <td class="field"><input id="$field10143$" class="InputStyle" name="field10143" value="[可編輯]請假開始時間" type="text" /></td>
                    </tr>
                    <tr>
                        <td style="font-size: 0pt" class="Line2" colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td><input id="$label10144$" class="Label" name="label10144" value="請假結束日期" type="text" /></td>
                        <td class="field"><input id="$field10144$" class="InputStyle" name="field10144" value="[可編輯]請假結束日期" type="text" /></td>
                        <td><input id="$label10145$" class="Label" name="label10145" value="請假結束時間" type="text" /></td>
                        <td class="field"><input id="$field10145$" class="InputStyle" name="field10145" value="[可編輯]請假結束時間" type="text" /></td>
                    </tr>
                    <tr>
                        <td style="font-size: 0pt" class="Line2" colspan="4">&nbsp;</td>
                    </tr>
                    <tr>
                        <td><input id="$label10146$" class="Label" name="label10146" value="請假天數" type="text" /></td>
                        <td class="field"><input id="$field10146$" class="InputStyle" name="field10146" value="[只讀]請假天數" type="text" /></td>
                        <td><input id="$label10148$" class="Label" name="label10148" value="請假歷史記錄" type="text" /></td>
                        <td class="field"><input id="$field10148$" class="InputStyle" name="field10148" value="[只讀]請假歷史記錄" type="text" /></td>
                    </tr>
                    <tr>
                        <td style="font-size: 0pt" class="Line2" colspan="4">&nbsp;</td>
                    </tr>
                </tbody>
            </table>
            </div>
<!-- 明細表1數據加上 div-->
            <div style="display: none" id="detaildata1">
            <table style="width: 100%; word-wrap: break-word; left: 0px" id="table0button" class="form" name="table0button">
                <tbody>
                    <tr>
                        <td style="font-size: 0pt" height="15" colspan="2">&nbsp;</td>
                    </tr>
                    <tr>
                        <td align="left">&nbsp;</td>
                        <td align="right">
                        <div id="div0button"><button accesskey="A" id="$addbutton0$" class="BtnFlow" name="addbutton0" onclick="addRow0(0)"><u>A</u>-添加</button><button accesskey="E" id="$delbutton0$" class="BtnFlow" name="delbutton0" onclick="deleteRow0(0);"><u>E</u>-刪除</button></div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                        <table style="width: 100%" id="oTable0" class="ListStyle" name="oTable0">
                            <colgroup><col width="20%"></col><col width="20%"></col><col width="20%"></col><col width="20%"></col><col width="20%"></col></colgroup>
                            <tbody>
                                <tr class="header">
                                    <td nowrap="nowrap" align="center"><input id="$label10149$" class="Label" name="label10149" value="人員核算" type="text" /></td>
                                    <td nowrap="nowrap" align="center"><input id="$label10150$" class="Label" name="label10150" value="部門核算" type="text" /></td>
                                    <td nowrap="nowrap" align="center"><input id="$label10151$" class="Label" name="label10151" value="項目核算" type="text" /></td>
                                    <td nowrap="nowrap" align="center"><input id="$label10152$" class="Label" name="label10152" value="客戶核算" type="text" /></td>
                                    <td nowrap="nowrap" align="center"><input id="$label10153$" class="Label" name="label10153" value="金額" type="text" /></td>
                                </tr>
                                <tr>
                                    <td style="background-color: #e7e7e7"><input id="$field10149$" class="InputStyle" name="field10149" value="[可編輯]人員核算" type="text" /></td>
                                    <td style="background-color: #e7e7e7"><input id="$field10150$" class="InputStyle" name="field10150" value="[可編輯]部門核算" type="text" /></td>
                                    <td style="background-color: #e7e7e7"><input id="$field10151$" class="InputStyle" name="field10151" value="[可編輯]項目核算" type="text" /></td>
                                    <td style="background-color: #e7e7e7"><input id="$field10152$" class="InputStyle" name="field10152" value="[可編輯]客戶核算" type="text" /></td>
                                    <td style="background-color: #e7e7e7"><input id="$field10153$" class="InputStyle" name="field10153" value="[可編輯]金額" type="text" /></td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>
            </div>
<!-- 明細表2數據加上 div-->
            <div style="display: none" id="detaildata2">
            <table style="width: 100%; word-wrap: break-word; left: 0px" id="table1button" class="form" name="table1button">
                <tbody>
                    <tr>
                        <td style="font-size: 0pt" height="15" colspan="2">&nbsp;</td>
                    </tr>
                    <tr>
                        <td align="left">&nbsp;</td>
                        <td align="right">
                        <div id="div1button"><button accesskey="A" id="$addbutton1$" class="BtnFlow" name="addbutton1" onclick="addRow1(1)"><u>A</u>-添加</button><button accesskey="E" id="$delbutton1$" class="BtnFlow" name="delbutton1" onclick="deleteRow1(1);"><u>E</u>-刪除</button></div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                        <table style="width: 100%" id="oTable1" class="ListStyle" name="oTable1">
                            <colgroup><col width="25%"></col><col width="25%"></col><col width="25%"></col><col width="25%"></col></colgroup>
                            <tbody>
                                <tr class="header">
                                    <td nowrap="nowrap" align="center"><input id="$label10154$" class="Label" name="label10154" value="e1" type="text" /></td>
                                    <td nowrap="nowrap" align="center"><input id="$label10155$" class="Label" name="label10155" value="e2" type="text" /></td>
                                    <td nowrap="nowrap" align="center"><input id="$label10156$" class="Label" name="label10156" value="e3" type="text" /></td>
                                    <td nowrap="nowrap" align="center"><input id="$label10157$" class="Label" name="label10157" value="e4" type="text" /></td>
                                </tr>
                                <tr>
                                    <td style="background-color: #e7e7e7"><input id="$field10154$" class="InputStyle" name="field10154" value="[可編輯]e1" type="text" /></td>
                                    <td style="background-color: #e7e7e7"><input id="$field10155$" class="InputStyle" name="field10155" value="[可編輯]e2" type="text" /></td>
                                    <td style="background-color: #e7e7e7"><input id="$field10156$" class="InputStyle" name="field10156" value="[可編輯]e3" type="text" /></td>
                                    <td style="background-color: #e7e7e7"><input id="$field10157$" class="InputStyle" name="field10157" value="[可編輯]e4" type="text" /></td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>
            </div>
<!-- 明細表3數據加上 div-->
            <div style="display: none" id="detaildata3">
            <table style="width: 100%; word-wrap: break-word; left: 0px" id="table2button" class="form" name="table2button">
                <tbody>
                    <tr>
                        <td style="font-size: 0pt" height="15" colspan="2">&nbsp;</td>
                    </tr>
                    <tr>
                        <td align="left">&nbsp;</td>
                        <td align="right">
                        <div id="div2button"><button accesskey="A" id="$addbutton2$" class="BtnFlow" name="addbutton2" onclick="addRow2(2)"><u>A</u>-添加</button><button accesskey="E" id="$delbutton2$" class="BtnFlow" name="delbutton2" onclick="deleteRow2(2);"><u>E</u>-刪除</button></div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                        <table style="width: 100%" id="oTable2" class="ListStyle" name="oTable2">
                            <colgroup><col width="34%"></col><col width="33%"></col><col width="33%"></col></colgroup>
                            <tbody>
                                <tr class="header">
                                    <td nowrap="nowrap" align="center"><input id="$label10158$" class="Label" name="label10158" value="f1" type="text" /></td>
                                    <td nowrap="nowrap" align="center"><input id="$label10159$" class="Label" name="label10159" value="f2" type="text" /></td>
                                    <td nowrap="nowrap" align="center"><input id="$label10160$" class="Label" name="label10160" value="f3" type="text" /></td>
                                </tr>
                                <tr>
                                    <td style="background-color: #e7e7e7"><input id="$field10158$" class="InputStyle" name="field10158" value="[可編輯]f1" type="text" /></td>
                                    <td style="background-color: #e7e7e7"><input id="$field10159$" class="InputStyle" name="field10159" value="[可編輯]f2" type="text" /></td>
                                    <td style="background-color: #e7e7e7"><input id="$field10160$" class="InputStyle" name="field10160" value="[可編輯]f3" type="text" /></td>
                                </tr>
                            </tbody>
                        </table>
                        </td>
                    </tr>
                </tbody>
            </table>
            </div>
            </td>
        </tr>
    </tbody>
</table>
<!-- 下面這部分用來實現tab頁切換的js代碼-->
<script language="javascript">
function htmlChangeTab(obj,tabid){
jQuery("#maindata").hide();//隱藏主表數據
jQuery("#detaildata1").hide();//隱藏明細表1數據
jQuery("#detaildata2").hide();//隱藏明細表2數據
jQuery("#detaildata3").hide();//隱藏明細表3數據
 
jQuery("#"+tabid).show();//顯示點擊的tab頁數據
 
jQuery("li").removeClass("now");//刪除tab頁樣式
jQuery("#"+obj.id).addClass("now");//給當前點擊的tab頁加上樣式
}
 
</script>
 
效果圖如下:
 
 
 
3) 泛普OA平臺綜合應用
下面這個例子將的是,根據頁面上科目的值,到異構系統(tǒng)去查詢該科目有哪些賦值核算項,然后再在頁面上添加出對應的輔助核算字段讓客戶填寫。
大家先看下實現的效果圖:
 
實現該功能的步驟如下:
實現改功能建議大家使用我們流程的自定義頁面來寫所需要的代碼。因為寫自定義頁面,我們除了可以寫js代碼外,還能寫java代碼,這樣實現該功能就簡單化了。
第一步,先通過綁定事件對科目進行綁定,添加一個監(jiān)聽事件
第二步,添加的監(jiān)聽事件,當發(fā)現科目的值被修改時,則通過ajax去訪問異構系統(tǒng),查詢對應的表,獲得當前科目有哪些輔助核算項。
第三步,獲得了當前科目有哪些輔助核算項之后,大家需要自己去寫出button的按鈕(這部分可以結合視頻一起觀看,容易理解些)。這個button按鈕的內容其實就是要跟我們正常點添加明細行生成出來的button按鈕一樣。這樣做的一個好處是,我們不需要自己再去寫后臺保存輔助核算項的數據。
這個具體的實現,大家可以觀看視頻,我們下面把實現該接口用到代碼和文檔建附件(巨人通力demo.rar)。
 
發(fā)布:2006-04-22 15:14    編輯:泛普軟件 · admin    [打印此頁]    [關閉]

相關欄目

泛普OA系統(tǒng)推廣 OA智能一體化 OA選型 OA制度 OA應用 OA推薦 OA移動 OA銷售 有哪些OA 好用的OA OA怎么樣 OA哪家好 OA是什么 OA好處 OA作用 OA使用 OA優(yōu)點 OA特點 OA廠商 OA代理 OA系統(tǒng)對比 OA試用 免費OA OA報價 OA多少錢 OA注冊 簡單的OA OA網站 OA技術 OA維護 OA集成 OA介紹 手機辦公app 在線OA OA與ERP 辦公室OA OA企業(yè)單位 OA集團公司 OA表單 OA模塊 OA辦公系統(tǒng) OA功能 即時通訊 OA辦公軟件 OA問題 辦公管理 OA登陸 泛普OA市場分析 OA辦公系統(tǒng)哪個好 泛普OA系統(tǒng)演示 OA軟件招投標 泛普OA軟件案例 泛普代理商 國內OA辦公系統(tǒng)品牌排名 泛普OA軟件價格 云OA軟件及OA租賃 OA網絡營銷推廣 OA軟件人員招聘 OA辦公協同系統(tǒng) OA辦公自動化 OA辦公系統(tǒng)是什么 OA軟件知識