|
@@ -39,6 +39,7 @@
|
|
<script src="${ctxStatic}/bootstrap-select-1.12.4/js/bootstrap-select.min.js"></script>
|
|
<script src="${ctxStatic}/bootstrap-select-1.12.4/js/bootstrap-select.min.js"></script>
|
|
<script type="text/javascript">
|
|
<script type="text/javascript">
|
|
var validateForm;
|
|
var validateForm;
|
|
|
|
+ var exitName = true;
|
|
function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
|
|
function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
|
|
if(validateForm.form()){
|
|
if(validateForm.form()){
|
|
var tableObj = document.getElementById('contentTable').rows[1];
|
|
var tableObj = document.getElementById('contentTable').rows[1];
|
|
@@ -46,6 +47,9 @@
|
|
parent.layer.msg("请填写联系人信息!", {icon: 5});
|
|
parent.layer.msg("请填写联系人信息!", {icon: 5});
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
+ if(!exitName){
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
$("#inputForm").submit();
|
|
$("#inputForm").submit();
|
|
return true;
|
|
return true;
|
|
}else {
|
|
}else {
|
|
@@ -152,10 +156,36 @@
|
|
if($("#uscCode").val()!=null&&$("#uscCode").val()!='') {
|
|
if($("#uscCode").val()!=null&&$("#uscCode").val()!='') {
|
|
$("#inputForm").validate().element($("#uscCode"));
|
|
$("#inputForm").validate().element($("#uscCode"));
|
|
}
|
|
}
|
|
|
|
+ // $("#name").blur(function(){
|
|
|
|
+ // checkName();
|
|
|
|
+ // })
|
|
|
|
+ $("#name").on("change",function(){
|
|
|
|
+ var id = $("#id").val();
|
|
|
|
+ var name = $("#name").val();
|
|
|
|
+ var uscCode = $("#uscCode").val();
|
|
|
|
+ $.ajax({
|
|
|
|
+ url:"${ctx}/workclientinfo/workClientInfo/checkClient",
|
|
|
|
+ type:"post",
|
|
|
|
+ data:{"id":id,
|
|
|
|
+ "name":name,
|
|
|
|
+ "uscCode":uscCode},
|
|
|
|
+ success:function(data){
|
|
|
|
+ if(data==="false"){
|
|
|
|
+ exitName=false
|
|
|
|
+ $("#ph").html("该客户已存在");
|
|
|
|
+ }else {
|
|
|
|
+ exitName=true
|
|
|
|
+ $("#ph").html('');
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ )
|
|
<%--var arr="${workClientInfo.clientType}".split(',');--%>
|
|
<%--var arr="${workClientInfo.clientType}".split(',');--%>
|
|
// $('#clientType').selectpicker('val',arr);
|
|
// $('#clientType').selectpicker('val',arr);
|
|
dismissDiv();
|
|
dismissDiv();
|
|
|
|
+
|
|
});
|
|
});
|
|
|
|
|
|
function testOurBank(value){
|
|
function testOurBank(value){
|
|
@@ -239,6 +269,28 @@
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ function checkName() {
|
|
|
|
+ var id = $("#id").val();
|
|
|
|
+ var name = $("#name").val();
|
|
|
|
+ var uscCode = $("#uscCode").val();
|
|
|
|
+ $.ajax({
|
|
|
|
+ url:"${ctx}/workclientinfo/workClientInfo/checkClient",
|
|
|
|
+ type:"post",
|
|
|
|
+ data:{"id":id,
|
|
|
|
+ "name":name,
|
|
|
|
+ "uscCode":uscCode},
|
|
|
|
+ success:function(data){
|
|
|
|
+ if(data==="false"){
|
|
|
|
+ exitName=false
|
|
|
|
+ $("#ph").html("该客户已存在");
|
|
|
|
+ }else {
|
|
|
|
+ exitName=true
|
|
|
|
+ $("#ph").html('');
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
function insertTitle(tValue){
|
|
function insertTitle(tValue){
|
|
var list = "${workClientInfo.workAttachments}";
|
|
var list = "${workClientInfo.workAttachments}";
|
|
var size = (list.split('url')).length-1;
|
|
var size = (list.split('url')).length-1;
|
|
@@ -291,7 +343,7 @@
|
|
"${ctx}/workclientinfo/workClientInfo/enterpriseTicketInfo",
|
|
"${ctx}/workclientinfo/workClientInfo/enterpriseTicketInfo",
|
|
{"id": id},
|
|
{"id": id},
|
|
function (data) {
|
|
function (data) {
|
|
- $("#name").val(data.ENTNAME);
|
|
|
|
|
|
+ $("#name").val(data.ENTNAME).change();
|
|
$("#uscCode").val(data.TAXNUMBER);
|
|
$("#uscCode").val(data.TAXNUMBER);
|
|
$("#registerAddress").val(data.OPLOC);
|
|
$("#registerAddress").val(data.OPLOC);
|
|
}
|
|
}
|
|
@@ -320,7 +372,7 @@
|
|
"${ctx}/workclientinfo/workClientInfo/enterpriseTicketInfo",
|
|
"${ctx}/workclientinfo/workClientInfo/enterpriseTicketInfo",
|
|
{"id": id},
|
|
{"id": id},
|
|
function (data) {
|
|
function (data) {
|
|
- $("#name").val(data.ENTNAME);
|
|
|
|
|
|
+ $("#name").val(data.ENTNAME).change();
|
|
$("#uscCode").val(data.TAXNUMBER);
|
|
$("#uscCode").val(data.TAXNUMBER);
|
|
$("#registerAddress").val(data.OPLOC);
|
|
$("#registerAddress").val(data.OPLOC);
|
|
}
|
|
}
|
|
@@ -355,8 +407,9 @@
|
|
<div class="layui-item layui-col-sm6 lw7" id="search">
|
|
<div class="layui-item layui-col-sm6 lw7" id="search">
|
|
<label class="layui-form-label"><span class="require-item">*</span>客户名称: </label>
|
|
<label class="layui-form-label"><span class="require-item">*</span>客户名称: </label>
|
|
<div class="layui-input-block">
|
|
<div class="layui-input-block">
|
|
- <form:input path="name" htmlEscape="false" class="form-control required layui-input"/>
|
|
|
|
|
|
+ <form:input path="name" htmlEscape="false" id="name" class="form-control required layui-input"/>
|
|
<a onclick="fuzzyQuery()" class="nav-btn nav-btn-add" style="margin-right: 0px;top:0px;right:1px;position: absolute;height:40px;line-height: 40px;">查询</a>
|
|
<a onclick="fuzzyQuery()" class="nav-btn nav-btn-add" style="margin-right: 0px;top:0px;right:1px;position: absolute;height:40px;line-height: 40px;">查询</a>
|
|
|
|
+ <span id="ph" style="color:#cc5965"></span>
|
|
</div>
|
|
</div>
|
|
<div id="fuzzyQuerySelect"
|
|
<div id="fuzzyQuerySelect"
|
|
style="z-index:1;display:none;background-color:white; position: relative; width:333px;left:120px; border: 1px solid gray;">
|
|
style="z-index:1;display:none;background-color:white; position: relative; width:333px;left:120px; border: 1px solid gray;">
|
|
@@ -382,7 +435,7 @@
|
|
<div class="layui-item layui-col-sm6 lw7 companyType_uscCode">
|
|
<div class="layui-item layui-col-sm6 lw7 companyType_uscCode">
|
|
<label class="layui-form-label double-line"><span class="require-item">*</span>统一社会信用代码:</label>
|
|
<label class="layui-form-label double-line"><span class="require-item">*</span>统一社会信用代码:</label>
|
|
<div class="layui-input-block">
|
|
<div class="layui-input-block">
|
|
- <form:input path="uscCode" htmlEscape="false" class="form-control required isUscCode layui-input" readonly="true"/>
|
|
|
|
|
|
+ <form:input path="uscCode" htmlEscape="false" id="uscCode" class="form-control required isUscCode layui-input"/>
|
|
<input type="hidden" id="oldUscCode" value="${workClientInfo.uscCode}"/>
|
|
<input type="hidden" id="oldUscCode" value="${workClientInfo.uscCode}"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|