|
|
@ -133,6 +133,9 @@ |
|
|
|
<a class="btn btn-success" onclick="showaddress()" shiro:hasPermission="system:shippingaddress:add"> |
|
|
|
<i class="fa fa-ambulance"></i> 添加其他送货地址 |
|
|
|
</a> |
|
|
|
<a class="btn btn-success" onclick="showInvoice()" > |
|
|
|
<i class="fa fa-plus"></i> 添加其他开票信息 |
|
|
|
</a> |
|
|
|
<a class="btn btn-success" onclick="showSign()" > |
|
|
|
<i class="fa fa-plus"></i> 修改客户标识 |
|
|
|
</a> |
|
|
@ -320,6 +323,64 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!--添加其他开票信息--> |
|
|
|
<div class="modal inmodal" id="invoiceModal" tabindex="1" |
|
|
|
role="dilog" aria-hidden="true"> |
|
|
|
<div class="modal-dialog" style="width: 1000px;background-color: #FFFFFF"> |
|
|
|
<div class="modal-content" style="background-color: #FFFFFF"> |
|
|
|
<div style="font-size: 20px;padding: 10px 50px 0">开票信息</div> |
|
|
|
<div class="modal-body"> |
|
|
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|
|
|
<form class="form-horizontal m" id="form-invoice-add" style="display: flex;flex-wrap: wrap;"> |
|
|
|
<div class="form-group" hidden> |
|
|
|
<input name="invoiceId" class="form-control" type="text" readonly> |
|
|
|
</div> |
|
|
|
<div class="form-group"> |
|
|
|
<label class="col-sm-3 control-label is-required">客户/企业代码:</label> |
|
|
|
<div class="col-sm-8"> |
|
|
|
<input name="enterpriseCode" class="form-control" type="text" required readonly> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="form-group"> |
|
|
|
<label class="col-sm-3 control-label is-required">客户/企业名称:</label> |
|
|
|
<div class="col-sm-8"> |
|
|
|
<input name="enterpriseName" class="form-control" type="text" required readonly> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="form-group"> |
|
|
|
<label class="col-sm-3 control-label is-required">开票公司名称:</label> |
|
|
|
<div class="col-sm-8"> |
|
|
|
<input name="invoiceCompanyName" class="form-control" type="text" required> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="form-group"> |
|
|
|
<label class="col-sm-3 control-label is-required">开票公司税号:</label> |
|
|
|
<div class="col-sm-8"> |
|
|
|
<input name="invoiceCompanyCode" class="form-control" type="text" required> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="form-group"> |
|
|
|
<label class="col-sm-3 control-label">公司开户行:</label> |
|
|
|
<div class="col-sm-8"> |
|
|
|
<input name="depositBank" class="form-control" type="text"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="form-group"> |
|
|
|
<label class="col-sm-3 control-label is-required">公司开户账号:</label> |
|
|
|
<div class="col-sm-8"> |
|
|
|
<input name="bankAccount" class="form-control" type="text" required> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="modal-footer"> |
|
|
|
<button type="button" class="btn btn-primary" onclick="submitInvoice()">确定</button> |
|
|
|
<button type="button" class="btn btn-default" onclick="closeInvoice()">取消</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<th:block th:include="include :: footer"/> |
|
|
|
<th:block th:include="include :: select2-js"/> |
|
|
|
<script th:src="@{/js/activiti.js}"></script> |
|
|
@ -343,6 +404,8 @@ |
|
|
|
var prefix1 = ctx + "system/contacts" |
|
|
|
// 送货地址 |
|
|
|
var prefix2 = ctx + "system/shippingaddress" |
|
|
|
/*开票信息*/ |
|
|
|
var prefix3 = ctx + "system/invoice"; |
|
|
|
$(function () { |
|
|
|
var options = { |
|
|
|
url: prefix + "/list", |
|
|
@ -351,7 +414,6 @@ |
|
|
|
removeUrl: prefix + "/remove", |
|
|
|
exportUrl: prefix + "/export", |
|
|
|
detailUrl: prefix + "/detail/{id}", |
|
|
|
clickToSelect: true, |
|
|
|
modalName: "客户基本信息", |
|
|
|
fixedColumns:true, |
|
|
|
fixedRightNumber:1, |
|
|
@ -479,12 +541,12 @@ |
|
|
|
{title: '第一收货人邮编',field: 'deliveryCustomerPostal',visible:false}, |
|
|
|
{title: '第一收货人传真',field: 'deliveryCustomerFax',visible: false}, |
|
|
|
{title: '客户标识',field:'customerSign'}, |
|
|
|
{title: '录入时间',field: 'firstAddTime', |
|
|
|
{title: '录入时间',field: 'createTime', |
|
|
|
formatter: function (value, row, index) { |
|
|
|
if (value == null) {return " ";} else { return value;} |
|
|
|
} |
|
|
|
}, |
|
|
|
{title: '上次修改时间',field: 'updateInfoTime', |
|
|
|
{title: '上次修改时间',field: 'updateTime', |
|
|
|
formatter: function (value, row, index) { |
|
|
|
if (value == null) { |
|
|
|
return " "; |
|
|
@ -639,9 +701,9 @@ |
|
|
|
} |
|
|
|
$("#shipingModal input[name='enterpriseCode']").val(data.enterpriseCode); |
|
|
|
$("#shipingModal input[name='enterpriseName']").val(data.enterpriseName); |
|
|
|
|
|
|
|
$("#shipingModal").modal("show"); |
|
|
|
} |
|
|
|
|
|
|
|
// 联系人明细 |
|
|
|
function addContacts() { |
|
|
|
$("input").val('') |
|
|
@ -693,7 +755,6 @@ |
|
|
|
} else { |
|
|
|
$.modal.alert("请选择一条数据"); |
|
|
|
} |
|
|
|
console.log(data); |
|
|
|
} |
|
|
|
$("#customerContact").select2({ |
|
|
|
placeholder: '请选择', |
|
|
@ -736,9 +797,14 @@ |
|
|
|
$("input[name='customerEmail']").val(data.materialName); |
|
|
|
$("input[name='customerFax']").val(data.commonEmail); |
|
|
|
}); |
|
|
|
$("#form-contacts-add").validate({ |
|
|
|
focusCleanup: true |
|
|
|
}); |
|
|
|
$("#form-contacts-add").validate({focusCleanup: true}); |
|
|
|
function submitHandler() { |
|
|
|
if ($.validate.form('form-contacts-add')) { |
|
|
|
$.operate.save(prefix1 + "/add", $('#form-contacts-add').serialize()); |
|
|
|
$('#shipingModal').modal("hide"); |
|
|
|
} |
|
|
|
} |
|
|
|
function closeInfo() {$('#shipingModal').modal("hide");} |
|
|
|
// 送货地址 |
|
|
|
function showaddress() { |
|
|
|
$("input").val('') |
|
|
@ -750,13 +816,14 @@ |
|
|
|
} else { |
|
|
|
$.modal.alert("请选择一条数据"); |
|
|
|
} |
|
|
|
console.log(data) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$("#form-contacts-add").validate({ |
|
|
|
focusCleanup: true |
|
|
|
}); |
|
|
|
function submitaddress() { |
|
|
|
if ($.validate.form('form-address-add')) { |
|
|
|
$.operate.save(prefix2 + "/add", $('#form-address-add').serialize()); |
|
|
|
$('#addressModal').modal("hide") |
|
|
|
} |
|
|
|
} |
|
|
|
function closeAdress() {$('#addressModal').modal("hide");} |
|
|
|
/*客户标识*/ |
|
|
|
function showSign(index){ |
|
|
|
var data = $("#bootstrap-table").bootstrapTable("getSelections"); |
|
|
@ -770,19 +837,6 @@ |
|
|
|
$.modal.alert("请选择一条数据"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function submitHandler() { |
|
|
|
if ($.validate.form('form-contacts-add')) { |
|
|
|
$.operate.save(prefix1 + "/add", $('#form-contacts-add').serialize()); |
|
|
|
$('#shipingModal').modal("hide"); |
|
|
|
} |
|
|
|
} |
|
|
|
function submitaddress() { |
|
|
|
if ($.validate.form('form-address-add')) { |
|
|
|
$.operate.save(prefix2 + "/add", $('#form-address-add').serialize()); |
|
|
|
$('#addressModal').modal("hide") |
|
|
|
} |
|
|
|
} |
|
|
|
function submitHandlerSign() { |
|
|
|
if ($.validate.form('form-customerSign-add')) { |
|
|
|
var id = $("#form-customerSign-add input[name='id']").val(); |
|
|
@ -798,14 +852,42 @@ |
|
|
|
function closeSign() { |
|
|
|
$('#signModel').modal("hide"); |
|
|
|
} |
|
|
|
function closeAdress() { |
|
|
|
$('#addressModal').modal("hide"); |
|
|
|
} |
|
|
|
function closeInfo() { |
|
|
|
$('#shipingModal').modal("hide"); |
|
|
|
} |
|
|
|
/*其他开票信息*/ |
|
|
|
|
|
|
|
function showInvoice() { |
|
|
|
$("input").val('') |
|
|
|
var data = $("#bootstrap-table").bootstrapTable("getSelections"); |
|
|
|
if (data.length == 1) { |
|
|
|
$("#invoiceModal input[name='enterpriseCode']").val(data[0].enterpriseCode) |
|
|
|
$("#invoiceModal input[name='enterpriseName']").val(data[0].enterpriseName) |
|
|
|
$.ajax({ |
|
|
|
url: prefix3 + "/getId", |
|
|
|
type: "post", |
|
|
|
success: function (resp) { |
|
|
|
if (resp.code === 0) { |
|
|
|
$("#form-invoice-add input[name='invoiceId']").val(resp.data); |
|
|
|
} else { |
|
|
|
$.modal.msgError("失败啦"); |
|
|
|
} |
|
|
|
}, |
|
|
|
error: function () { |
|
|
|
$.modal.msgError("后台出错啦!"); |
|
|
|
} |
|
|
|
}) |
|
|
|
$("#invoiceModal").modal("show"); |
|
|
|
/*获取生成的开票ID*/ |
|
|
|
|
|
|
|
} else { |
|
|
|
$.modal.alert("请选择一条数据"); |
|
|
|
} |
|
|
|
} |
|
|
|
function submitInvoice() { |
|
|
|
if ($.validate.form('form-invoice-add')) { |
|
|
|
$.operate.save(prefix3 + "/add", $('#form-invoice-add').serialize()); |
|
|
|
$('#invoiceModal').modal("hide") |
|
|
|
} |
|
|
|
} |
|
|
|
function closeInvoice() {$('#invoiceModal').modal("hide");} |
|
|
|
</script> |
|
|
|
</body> |
|
|
|
</html> |