|
|
@ -92,10 +92,10 @@ |
|
|
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:customer:add"> |
|
|
|
<i class="fa fa-plus"></i> 添加 |
|
|
|
</a> |
|
|
|
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()"--> |
|
|
|
<!-- shiro:hasPermission="system:customer:edit">--> |
|
|
|
<!-- <i class="fa fa-edit"></i> 修改--> |
|
|
|
<!-- </a>--> |
|
|
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" |
|
|
|
shiro:hasPermission="system:customer:edit"> |
|
|
|
<i class="fa fa-edit"></i> 修改 |
|
|
|
</a> |
|
|
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" |
|
|
|
shiro:hasPermission="system:customer:remove"> |
|
|
|
<i class="fa fa-remove"></i> 删除 |
|
|
@ -116,8 +116,9 @@ |
|
|
|
|
|
|
|
<i class="fa fa-ambulance"></i> 添加送货地址 |
|
|
|
</a> |
|
|
|
<a class="btn btn-primary" onclick="showCustomerAudit()" shiro:hasPermission="system:customer:audit"> |
|
|
|
<i class="fa fa-edit"></i> 审核 |
|
|
|
<a class="btn btn-primary" onclick="showAudit()" shiro:hasPermission="system:customer:edit"> |
|
|
|
|
|
|
|
<i class="fa fa-ambulance"></i> 审核 |
|
|
|
</a> |
|
|
|
<a class="btn btn-success" onclick="showdetails()" > |
|
|
|
<i class="fa fa-file-text"></i> 详情列表 |
|
|
@ -659,9 +660,10 @@ |
|
|
|
</div> |
|
|
|
<div class="addressList sh"> |
|
|
|
<div class="col-sm-12 select-table table-striped"> |
|
|
|
<div class="details" style="padding: 8px 0;font-size: 18px">操作记录</div> |
|
|
|
<div class="details" style="padding: 8px 0;font-size: 18px">操作历史</div> |
|
|
|
<table id="oper-table"></table> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
@ -683,7 +685,7 @@ |
|
|
|
<div class="modal-body" style="height: 180px"> |
|
|
|
<form id="form-audit-edit"> |
|
|
|
<div class="form-group" style="display: none"> |
|
|
|
<label class="col-sm-3 control-label is-required">客户表id:</label> |
|
|
|
<label class="col-sm-3 control-label is-required">客户id:</label> |
|
|
|
<div class="col-sm-8"> |
|
|
|
<input id="customerId" name="customerId" class="form-control" type="text" |
|
|
|
required |
|
|
@ -700,19 +702,28 @@ |
|
|
|
</select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="form-group"> |
|
|
|
<label class="col-sm-3 control-label">审核时间:</label> |
|
|
|
<div class="col-sm-8"> |
|
|
|
<div class="input-group date"> |
|
|
|
<input id="operTime" name="operTime" class="form-control " |
|
|
|
placeholder="yyyy-MM-dd HH:mm:ss" type="text"> |
|
|
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="form-group"> |
|
|
|
<label class="col-sm-3 control-label">审核人:</label> |
|
|
|
<div class="col-sm-8"> |
|
|
|
<input id="identifyingPeople" name="identifyingPeople" class="form-control" type="text" readonly> |
|
|
|
<input id="identifyingPeople" name="identifyingPeople" class="form-control" type="text"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
<div class="modal-footer"> |
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button> |
|
|
|
|
|
|
|
<button type="button" onclick="AuditConfirmSubmit(1)" class="btn btn-danger" data-dismiss="modal" editFlag>审核拒绝</button> |
|
|
|
<button type="button" onclick="AuditConfirmSubmit(2)" class="btn btn-success" data-dismiss="modal" editFlag>审核通过</button> |
|
|
|
<button type="button" onclick="AuditConfirmSubmit(1)" class="btn btn-danger" data-dismiss="modal">审核拒绝</button> |
|
|
|
<button type="button" onclick="AuditConfirmSubmit(2)" class="btn btn-success" data-dismiss="modal">审核通过</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -754,7 +765,7 @@ |
|
|
|
if (value == 0){ |
|
|
|
return "待审核"; |
|
|
|
} |
|
|
|
if (value == 1){ |
|
|
|
if(value==1){ |
|
|
|
return "审核通过"; |
|
|
|
} |
|
|
|
if (value == 2){ |
|
|
@ -769,7 +780,7 @@ |
|
|
|
if (value == 0){ |
|
|
|
return "否"; |
|
|
|
} |
|
|
|
if (value==1){ |
|
|
|
if(value==1){ |
|
|
|
return "是"; |
|
|
|
} |
|
|
|
if (value == 2){ |
|
|
@ -1071,9 +1082,11 @@ |
|
|
|
|
|
|
|
function submitHandler() { |
|
|
|
if ($.validate.form('form-contacts-add')) { |
|
|
|
$.operate.save(prefix + "/add", $('#form-contacts-add').serialize()); |
|
|
|
$.operate.save(prefix1 + "/add", $('#form-contacts-add').serialize()); |
|
|
|
$('#infoModal').modal("hide") |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 列表联系人明细 |
|
|
@ -1381,6 +1394,85 @@ |
|
|
|
}, |
|
|
|
] |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
$('#oper-table').bootstrapTable('destroy'); |
|
|
|
$('#oper-table').bootstrapTable({ |
|
|
|
url: '/system/customer/operList', |
|
|
|
pagination: true, |
|
|
|
pageNumber: 1, |
|
|
|
pageSize: 10, |
|
|
|
pageList: [10, 25, 50, 100], |
|
|
|
showRefresh: false, |
|
|
|
method: "post", |
|
|
|
contentType: "application/x-www-form-urlencoded", |
|
|
|
striped: true, // 是否显示行间隔色 |
|
|
|
cache: false, // 是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*) |
|
|
|
sidePagination: "server", // 分页方式:client客户端分页,server服务端分页(*) |
|
|
|
clickToSelect: true, // 是否启用点击选中行 |
|
|
|
showToggle: false, // 是否显示详细视图和列表视图的切换按钮 |
|
|
|
cardView: false, // 是否显示详细视图 |
|
|
|
detailView: false, // 是否显示父子表 |
|
|
|
smartDisplay: false, // 加了这个才显示每页显示的行数 |
|
|
|
showExport: false, // 是否显示导出按钮 |
|
|
|
singleSelect: true, |
|
|
|
paginationDetailHAlign: ' hiddenDetailInfo', |
|
|
|
height: 150, |
|
|
|
queryParams: function (params) { |
|
|
|
//console.log("123"); |
|
|
|
var curParams = { |
|
|
|
// 传递参数查询参数 |
|
|
|
pageSize: params.limit, |
|
|
|
pageNum: params.offset / params.limit + 1, |
|
|
|
enterpriseCode: row.enterpriseCode |
|
|
|
|
|
|
|
}; |
|
|
|
// console.log(data[0].enterpriseCode) |
|
|
|
return curParams |
|
|
|
}, |
|
|
|
columns: [ |
|
|
|
{ |
|
|
|
field: 'id', |
|
|
|
title: '客户/企业代码', |
|
|
|
visible: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'enterpriseCode', |
|
|
|
title: '客户/企业代码', |
|
|
|
visible: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'enterpriseName', |
|
|
|
title: '客户/企业名称', |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'purser', |
|
|
|
title: '事业部' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'operPeople', |
|
|
|
title: '操作人' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'oper', |
|
|
|
field: '操作' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'createTime', |
|
|
|
field: '操作时间' |
|
|
|
},{ |
|
|
|
field: 'operStatus', |
|
|
|
title: '操作状态', |
|
|
|
formatter:function (value,index,row){ |
|
|
|
if (value == 0){ |
|
|
|
return '成功'; |
|
|
|
}else{ |
|
|
|
return '失败'; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
}); |
|
|
|
$("#detailsModal").modal("show"); |
|
|
|
} else { |
|
|
|
$.modal.alert("请选择一条数据"); |
|
|
@ -1458,7 +1550,7 @@ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 联系人 |
|
|
|
// 联系人 |
|
|
|
$('#contacts-table').bootstrapTable('destroy'); |
|
|
|
$('#contacts-table').bootstrapTable({ |
|
|
|
url: '/system/contacts/list', |
|
|
@ -1639,7 +1731,7 @@ |
|
|
|
] |
|
|
|
}); |
|
|
|
|
|
|
|
//客户表操作记录 |
|
|
|
|
|
|
|
$('#oper-table').bootstrapTable('destroy'); |
|
|
|
$('#oper-table').bootstrapTable({ |
|
|
|
url: '/system/customer/operList', |
|
|
@ -1668,9 +1760,8 @@ |
|
|
|
// 传递参数查询参数 |
|
|
|
pageSize: params.limit, |
|
|
|
pageNum: params.offset / params.limit + 1, |
|
|
|
enterpriseCode: row.enterpriseCode, |
|
|
|
enterpriseName: row.enterpriseName, |
|
|
|
purser: row.customerPurser |
|
|
|
enterpriseCode: row.enterpriseCode |
|
|
|
|
|
|
|
}; |
|
|
|
// console.log(data[0].enterpriseCode) |
|
|
|
return curParams |
|
|
@ -1678,12 +1769,13 @@ |
|
|
|
columns: [ |
|
|
|
{ |
|
|
|
field: 'id', |
|
|
|
title: '操作id', |
|
|
|
title: '客户/企业代码', |
|
|
|
visible: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'enterpriseCode', |
|
|
|
title: '客户/代码', |
|
|
|
title: '客户/企业代码', |
|
|
|
visible: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'enterpriseName', |
|
|
@ -1693,40 +1785,39 @@ |
|
|
|
field: 'purser', |
|
|
|
title: '事业部' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'oper', |
|
|
|
title: '操作' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'operPeople', |
|
|
|
title: '操作人' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'createTime', |
|
|
|
title: '操作时间' |
|
|
|
field: 'oper', |
|
|
|
field: '操作' |
|
|
|
}, |
|
|
|
{ |
|
|
|
field: 'createTime', |
|
|
|
field: '操作时间' |
|
|
|
},{ |
|
|
|
field: 'operStatus', |
|
|
|
title: '操作的状态', |
|
|
|
formatter : function(value, row, index) { |
|
|
|
title: '操作状态', |
|
|
|
formatter:function (value,index,row){ |
|
|
|
if (value == 0){ |
|
|
|
return "成功"; |
|
|
|
return '成功'; |
|
|
|
}else{ |
|
|
|
return "失败" |
|
|
|
return '失败'; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
] |
|
|
|
}); |
|
|
|
$("#detailsModal").modal("show"); |
|
|
|
}) |
|
|
|
function showCustomerAudit() { |
|
|
|
function showAudit() { |
|
|
|
let data = $("#bootstrap-table").bootstrapTable("getSelections"); |
|
|
|
let userName = [[${@permission.getPrincipalProperty('userName')}]]; |
|
|
|
if (data.length === 1) { |
|
|
|
$("#customerId").val(data[0].customerId) |
|
|
|
$("#customerIdId").val(data[0].customerId) |
|
|
|
$("#deginflag").val(1).trigger("change") |
|
|
|
$("#identifyingPeople").val(userName); |
|
|
|
$("#identifyingPeople").val(userName) |
|
|
|
$("#AuditModel").modal("show"); |
|
|
|
} else { |
|
|
|
$.modal.alert("请选择一条数据"); |
|
|
@ -1734,27 +1825,23 @@ |
|
|
|
|
|
|
|
} |
|
|
|
function AuditConfirmSubmit(number) { |
|
|
|
$("#deginflag").val(number).trigger("change"); |
|
|
|
var auditNo = $("#deginflag").val() + ""; |
|
|
|
var formData = $('#form-audit-edit').serialize(); |
|
|
|
formData = formData + "&" +"deginflag=" + auditNo; |
|
|
|
console.log(auditNo); |
|
|
|
var auditNo = $("deginflag").val() |
|
|
|
$.ajax({ |
|
|
|
url: prefix + "/edit", |
|
|
|
type: "post", |
|
|
|
resultType: "json", |
|
|
|
data: formData, |
|
|
|
data: $('#form-audit-edit').serialize(), |
|
|
|
success: function (resp) { |
|
|
|
console.log(resp); |
|
|
|
console.log(resp) |
|
|
|
$("#bootstrap-table").bootstrapTable('refresh'); |
|
|
|
// $(".alert-success").addClass("show"); |
|
|
|
// window.setTimeout(function () { |
|
|
|
// $(".alert-success").removeClass("show"); |
|
|
|
// }, 1000);//显示的时间 |
|
|
|
if(resp.msg == 0){ |
|
|
|
if (resp.msg == 0) { |
|
|
|
$.modal.msgSuccess("审核成功!") |
|
|
|
}else{ |
|
|
|
$.modal.msgError("审核失败!") |
|
|
|
} else { |
|
|
|
$.modal.msgError("审核失败") |
|
|
|
} |
|
|
|
}, |
|
|
|
error: function () { |
|
|
|