cy
2022-06-23 da30b02214ab3a35a3b2ac163afce87e70a39ff4
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
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>变更基本信息</title>
</head>
 
<body>
[#include "/business/pages/include/static.html" /]
[#include "/component/newupload.html" /]
[#include "/component/DatePicker.html" /]
[#include "/component/newsel.html" /]
 
<script type="text/javascript">
$(document).ready(function() {
        $.formValidator.initConfig({formID:"myform",onError:function(msg){window.top.popupTips(msg)},onSuccess:function(){
            
                         return true;
        }});
        
        $("#name").formValidator({empty: false, onShow:"请输入变更标题!",onFocus: "请输入变更标题"}).inputValidator({min: 1,max:100, onError: "变更标题为1到50个汉字"});
        $("#descrip").formValidator({empty: false, onShow:"请输入变更说明!",onFocus: "请输入变更说明"}).inputValidator({min: 1,onError: "变更说明不能为空"});
        $("#customer_id").formValidator({empty: false, onShow:"请选择${Constants.CUSTOMERNAME}!",onFocus: "请选择${Constants.CUSTOMERNAME}"}).inputValidator({min: 1,onError: "${Constants.CUSTOMERNAME}不能为空"});
        $("#sub_customer_id").formValidator({empty: false, onShow:"请选择${Constants.SUBORDINATE_UNITS}!",onFocus: "请选择${Constants.SUBORDINATE_UNITS}"}).inputValidator({min: 1,onError: "${Constants.SUBORDINATE_UNITS}不能为空"});
        $("#project_id").formValidator({empty: false, onShow:"请选择领域!",onFocus: "请选择领域"}).inputValidator({min: 1,onError: "领域不能为空"});
        $("#serivceListId").formValidator({empty: false, onShow:"请选择服务目录!",onFocus: "服务目录不能为空"}).inputValidator({min: 1,onError: "服务目录不能为空"});
        $("#source_id").formValidator({empty: false, onShow:"请选择变更来源!",onFocus: "变更来源不能为空"}).inputValidator({min: 1,onError: "变更来源不能为空"});
        $("#risk_level_id").formValidator({empty: false, onShow:"请选择风险等级!",onFocus: "风险等级不能为空"}).inputValidator({min: 1,onError: "风险等级不能为空"});
        $("#sys_fzr").formValidator({empty: false, onShow:"请输入系统负责!",onFocus: "系统负责人不能为空"}).inputValidator({min: 1,onError: "系统负责人不能为空"});
        $("#fzr_mobile").formValidator({empty:false,onShow:"请输入负责联系方式!",onFocus:"负责联系方式不能为空!"}).inputValidator({min: 1,onError: "负责人联系方式不能为空"});
        $("#change_fzr").formValidator({empty: false, onShow:"请输入变更负责人!",onFocus: "变更负责人不能为空"}).inputValidator({min: 1,onError: "变更负责人不能为空"});
        $("#change_mobile").formValidator({empty:false,onShow:"请输入负责人联系方式!",onFocus:"负责人联系方式不能为空!"}).inputValidator({min: 1,onError: "负责人联系方式不能为空"});
        $("#contact_name").formValidator({empty: false, onShow:"请输入${Constants.CUSTOMERNAME}联系人!",onFocus: "${Constants.CUSTOMERNAME}联系人不能为空"}).inputValidator({min: 1,onError: "${Constants.CUSTOMERNAME}联系人不能为空"});
        $("#contact_phone").formValidator({empty:false,onShow:"请输入${Constants.CUSTOMERNAME}联系方式!",onFocus:"${Constants.CUSTOMERNAME}联系方式不能为空!"}).inputValidator({min: 1,onError: "${Constants.CUSTOMERNAME}联系方式不能为空"});
        $("#plan_start_time").formValidator({empty: false, onShow:"请选择计划开始时间!",onFocus: "计划开始时间不能为空"}).inputValidator({min: 1,onError: "计划开始时间不能为空"});
        $("#request_deal_time").formValidator({empty: false, onShow:"请选择期望完成时间!",onFocus: "期望完成时间不能为空"}).inputValidator({min: 1,onError: "期望完成时间不能为空"});
        $("#fxfx").formValidator({empty: false, onShow:"请输入风险分析!",onFocus: "风险分析不能为空"}).inputValidator({min: 1,onError: "风险分析不能为空"});
        $("#bgsjfw").formValidator({empty: false, onShow:"请输入变更涉及范围!",onFocus: "请输入变更涉及范围"}).inputValidator({min: 1, onError: "变更涉及范围不能为空"});
        $("#bgbz").formValidator({empty: false, onShow:"请输入变更步骤!",onFocus: "请输入变更步骤"}).inputValidator({min: 1, onError: "变更步骤不能为空"});
        $("#test_plan").formValidator({empty: false, onShow:"请输入变更测试计划!",onFocus: "请输入变更测试计划"}).inputValidator({min: 1, onError: "变更测试计划不能为空"});
        $("#back_bz").formValidator({empty: false, onShow:"请输入回退步骤和条件!",onFocus: "请输入回退步骤和条件"}).inputValidator({min: 1, onError: "回退步骤和条件不能为空"});
        $("#change_dept").formValidator({empty: false, onShow:"请输入变更需求部门!",onFocus: "请输入变更需求部门"}).inputValidator({min: 1, onError: "变更需求部门不能为空"});
        
    });
</script>
 
<div class="deal_switch_con" style="display:block;">
    <div class="deal_record_tittle"><a id="save">保存</a></div>
         <div class="fsm_left" id="fsmLeft">
        <div class="edit_title"><h3>基本信息</h3></div>
        [#if change?? && change?size>0]
            <form id="myform" action="${base}/business/pages/change/editChange.html" method="post">
            <input type="hidden" value="${change.ID}" name="id">
            <input type="hidden" value="${RequestParameters.flowId}" name="flowId">
            <table class="edit_layout">
            <tr>
                <th style="width:150px;"><label class="required">变更标题:</label></th>
                <td colspan="3">
                <input class="general maintitle" type="text" id="name" name="name" value="${change.NAME}"/>
                <div id="nameTip" style="display:inline-block;"></div>
                </td>
            </tr>
           <tr>
                <th class="postop"><label class="required">变更说明:</label></th>
                <td colspan="3"><textarea class="general" id="descrip" name="descrip">${change.DESCRIP}</textarea>
                 <div id="descripTip" style="display:inline-block;"></div>
                </td>
            </tr>
            <tr>
                 <th><label class="required">${Constants.CUSTOMERNAME}:</label></th>
                <td>
                    [@sel id="customer_id" name="customer_id"  source=customers textField="CUSTOMER_ID" valueField="CUSTOMER_NAME" labelName="customer_name"  value="${change.CUSTOMER_ID}" text="${change.CUSTOMER_NAME}" callback="changeProject"/]
                    <a class="csm_info"> </a>
                    <div id="customer_idTip" style="display:inline-block;"></div>
                </td>
                <th><label class="required">领域名称:</label></th>
                <td>
                    [@sel id="project_id" name="project_id"  source=projects textField="PROJECT_ID" valueField="PROJECT_NAME" labelName="project_name"  value="${change.PROJECT_ID}" text="${change.PROJECT_NAME}" callback="changeMsg"/]
                        <div id="project_idTip" style="display:inline-block;"></div>
                  </td>
                 
            </tr>
            <tr>
                <th><label class="required">服务目录:</label></th>
                <td>
                    <div class="icon_search">
                        <input type="text" id="serivceList" readonly name="serivceList" value="${change.FIRST_CATEGORY_NAME}-${change.SECOND_CATEGORY_NAME}-${change.THIRD_CATEGORY_NAME}" onclick="showSl();"/>
                        <input type="hidden" id="serivceListId" name="serivceListId" value="${change.FIRST_CATEGORY_ID}-${change.SECOND_CATEGORY_ID}-${change.THIRD_CATEGORY_ID}">
                        <a></a>
                    </div>
                        <div id="serivceListIdTip" style="display:inline-block;"></div>
                </td>
                <th><label>${Constants.SUBORDINATE_UNITS}:</label></th>
                <td>
                   <input  class="general" type="text" name="sub_customer_name" id="sub_customer_name" value="${change.SUB_CUSTOMER_NAME}" readOnly onclick="subCus();"/>
                   <input type="hidden" name="sub_customer_id" id="sub_customer_id" value="${change.SUB_CUSTOMER_ID}"/>
                   <div id="sub_customer_idTip" style="display:inline-block;"></div>
                   </td>
              
            </tr>
            <tr>
                <th><label class="required">变更来源:</label></th>
                <td>
                    [@sel id="source_id" name="source_id" source=froms textField="DATAKEY" valueField="DATAVALUE" labelName="source_name" value="${change.SOURCE_ID}" text="${change.SOURCE_NAME}"/]
                    
                    <div id="source_idTip" style="display:inline-block;"></div>
                </td>
                <th><label class="required">风险等级:</label></th>
                <td >
                    [@sel id="risk_level_id" name="risk_level_id" source=changePri textField="DATAKEY" valueField="DATAVALUE" labelName="risk_level_name" value="${change.RISK_LEVEL_ID}" text="${change.RISK_LEVEL_NAME}"/]
                    <div id="risk_level_idTip" style="display:inline-block;"></div>
                </td>
            </tr>
             <tr>
                
                <th><label class="required">系统负责人:</label></th>
                <td>
                    <input class="general" type="text" name="sys_fzr" id="sys_fzr" value="${change.SYS_FZR}"/>
                    <div id="sys_fzrTip" style="display:inline-block;"></div>
                </td>
                <th><label class="required">负责人联系方式:</label></th>
                <td>
                    <input class="general" type="text" name="fzr_mobile" id="fzr_mobile" value="${change.FZR_MOBILE}"/>
                    <div id="fzr_mobileTip" style="display:inline-block;"></div>
                </td>
            </tr>
            <tr>
                
                <th><label class="required">变更负责人:</label></th>
                <td>
                    <input class="general" type="text" name="change_fzr" id="change_fzr" value="${change.CHANGE_FZR}"/>
                    <div id="change_fzrTip" style="display:inline-block;"></div>
                </td>
                <th><label class="required">变更人联系方式:</label></th>
                <td>
                    <input class="general" type="text" name="change_mobile" id="change_mobile" value="${change.CHANGE_MOBILE}"/>
                    <div id="change_mobileTip" style="display:inline-block;"></div>
                </td>
            </tr>
            <tr>
                <th><label class="required">${Constants.CUSTOMERNAME}联系人:</label></th>
                <td>
                    <input class="general" type="text" name="contact_name" id="contact_name" value="${change.CONTACT_NAME}"/>
                    <div id="contact_nameTip" style="display:inline-block;"></div>
                </td>
                <th><label class="required">联系方式:</label></th>
                <td>
                    <input class="general" type="text" name="contact_phone" id="contact_phone" value="${change.CONTACT_PHONE}"/>
                    <div id="contact_phoneTip" style="display:inline-block;"></div>
                </td>
            </tr>
            <tr>
                <th><label class="required">计划开始时间:</label></th>
                <td>
                    [@datepicker id="plan_start_time" value="" class="general" value=change.PLAN_START_TIME/]<div id="plan_start_timeTip" style="display:inline-block;"></div>
                </td>
                
                 <th><label class="required">计划完成时间:</label></th>
                <td>
                    [@datepicker id="request_deal_time" value="" class="general" value=change.REQUEST_DEAL_TIME/]<div id="request_deal_timeTip" style="display:inline-block;"></div>
                </td>
            </tr>
           
             <tr>
                <th><label class="required">风险分析:</label></th>
                <td colspan="3">
                    <textarea class="general" id="fxfx" name="fxfx">${change.FXFX}</textarea>
                    <div id="fxfxTip" style="display:inline-block;"></div>
                </td>
            </tr>
            <tr>
                <th><label class="required">变更涉及范围:</label></th>
                <td colspan="3">
                    <textarea class="general" id="bgsjfw" name="bgsjfw">${change.BGSJFW}</textarea>
                    <div id="bgsjfwTip" style="display:inline-block;"></div>
                </td>
            </tr>
            <tr>
                <th><label class="required">变更步骤:</label></th>
                <td colspan="3">
                    <textarea class="general" id="bgbz" name="bgbz">${change.BGBZ}</textarea>
                    <div id="bgbzTip" style="display:inline-block;"></div>
                </td>
            </tr>
            <tr>
                <th><label class="required">测试计划及测试步骤:</label></th>
                <td colspan="3">
                    <textarea class="general" id="test_plan" name="test_plan">${change.TEST_PLAN}</textarea>
                    <div id="test_planTip" style="display:inline-block;"></div>
                </td>
            </tr>
            <tr>
                <th><label class="required">回退步骤和回退条件:</label></th>
                <td colspan="3">
                    <textarea class="general" id="back_bz" name="back_bz">${change.BACK_BZ}</textarea>
                    <div id="back_bzTip" style="display:inline-block;"></div>
                </td>
            </tr>
             <tr>
                <th><label class="required">变更需求部门:</label></th>
                <td colspan="3">
                    <textarea class="general" id="change_dept" name="change_dept">${change.CHANGE_DEPT}</textarea>
                    <div id="change_deptTip" style="display:inline-block;"></div>
                </td>
            </tr>
            <tr>
                <th><label >备注说明:</label></th>
                <td colspan="3">
                    <textarea class="general" id="note" name="note">${change.NOTE}</textarea>
                    <div id="noteTip" style="display:inline-block;"></div>
                </td>
            </tr>
        </table>
        </form>
        [/#if]
    </div>
</div>
 
 
<script type="text/javascript">
 
function subCus() {
        var customer_id = $("#customer_id").val();
        if($.util.isEmpty(customer_id)) {
            popupTips("请先选择${Constants.CUSTOMERNAME}");
            return;
        }
        
        var sub_customer_id = $("#sub_customer_id").val();
        
        var url = "${base}/business/pages/servicelist/slaproject/subCus.html?type=1&customerId="+customer_id+"&subCustomerId="+sub_customer_id;
        window.top.openDialog("selectSubCus","操作",
                             {},
                             {"width":80,"height":80},
                             [{btnId:"btnSure", btnName:"确定", btnStyle:"bluebtn"}],url);
}
 
 
function showCus(labelId,labelName) {
    $("#sub_customer_name").val(labelName);
    $("#sub_customer_id").val(labelId);
}
function showName(labelId,labelName) {
    $("#serivceList").val(labelName);
    $("#serivceListId").val(labelId);
}
 
function showSl() {
        var project_id = $("#project_id").val();
        if($.util.isEmpty(project_id)) {
            popupTips("请先选择领域");
            return;
        }
        var customer_id = $("#customer_id").val();
        if($.util.isEmpty(customer_id)) {
            popupTips("请先选择${Constants.CUSTOMERNAME}");
            return;
        }
        var serivceList = $("#serivceList").val();
        var serivceListId = $("#serivceListId").val();
        var url = "${base}/business/pages/servicelist/slaproject/serviceListTree.html?type=1&customerId="+customer_id+"&projectId="+project_id;
        if(!$.util.isEmpty(serivceList)&&!$.util.isEmpty(serivceListId)) {
            var names = serivceList.split("-");
            var ids = serivceListId.split("-");
            if(ids.length==3) {
                url += "&sl="+ids[2];
            }
        }
        
        window.top.openDialog("selectSl","操作",
                             {},
                             {"width":80,"height":80},
                             [{btnId:"btnSure", btnName:"确定", btnStyle:"bluebtn"}],url);
    }
    
    function changeProject(customerId,customerName) {
    $("#sub_customer_id").val(customerId);
    $("#sub_customer_name").val(customerName);
    $.post("${base}/business/pages/servicelist/slaproject/queryProByCusId.html",{"customerId":customerId},function(data,textStatus) {
        var optionHtml = "<option value=''>请选择</option>";
        $.each(data,function(i,item) {
            optionHtml += "<option value='"+item.PROJECT_ID+"'>"+item.PROJECT_NAME+"</option>";
        })
        $('#project_id').html(optionHtml);
        changeMsg();
        
    },"json")
}
 
function changeMsg() {
    $("#serivceListId,#serivceList").val("");
}
 
 
 
$(function() {
    $("#save").click(function() {
        $("#myform").submit();
    });
})
 
</script>
</body>
</html>