|
@@ -823,9 +823,8 @@
|
|
|
<div class="layui-item layui-col-sm6 lw7">
|
|
|
<label class="layui-form-label"><span class="require-item">*</span>项目负责人:</label>
|
|
|
<div class="layui-input-block with-icon">
|
|
|
- <form:input path="createBy.name" htmlEscape="false" readonly="true" class="form-control layui-input"/>
|
|
|
-<%-- <sys:inquireselectUser id="master" name="projectLeaders" value="${ruralProjectRecords.leaderIds}" labelName="leaderNameStr" labelValue="${ruralProjectRecords.leaderNameStr}"--%>
|
|
|
-<%-- title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>--%>
|
|
|
+ <sys:inquireselectUser id="master" name="projectLeaders" value="${ruralProjectRecords.leaderIds}" labelName="leaderNameStr" labelValue="${ruralProjectRecords.leaderNameStr}"
|
|
|
+ title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="layui-item layui-col-sm6 lw7">
|
|
@@ -989,8 +988,8 @@
|
|
|
</div>
|
|
|
<div id="addUserButton" class="layui-item nav-btns" style="float: left;">
|
|
|
<a id="aButton" href="javascript:void(0)"
|
|
|
- onclick="openBill2('新增客户管理', '${ctx}/workclientinfo/workClientInfo/form?param=2','95%','95%',false,'inputForm')"
|
|
|
- class="nav-btn nav-btn-add"><i class="fa fa-plus"></i> 新增客户</a>
|
|
|
+ onclick="openBill2('新增委托方管理', '${ctx}/workclientinfo/workClientInfo/form?param=2&jobTypeShow=1','95%','95%',false,'inputForm')"
|
|
|
+ class="nav-btn nav-btn-add"><i class="fa fa-plus"></i> 新增委托方信息</a>
|
|
|
</div>
|
|
|
|
|
|
<div class="layui-item layui-col-xs12 form-table-container" style="padding:0px">
|
|
@@ -1051,9 +1050,14 @@
|
|
|
|
|
|
<div class="form-group layui-row">
|
|
|
<div class="form-group-label"><h2>施工方信息</h2></div>
|
|
|
- <div class="layui-item nav-btns">
|
|
|
- <sys:gridselectClientLink url="${ctx}/workclientinfo/workClientInfo/clientInfolist" id="constructionOrgList" title="选择施工单位"
|
|
|
- cssClass="form-control required" fieldLabels="${fns:urlEncode('客户编号')}" fieldKeys="name" searchLabel="${fns:urlEncode('客户名称')}" searchKey="name"></sys:gridselectClientLink>
|
|
|
+ <div class="layui-item nav-btns" style="float: left;width: 155px">
|
|
|
+ <sys:gridselectConstruction url="${ctx}/workclientinfo/workClientInfo/clientInfolist" id="constructionOrgList" title="选择施工单位"
|
|
|
+ cssClass="form-control required" fieldLabels="${fns:urlEncode('客户编号')}" fieldKeys="name" searchLabel="${fns:urlEncode('客户名称')}" searchKey="name"></sys:gridselectConstruction>
|
|
|
+ </div>
|
|
|
+ <div class="layui-item nav-btns" >
|
|
|
+ <a href="javascript:void(0)"
|
|
|
+ onclick="openBill3('新增施工方信息', '${ctx}/workclientinfo/workClientInfo/form?param=2&jobTypeShow=3','95%','95%',false,'inputForm')"
|
|
|
+ class="nav-btn nav-btn-add"><i class="fa fa-plus"></i> 新增施工方信息</a>
|
|
|
</div>
|
|
|
<div class="layui-item layui-col-xs12 form-table-container">
|
|
|
<table id="contentTable2" class="table table-bordered table-condensed details">
|
|
@@ -1073,22 +1077,24 @@
|
|
|
<script type="text/template" id="workConstructionLinkmanTpl">//<!--
|
|
|
<tr id="workConstructionLinkmanList{{idx}}">
|
|
|
<td class="hide">
|
|
|
- <input id="workConstructionLinkmanList{{idx}}_id" name="workConstructionLinkmanList[{{idx}}].id" type="hidden" value="{{row.id}}" class="linkmanId"/>
|
|
|
- <input id="workConstructionLinkmanList{{idx}}_delFlag" name="workConstructionLinkmanList[{{idx}}].delFlag" type="hidden" value="0"/>
|
|
|
- </td>
|
|
|
- <td style="text-align: center">
|
|
|
- <input id="workConstructionLinkmanList{{idx}}_cid" name = "workConstructionLinkmanList[{{idx}}].clientId.id" type="hidden" value="{{row.clientId.id}}"/>
|
|
|
- {{row.clientId.name}}
|
|
|
- </td>
|
|
|
- <td style="text-align: center">
|
|
|
- {{row.name }}
|
|
|
- </td>
|
|
|
- <td style="text-align: center">
|
|
|
- {{row.linkPhone}}
|
|
|
- </td>
|
|
|
- <td style="text-align: center">
|
|
|
- {{row.linkMobile}}
|
|
|
+ <input id="workConstructionLinkmanList{{idx}}_id" name="workConstructionLinkmanList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
|
|
|
+ <input id="workConstructionLinkmanList{{idx}}_clientId_id" name="workConstructionLinkmanList[{{idx}}].clientId.id" type="hidden" value="{{row.clientId.id}}"/>
|
|
|
+ <input id="workConstructionLinkmanList{{idx}}_delFlag" name="workConstructionLinkmanList[{{idx}}].delFlag" type="hidden" value="0"/>
|
|
|
</td>
|
|
|
+ <td>
|
|
|
+ <input <input style="background-color: #FFFFFF;" readonly="true" id="workConstructionLinkmanList{{idx}}_clientName" name="workConstructionLinkmanList[{{idx}}].clientId.name" type="text" value="{{row.clientId.name}}" class="form-control "/>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input <input style="background-color: #FFFFFF;" readonly="true" id="workConstructionLinkmanList{{idx}}_name" name="workConstructionLinkmanList[{{idx}}].name" type="text" value="{{row.name}}" class="form-control required"/>
|
|
|
+ </td>
|
|
|
+
|
|
|
+ <td>
|
|
|
+ <input <input style="background-color: #FFFFFF;" readonly="true" id="workConstructionLinkmanList{{idx}}_linkPhone" name="workConstructionLinkmanList[{{idx}}].linkPhone" type="text" value="{{row.linkPhone}}" class="form-control isTel"/>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input <input style="background-color: #FFFFFF;" readonly="true" id="workConstructionLinkmanList{{idx}}_linkMobile" name="workConstructionLinkmanList[{{idx}}].linkMobile" type="text" value="{{row.linkMobile}}" class="form-control isPhone"/>
|
|
|
+ </td>
|
|
|
+
|
|
|
<td class="text-center" width="10">
|
|
|
{{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#workConstructionLinkmanList{{idx}}')" title="删除"><i class="fa fa-trash"></i> 删除</span>{{/delBtn}}
|
|
|
</td>
|
|
@@ -1255,5 +1261,88 @@
|
|
|
</form:form>
|
|
|
</div>
|
|
|
</div>
|
|
|
+<script>
|
|
|
+ function openBill3(title,url,width,height,target,formId){
|
|
|
+
|
|
|
+ var frameIndex = parent.layer.getFrameIndex(window.name);
|
|
|
+ var urls = url+"&index="+frameIndex;
|
|
|
+ if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
|
|
|
+ width='auto';
|
|
|
+ height='auto';
|
|
|
+ }else{//如果是PC端,根据用户设置的width和height显示。
|
|
|
+
|
|
|
+ }
|
|
|
+ top.layer.open({
|
|
|
+ type: 2,
|
|
|
+ area: [width, height],
|
|
|
+ title: title,
|
|
|
+ skin:"two-btns",
|
|
|
+ maxmin: false, //开启最大化最小化按钮
|
|
|
+ content: urls ,
|
|
|
+ btn: ['确定','关闭'],
|
|
|
+ yes: function(index, layero){
|
|
|
+ var body = top.layer.getChildFrame('body', index);
|
|
|
+ var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
|
|
+ var inputForm = body.find('#inputForm');
|
|
|
+ var top_iframe;
|
|
|
+ if(target){
|
|
|
+ top_iframe = target;//如果指定了iframe,则在改frame中跳转
|
|
|
+ }else{
|
|
|
+ top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
|
|
|
+ }
|
|
|
+ inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
+ inputForm.attr("action","${ctx}/ruralProject/ruralProjectRecords/linkManSave");//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
+ var $document = iframeWin.contentWindow.document;
|
|
|
+
|
|
|
+ formSubmit3($document,formId,index);
|
|
|
+ },
|
|
|
+ cancel: function(index){
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ function formSubmit3($document,inputForm,index){
|
|
|
+ var validateForm = $($document.getElementById(inputForm)).validate({
|
|
|
+ submitHandler: function(form){
|
|
|
+ loading('正在提交,请稍等...');
|
|
|
+ form.submit();
|
|
|
+ },
|
|
|
+ errorContainer: "#messageBox",
|
|
|
+ errorPlacement: function(error, element) {
|
|
|
+ $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
|
|
|
+ if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
|
|
|
+ error.appendTo(element.parent().parent());
|
|
|
+ } else {
|
|
|
+ error.insertAfter(element);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if(validateForm.form()){
|
|
|
+ $($document.getElementById(inputForm)).ajaxSubmit({
|
|
|
+ success:function(data) {
|
|
|
+ var d = data;
|
|
|
+ if(d.msg == "false"){
|
|
|
+ parent.layer.msg("保存客户信息异常!",{icon:2});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ addRow("#workConstructionLinkmanList",workConstructionLinkmanRowIdx,workConstructionLinkmanTpl);
|
|
|
+ workConstructionLinkmanRowIdx=workConstructionLinkmanRowIdx+1;
|
|
|
+ var row = workClientLinkmanRowIdx;
|
|
|
+
|
|
|
+ $("#"+"workConstructionLinkmanList"+row+"_id").val(d.id);
|
|
|
+ $("#"+"workConstructionLinkmanList"+row+"_clientId_id").val(d.clientId);
|
|
|
+ $("#"+"workConstructionLinkmanList"+row+"_clientName").val(d.clientName);
|
|
|
+ $("#"+"workConstructionLinkmanList"+row+"_name").val(d.linkName);
|
|
|
+ $("#"+"workConstructionLinkmanList"+row+"_linkMobile").val(d.linkMobile);
|
|
|
+ $("#"+"workConstructionLinkmanList"+row+"_linkPhone").val(d.linkPhone);
|
|
|
+ parent.layer.msg(d.str,{icon:1});
|
|
|
+ top.layer.close(index)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
</body>
|
|
|
</html>
|