You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

219 lines
9.8 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<link href="../../../../DataUser/Style/ccbpm.css" rel="stylesheet" type="text/css" />
<link href="../../../Scripts/easyUI145/themes/icon.css" rel="stylesheet" type="text/css" />
<link href="../../../Scripts/easyUI145/themes/default/easyui.css" rel="stylesheet" type="text/css" />
<script src="../../../Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="../../../Scripts/easyUI/jquery.easyui.min.js" type="text/javascript"></script>
<script src="../../../Scripts/QueryString.js" type="text/javascript"></script>
<script type="text/javascript" src="../../../Scripts/config.js"></script>
<script type="text/javascript" src="../../../Comm/Gener.js"></script>
<script src="DDLBar.js" type="text/javascript"></script>
<script src="../../CCFlowEnum.js" type="text/javascript"></script>
<script src="../../../Scripts/EasyUIUtility.js" type="text/javascript"></script>
<script src="../../../Scripts/vue.js"></script>
<!-- 自己的系统风格统一. -->
<link href="../../../Style/skin/adminfont/iconfont.css" rel="stylesheet" />
<link href="../../../Style/skin/css/Default.css" rel="stylesheet" />
<!-- 自己的系统风格统一end -->
</head>
<body>
<div id="App">
<!--<model-component></model-component>-->
<div id="bar">
</div>
<fieldset>
<legend>人员身份规则</legend>
<ul>
<li style="list-style:none">
<input type="radio" value="0" id="SF_0" v-model="SF" checked="checked" /> <label style="font-weight:bolder" for="SF_0"> 当前人员的身份(默认)</label>
<ol class="olText">
<li>说明:就是上一步发送作为当前节点的人员身份。 </li>
</ol>
<input type="radio" value="1" id="SF_1" v-model="SF" /> <label style="font-weight:bolder" for="SF_1"> 指定节点的人员身份</label>
<ol class="olText">
<li> 说明:指定节点发送人的作为当前节点的人员身份。 </li>
<li>
请选择节点:
<select id="DDL_Nodes" v-model="node">
<option v-for="option in nodes" :value="option.NodeID">{{option.Name}}</option>
</select>
</li>
</ol>
<input type="radio" value="2" id="SF_2" v-model="SF" /> <label style="font-weight:bolder" for="SF_2"> 按表单字段作为人员身份(该字段里存储的是账号)</label>
<ol class="olText">
<li> 说明:指定表单字段作为人员编号作为当前节点的人员身份,比如:我替别人请假,请假人字段作为人员身份。 </li>
<li>
请选择字段:
<select id="DDL_Fields" v-model="field">
<option v-for="option in fields" :value="option.KeyOfEn">{{option.Name}}</option>
</select>
</li>
</ol>
</li>
</ul>
</fieldset>
<fieldset>
<legend>绑定岗位</legend>
<ul>
<li><a href="javascript:OpenDot2DotStations();">绑定岗位-分组模式</a> </li>
<li><a href="javascript:OpenBranchesAndLeafStations();">绑定岗位-左右树结构模式</a> </li>
</ul>
</fieldset>
<fieldset>
<legend>已经绑定的岗位</legend>
<div id="stas">
<ul>
<li v-show="stas.length===0">未设置</li>
<template v-for="sta in stas">
<li v-show="sta.FK_StationText!=undefined"> <img src="../../../Img/Author.gif" /> {{sta.FK_StationText}}</li>
</template>
</ul>
</div>
</fieldset>
<fieldset>
<legend>找人算法</legend>
<ul>
<li>第0步首先从本级部门内的人员寻找该节点绑定的岗位如果找不到人就进入下一步寻找。 </li>
<li>第1步直线上级寻找一直查询到根节点如果找不到人就进入下一步寻找。 </li>
<li>第2步直线上级的平级部门寻找一直查询到根节点如果找不到人就进入下一步寻找。 </li>
<li>第3步当前部门的下一级所有的部门寻找。</li>
<li>第4步查找全局岗位人员。</li>
</ul>
</fieldset>
<fieldset>
<legend>什么是人员身份?</legend>
<ul>
<li> 就是按照那个人员来计算当前节点的接受人规则,默认是谁操作的按照谁的身份计算。 </li>
<li> 比如:我要请假,找部门负责人,就按照当前操作员的身份计算。 </li>
<li> 有的环境下并不是按照当前人员计算。 </li>
<li> 比如:我要为别人请假,找部门负责人,要按照指定的字段(该字段就是被请假人员的账号)作为人员身份。 </li>
</ul>
</fieldset>
</div>
<script type="text/javascript">
var Baseinfo = new Vue({
el: '#App',
data: {
adminModel: 1,
orgModel: 0,
stas: [],
nodes: [],//指定节点
fields: [],//指定的字段
SF: 0,
node: "",
field: "",
webuser: null,
deliverWay: SelectorModel.ByStationAI
},
methods: {
OpenDot2DotStations: function () {
OpenDot2DotStations();
Save();
},
OpenNew: function () {
var nodeID = GetQueryString("FK_Node");
var url = "../../../Comm/RefFunc/BranchesAndLeaf.htm?EnName=BP.WF.Template.NodeSheet&Dot2DotEnsName=BP.WF.Template.NodeStations&Dot2DotEnName=BP.WF.Template.NodeStation&AttrOfOneInMM=FK_Node&AttrOfMInMM=FK_Station&EnsOfM=BP.Port.Stations&DefaultGroupAttrKey=FK_StationType&NodeID=" + nodeID + "&PKVal=" + nodeID;
OpenEasyUiDialogExtCloseFunc(url, '设置岗位', 800, 500, function () {
Baseinfo.stas = getStas();
Save();
});
},
SetGroupStations: function () {
OpenNodStationGroup(this.webuser.GroupNo);
},
SetOrgStations: function () {
OpenNodStationGroup(this.webuser.OrgNo);
}
},
created() {
InitBar(SelectorModel.ByStationAI);
this.stas = getStas();
var nodeID = GetQueryString("FK_Node");
var node = new Entity("BP.WF.Node", nodeID);
var flowNo = node.FK_Flow;
//绑定节点s
var nodes = new Entities("BP.WF.Nodes");
nodes.Retrieve("FK_Flow", flowNo);
this.nodes = $.grep(nodes, function (obj, i) {
return obj.NodeID != undefined
});
//绑定字段s
var flowID = parseInt(flowNo);
var ens = new Entities("BP.Sys.MapAttrs");
if (ens.FormType == 11)
ens.Retrieve("FK_MapData", node.NodeFrmID);
else
ens.Retrieve("FK_MapData", "ND" + flowID + "Rpt");
this.fields = $.grep(ens, function (obj, i) {
return obj.MyPK != undefined
});
//设置选择的Model.
this.SF = node.GetPara("ShenFenModel");
this.SF = this.SF == null || this.SF == undefined || this.SF == "" ? 0 : this.SF;
this.node = node.GetPara("ShenFenVal");
this.field = node.GetPara("ShenFenVal");
//根据用户的信息,判断是否启用那个设置工具。
this.webuser = new WebUser();
this.adminModel = this.webuser.No == "admin" ? 1 : 0;
this.orgModel = this.webuser.No == "admin" ? 0 : 1;
}
});
function OpenNodStationGroup(orgNo) {
var url = "NodeStationGroup.htm?OrgNo=" + orgNo + "&FK_Node=" + GetQueryString("FK_Node");
OpenEasyUiDialogExtCloseFunc(url, '绑定岗位', 500, 600, function () {
Baseinfo.stas = getStas();
});
}
//保存
function Save() {
var nodeID = GetQueryString("FK_Node");
//先保存节点.
var node = new Entity("BP.WF.Template.NodeExt", nodeID);
node.DeliveryWay = 4;
if (Baseinfo.SF == 1) {
node.SetPara("ShenFenVal", Baseinfo.node);
}
//如果按照字段.
if (Baseinfo.SF == 2) {
node.SetPara("ShenFenVal", Baseinfo.field);
}
node.SetPara("ShenFenModel", Baseinfo.SF);
node.DeliveryWay = 4;
node.Update();
//保存选择模式.
var selecter = new Entity("BP.WF.Template.Selector", nodeID);
selecter.SelectorModel = SelectorModel.ByStationAI;// Baseinfo.deliverWay;
selecter.Update();
alert("保存成功");
Reload();
//window.history.back();
}
</script>
</body>
</html>