cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <title>分配人员</title>
    <!--(start) public flies-->
[#include "/business/pages/include/static.html" /]
[#include "/component/newupload.html" /]
[#include "/component/HtmlEditor.html" /]
    <script type="text/javascript">
        $(document).ready(function () {
            $.formValidator.initConfig({
                formID: "fpform", onError: function (msg) {
                    popupTips(msg)
                }, onSuccess: function () {
                    if (!(window.top.openConfirm("确定要提交吗?"))) {
                        return false;
                    }
                    document.getElementById("fpform").target = window.top.openDialog("5", "操作",
                            {},
                            {"width": 40, "height": 40, "noclose": true},
                            [{btnId: "tipBtnSure", btnName: "确定", btnStyle: "bluebtn"}]);
                    return true;
                }
            });
        [#if curnodeId ==  Constants.BGSL ]
            $("#type").formValidator({empty: false, onShow: "请选择变更类型!", onFocus: "变更类型不能为空"}).inputValidator({
                min: 1,
                onError: "变更类型不能为空"
            });
            window.top.hideDialog('0');
        [/#if]
        });
 
 
    </script>
</head>
 
<body class="personnel_allocation_body">
 
<form id="fpform" action="${base}/business/pages/change/saveusersAssign.html" method="post">
    <input type="hidden" id="flowId" name="flowId" value="${RequestParameters.flowId}"/>
    <input type="hidden" name="is_notice" value="2"/>
    <input type="hidden" name="curnodeId" value="${curnodeId}"/>
    <div class="end_task">
    <table class="pab_con" style="margin:0 auto;">
        [#if curnodeId ==  Constants.BGSH ]
 
        <tr class="pabtdcon">
            <td style="border:0;text-align:left;padding-top:10px;" colspan="2">
                <label class="required" style="line-height:18px;">实施结果:</label>
                <input style="float:left;" checked name="resolve" type="radio" value="1" id="success"/><span style="display:block;float:left;color:#333;line-height:18px;">实施成功</span>
                <input style="float:left;margin-left:10px;" name="resolve" type="radio" value="2" id="fail"/><span style="display:block;float:left;color:#333;line-height:18px;">实施失败</span>
            </td>
        </tr>
 
        <tr class="pabtdcon">
            <td style="border:0;text-align:left;padding-top:10px;" colspan="2">
                <label class="required">实施步骤:</label>
 
                <textarea class="general"  name="result" id="result"></textarea>
            </td>
        </tr>
 
        [#--<tr class="pabtdcon">
            <td style="border:0;text-align:left;padding-top:10px;" colspan="2">
                <label class="required">实际工时:</label><input type="text" name="hours" id="hours" class="general maintitle">小时
            </td>
        </tr>--]
 
        <tr >
            <td style="border:0;padding-bottom:2px;" colspan="2">&nbsp;
            </td>
         </tr>
        [/#if]
 
        [#if curnodeId ==  Constants.BGHG]
        <tr class="pabtdcon">
            <td width="20%;" style="background:#f2f2f2;"><label><em class="xing" style="font-size:16px;color:#f00;margin-right:4px;">*</em>下一环节</label><input type="hidden" name="dealer" id="dealer" value=""></td>
            <td style="text-align:left;">
                <input class="pos" name="node" type="radio" value="${Constants.BGSQ}" checked/><span>变更发起</span>
                <input class="pos" name="node" type="radio" value="${Constants.BGSH}"/><span>变更执行</span>
            </td>
        </tr>
        [#else]
        <tr class="pabtdcon">
            <td width="20%;" style="background:#f2f2f2;"><label class=""><em class="xing" style="font-size:16px;color:#f00;margin-right:4px;">*</em>下一环节</label><input type="hidden" name="dealer" id="dealer" value=""></td>
            <td style="text-align:left;">
                <input class="pos" name="node" type="radio" value="${nodeMap.nodeId}" checked/><span>${nodeMap.nodeName}</span>
            </td>
        </tr>
        [/#if]
 
        <tr>
            <td style="background:#f2f2f2;"><label ><em class="xing" style="font-size:16px;color:#f00;margin-right:6px;">*</em>处理人</label></td>
            <td style="text-align:left;">
                [#if nodeMap.userId==""&&curnodeId !=  Constants.BGHG]
                <input type="button" onclick="xz('${projectId}')" value="选择处理人"/><br/>
                [/#if]
                <span id="users" style="color:#333;">分派人员:<em>${nodeMap.userName}</em></span>
                <input type="hidden" id="alluserid" name="alluserid" value="[#if nodeMap.userId??&&nodeMap.userId!=""]${nodeMap.userId}-${nodeMap.userName}-1[/#if]"/>
                <input type="hidden" name="type" id="type" value="3"/>
                <input type="hidden" name="curnodeId" id="curnodeId" value="${curnodeId}"/>
            </td>
        </tr>
 
        <tr>
            <td class="greybg"><label style="background:none;">流转备注</label></td>
            <td     style="padding:0;padding:10px 0;">
                <textarea class="general" style="width:95%;height:100px;border:0;" id="bz" name="bz"></textarea>
            </td>
        </tr>
    </table>
        </div>
 
</form>
<script type="text/javascript">
    //选择处理人
    function xz(project_id) {
        var url = "${base}/business/pages/question/xzry.html?project_id=" + project_id + "&nodeArg=" + '${nodeArg}'+"&flag=0";
        [#if nodeMap.nodeId==Constants.CCBSP||nodeMap.nodeId==Constants.BGSH]
        url = "${base}/business/pages/question/xzryMore.html?project_id=" + project_id + "&nodeArg=" + '${nodeArg}'+"&flag=0";
        [/#if]
        window.top.openDialog("3", "人员分派",
                {},
                {"width": 60, "height": 80},
                [{btnId: "btnSure", btnName: "选择", btnStyle: "bluebtn"}],
                url);
    }
 
 
    function getDealer(dealer,showChecked,isAdmin){
        [#if nodeMap.nodeId==Constants.CCBSP||nodeMap.nodeId==Constants.BGSH]
            var splitIsAdmin = isAdmin.split("-");
            $("#users>em").empty();
//            $("#users>em").append("("+splitIsAdmin[1]+","+splitIsAdmin[2]+"(主负责人)"+showChecked+")");
            $("#users>em").append("("+showChecked+")");
            var tempstr = splitIsAdmin[0] + "-" + splitIsAdmin[1];
            dealer = dealer.replace(tempstr, tempstr + "-1");
            $("#alluserid").val(dealer);
            window.top.hideDialog("3");
        [#else]
            var ary = dealer.split("-");
            $("#users>em").empty();
            $("#users>em").append("("+ary[1]+")");
            $("#alluserid").val(dealer+"-1");
            window.top.hideDialog("3");
        [/#if]
    }
 
    /**
     * 获取所选环节执行人
     */
    function getSelNodeUser() {
        var nodeTemplateId = $(":radio[name=node]:checked").val();
        var flowId = $("#flowId").val();
        $.post("${base}/business/pages/change/getSelNodeUser.html",{"nodeTemplateId":nodeTemplateId,"flowId":flowId},function (data) {
            $("#users>em").empty();
            $("#users>em").append("("+data.current_dealer_name+")");
            $("#alluserid").val(data.current_dealer_id+"-"+data.current_dealer_name+"-1");
        },'json');
    }
 
 
    $(function () {
        /*$(".iscg").click(function () {
            if ($("#success").attr("checked")) {
                $("#changeresult").html("实施步骤:");
            }
            if ($("#fail").attr("checked")) {
                $("#changeresult").html("回退步骤:");
            }
        });*/
 
        //结果审核回退环节绑定事件
        [#if curnodeId ==  Constants.BGHG]
            getSelNodeUser();
            $(":radio[name=node]").change(function () {
                getSelNodeUser();
            })
        [/#if]
    });
 
    var projectId = '${projectId}';
    var serivceListId = '${RequestParameters.serivceListId}';
    var curnodeId = '${curnodeId}';
    function selectDealer() {
        window.top.openDialog("dealer", "选择处理人",
                {},
                {"width": 70, "height": 70},
                [{
                    btnId: "btnSure",
                    btnName: "提交",
                    btnStyle: "bluebtn"
                }], "${base}/business/pages/question/selectTab.html?projectId=" + projectId);
 
    }
 
    function selectUser(type, alluserid, allusername) {
        $("#users").empty();
        if (type == 2) {
            $("#users").append("分派到组:(" + allusername + ")");
        } else {
            $("#users").append("分派人员:(" + allusername + ")");
        }
        $("#alluserid").val(alluserid);
        $("#type").val(type);
    }
 
    function onDialogBtnClick(btnID, dialogID, config) {
        if (btnID == "tipBtnSure") {
            var alluser = $("#alluserid").val();
            if ($.util.isEmpty(alluser)) {
                popupTips("请选择处理人");
                return;
            }
            if($("#result").length>0){
                var result = $("#result").val();
                if ($.util.isEmpty(result)) {
                    popupTips("请填写实施步骤");
                    return;
                }
            }
 
            if($("#hours").length>0){
                var hours = $("#hours").val();
                if ($.util.isEmpty(hours)) {
                    popupTips("请填写实际工时");
                    return;
                }
                if(isNaN(hours)){
                    popupTips("实际工时工时格式不正确");
                    return;
                }
            }
 
            $("#fpform").submit();
 
        }
    }
 
    function releaseorder() {
 
        if ($.util.isEmpty(projectId)) {
            popupTips("请先选择领域");
            return;
        }
 
        var releaseorder = $("#showrelease_order").val();
        window.top.openDialog("0", "发布工单",
                {},
                {"width": 80, "height": 80},
                [{btnId: "btnSure", btnName: "选择", btnStyle: "bluebtn"}],
                "${base}/business/pages/change/linkfbOrder.html?projectId=" + projectId + "&releaseorder=" + releaseorder);
    }
 
    function showLinkfbOrder(flowid, ordercode) {
        $("#showrelease_order").val(ordercode);
        $("#release_order").val(flowid);
    }
</script>
 
</body>
</html>