|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
|
|
|
<head>
|
|
|
|
<th:block th:include="include :: header('客户基本信息列表')"/>
|
|
|
|
<link th:href="@{/ajax/libs/select2/select2.css}" rel="stylesheet">
|
|
|
|
<link th:href="@{/ajax/libs/select2/select2-bootstrap.css}" rel="stylesheet">
|
|
|
|
<script type="text/javascript" th:src="@{/js/axios.min.js}"></script>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
.form-horizontal .form-group {
|
|
|
|
width: 50%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.base-customer {
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
justify-content: space-between;
|
|
|
|
}
|
|
|
|
|
|
|
|
.base-customer .form-group {
|
|
|
|
width: 30%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.details-title {
|
|
|
|
width: 100%;
|
|
|
|
position: fixed;
|
|
|
|
font-size: 20px;
|
|
|
|
padding: 10px 0;
|
|
|
|
text-align: center;
|
|
|
|
background-color: #a7b1c2;
|
|
|
|
color: #FFFFFF;
|
|
|
|
z-index: 9999;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.details-body {
|
|
|
|
padding-top: 80px;
|
|
|
|
overflow-y: auto;
|
|
|
|
max-height: 750px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.hiddenDetailInfo {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.search-collapse, .select-table {
|
|
|
|
box-shadow: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
|
|
<body class="gray-bg">
|
|
|
|
<div class="container-div">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-12 search-collapse">
|
|
|
|
<form id="formId">
|
|
|
|
<div class="select-list">
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
<label>客户/企业代码:</label>
|
|
|
|
<input type="text" name="enterpriseCode"/>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<label>内外销:</label>
|
|
|
|
<select name="exportSales" th:with="type=${@dict.getType('sys_export_sales')}">
|
|
|
|
<option value="">所有</option>
|
|
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
|
|
|
th:value="${dict.dictValue}"></option>
|
|
|
|
</select>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<label>客户/企业名称:</label>
|
|
|
|
<input type="text" name="enterpriseName"/>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<label>送货地址:</label>
|
|
|
|
<input type="text" name="deliveryAddress"/>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a class="btn btn-primary
|
|
|
|
btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
|
|
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
|
|
|
|
class="fa fa-refresh"></i> 重置</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="btn-group-sm" id="toolbar" role="group">
|
|
|
|
<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-danger multiple disabled" onclick="$.operate.removeAll()"
|
|
|
|
shiro:hasPermission="system:customer:remove">
|
|
|
|
<i class="fa fa-remove"></i> 删除
|
|
|
|
</a>
|
|
|
|
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:customer:export">-->
|
|
|
|
<!-- <i class="fa fa-download"></i> 导出-->
|
|
|
|
<!-- </a>-->
|
|
|
|
<a class="btn btn-warning single disabled" onclick="exportCustomerInfo()" shiro:hasPermission="system:customer:export" >
|
|
|
|
<i class="fa fa-download"></i> 导出
|
|
|
|
</a>
|
|
|
|
<!-- <a class="btn btn-danger" onclick="oneexport()" shiro:hasPermission="system:customer:export">-->
|
|
|
|
<!-- <i class="fa fa-download"></i> 单个导出-->
|
|
|
|
<!-- </a>-->
|
|
|
|
<a class="btn btn-success" id="tocontacts" onclick="addContacts()" shiro:hasPermission="system:contacts:add">
|
|
|
|
<i class="fa fa-plus"></i> 添加联系人明细
|
|
|
|
</a>
|
|
|
|
<a class="btn btn-primary" onclick="showaddress()" shiro:hasPermission="system:shippingaddress:add">
|
|
|
|
|
|
|
|
<i class="fa fa-ambulance"></i> 添加送货地址
|
|
|
|
</a>
|
|
|
|
<a class="btn btn-success" onclick="showdetails()" >
|
|
|
|
<i class="fa fa-file-text"></i> 详情列表
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-12 select-table table-striped">
|
|
|
|
<table id="bootstrap-table" style="white-space:nowrap"></table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!--联系人明细模态框-->
|
|
|
|
<div class="modal inmodal" id="infoModal" 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-contacts-add" style="display: flex;flex-wrap: wrap;">
|
|
|
|
<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" readonly required>
|
|
|
|
<!-- <select name="enterpriseCode" class="form-control m-b " id="enterpriseCode">-->
|
|
|
|
<!-- <option value="">所有</option>-->
|
|
|
|
<!-- </select>-->
|
|
|
|
|
|
|
|
</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" readonly required>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label is-required">姓名:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="customerName" 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="customerPosition" class="form-control" type="text">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">生日:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="customerBirthday" class="form-control" type="text">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">办公电话:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="officeTelephone" class="form-control" type="text">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">家中电话:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="homePhone" 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="cellPhone" 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="customerFax" class="form-control" type="text">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">备用电话1:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="standbyTelephoneOne" class="form-control" type="text">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">备用电话2:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="standbyTelephoneTwo" class="form-control" type="text">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">常用Email:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="commonEmail" class="form-control" type="text">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">备用Email:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="alternateEmail" class="form-control" type="text">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">备注:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="customerRemarks" class="form-control" type="text">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<div type="button" class="btn btn-default" onclick="submitHandler()">确定</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!--送货地址模态框-->
|
|
|
|
<div class="modal inmodal" id="addressModal" 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-address-add" style="display: flex;flex-wrap: wrap;">
|
|
|
|
<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="customerName" 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="customerPhone" class="form-control" type="text" required>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">联系人2:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="customerNameTwo" 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="deliveryAddress" 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="plantArea" class="form-control" type="text">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">详细描述:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="detailedDescription" class="form-control" type="text">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">邮编:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="postalCode" class="form-control" type="text">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">传真:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="customerFax" class="form-control" type="text">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-default" onclick="submitaddress()">确定</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!--详情信息模态框-->
|
|
|
|
<div class="modal inmodal" id="detailsModal" tabindex="-1"
|
|
|
|
role="dilog" aria-hidden="true">
|
|
|
|
<div class="modal-dialog" style="width: 1400px;max-height: 800px; background-color: #FFFFFF">
|
|
|
|
<div class="modal-content" style="background-color: #FFFFFF">
|
|
|
|
<div class="details-title">客户详情</div>
|
|
|
|
<div class="modal-body details-body">
|
|
|
|
<div class="row">
|
|
|
|
<div class="base-customer">
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">客户/企业代码:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input id="enterpriseCode" name="enterpriseCode" class="form-control" type="text"
|
|
|
|
readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">内外销:</label>
|
|
|
|
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="exportSales" class="form-control" type="text" readonly>
|
|
|
|
<!-- <select name="exportSales" class="form-control m-b" th:with="type=${@dict.getType('sys_export_sales')}">-->
|
|
|
|
<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
|
|
|
|
<!-- </select>-->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">客户/企业名称:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input id="enterpriseName" name="enterpriseName" class="form-control" type="text"
|
|
|
|
readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">英文名称:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="englishName" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">地址:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="customerAddress" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">送货地址:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input id="deliveryAddress" name="deliveryAddress" class="form-control" type="text"
|
|
|
|
readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">邮编:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="postalCode" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">国家地区:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="customerCountry" class="form-control" type="text" readonly>
|
|
|
|
<!-- <select name="customerCountry" class="form-control m-b" th:with="type=${@dict.getType('sys_country')}">-->
|
|
|
|
<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
|
|
|
|
<!-- </select>-->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">常用币种:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="commonCurrency" class="form-control" type="text" readonly>
|
|
|
|
|
|
|
|
<!-- <select name="commonCurrency" class="form-control m-b" th:with="type=${@dict.getType('sys_common_currency')}">-->
|
|
|
|
<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
|
|
|
|
<!-- </select>-->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">备注内容:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<textarea name="customerRemarks" class="form-control" readonly></textarea>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">法人代表:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="legalRepresentative" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">开票客户名称:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="invoicingCustomerName" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">开票公司名称:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="invoicingCompanyName" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">信用额度:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="creditLimit" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">诚信评级:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="integrityRating" class="form-control" type="text" readonly>
|
|
|
|
|
|
|
|
<!-- <select name="integrityRating" class="form-control m-b" th:with="type=${@dict.getType('sys_integrity_rating')}">-->
|
|
|
|
<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
|
|
|
|
<!-- </select>-->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">联系人:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="customerContact" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">联系电话:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="contactNumber" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">传真:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="customerFax" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">Email:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="customerEmail" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">客户简称:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="customerAbbreviation" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">海关代码:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="customsCode" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">付款条件:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="paymentTerms" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">发票代码:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="invoiceCode" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">目的港:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="portOfDestination" class="form-control" type="text" readonly>
|
|
|
|
</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 name="establishedTime" class="form-control" type="text" readonly>
|
|
|
|
<!-- <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 name="settlementBank" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">结汇账号:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="exchangeSettlementAccount" class="form-control" type="text" readonly>
|
|
|
|
</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" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">开户银行账号:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="bankAccount" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">RMB注册资金:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="rmbRegisteredCapital" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">外币注册资金:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="registeredCapital" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">订单号长度:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="orderLength" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">出货单格式模板名称:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="shippingTemplate" class="form-control" type="text" readonly>
|
|
|
|
|
|
|
|
<!-- <select name="shippingTemplate" class="form-control m-b" th:with="type=${@dict.getType('sys_shipping_template')}">-->
|
|
|
|
<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
|
|
|
|
<!-- </select>-->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">业务员:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="businessMembers" class="form-control" type="text" readonly>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">目的地港代号:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="destinationPortCode" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">起运潜名:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="departurePotentialName" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">起运潜代号:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="departurePotentialCode" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">统一编号:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="unifiedNumbering" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">出货需录入使用量:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="shipmentUsage" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">制单人:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="voucherPreparation" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">确认人:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="identifyingPeople" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">是否含税:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<!-- <div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}">-->
|
|
|
|
<!-- <input type="radio" th:id="${'confirmTax_' + dict.dictCode}" name="confirmTax" th:value="${dict.dictValue}" th:checked="${dict.default}">-->
|
|
|
|
<!-- <label th:for="${'confirmTax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>-->
|
|
|
|
<!-- </div>-->
|
|
|
|
<input type="text" name="confirmTax" class="form-control" readonly>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">税率:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="taxRate" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">国家/地区编号:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<!-- <select name="countryNumber" class="form-control m-b" th:with="type=${@dict.getType('sys_country_number')}">-->
|
|
|
|
<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
|
|
|
|
<!-- </select>-->
|
|
|
|
<input name="countryNumber" class="form-control" type="text" readonly>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="contactsList sh">
|
|
|
|
<div class="col-sm-12 select-table table-striped">
|
|
|
|
<div class="details" style="padding: 8px 0;font-size: 18px">联系人明细</div>
|
|
|
|
<table id="contacts-table"></table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</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>
|
|
|
|
<table id="address-table"></table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer" style=" border-top: none;background-color: #a7b1c2">
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal" onclick="close()">关闭</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<th:block th:include="include :: footer"/>
|
|
|
|
<th:block th:include="include :: select2-js"/>
|
|
|
|
|
|
|
|
<script th:inline="javascript">
|
|
|
|
var editFlag = [[${@permission.hasPermi('system:customer:edit')}]];
|
|
|
|
var removeFlag = [[${@permission.hasPermi('system:customer:remove')}]];
|
|
|
|
var exportSalesDatas = [[${@dict.getType('sys_export_sales')}]];
|
|
|
|
var customerCountryDatas = [[${@dict.getType('sys_country')}]];
|
|
|
|
var commonCurrencyDatas = [[${@dict.getType('sys_common_currency')}]];
|
|
|
|
var integrityRatingDatas = [[${@dict.getType('sys_integrity_rating')}]];
|
|
|
|
var shippingTemplateDatas = [[${@dict.getType('sys_shipping_template')}]];
|
|
|
|
var confirmTaxDatas = [[${@dict.getType('sys_confirm_tax')}]];
|
|
|
|
var shipmentUsageDatas = [[${@dict.getType('sys_shipment_usage')}]];
|
|
|
|
var countryNumberDatas = [[${@dict.getType('sys_country_number')}]];
|
|
|
|
var prefix = ctx + "system/customer";
|
|
|
|
|
|
|
|
$(function () {
|
|
|
|
var options = {
|
|
|
|
url: prefix + "/list",
|
|
|
|
createUrl: prefix + "/add",
|
|
|
|
updateUrl: prefix + "/edit/{id}",
|
|
|
|
removeUrl: prefix + "/remove",
|
|
|
|
exportUrl: prefix + "/export",
|
|
|
|
clickToSelect: true,
|
|
|
|
modalName: "客户基本信息",
|
|
|
|
columns: [{
|
|
|
|
checkbox: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerId',
|
|
|
|
title: '客户id',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'enterpriseCode',
|
|
|
|
title: '客户/企业代码'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'exportSales',
|
|
|
|
title: '内外销',
|
|
|
|
formatter: function (value, row, index) {
|
|
|
|
return $.table.selectDictLabel(exportSalesDatas, value);
|
|
|
|
},
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'enterpriseName',
|
|
|
|
title: '客户/企业名称'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'englishName',
|
|
|
|
title: '英文名称',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerAddress',
|
|
|
|
title: '地址',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'deliveryAddress',
|
|
|
|
title: '送货地址'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'postalCode',
|
|
|
|
title: '邮编',
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerCountry',
|
|
|
|
title: '国家地区',
|
|
|
|
formatter: function (value, row, index) {
|
|
|
|
return $.table.selectDictLabel(customerCountryDatas, value);
|
|
|
|
},
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'commonCurrency',
|
|
|
|
title: '常用币种',
|
|
|
|
formatter: function (value, row, index) {
|
|
|
|
return $.table.selectDictLabel(commonCurrencyDatas, value);
|
|
|
|
},
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerRemarks',
|
|
|
|
title: '备注内容',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'legalRepresentative',
|
|
|
|
title: '法人代表',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'invoicingCustomerName',
|
|
|
|
title: '开票客户名称',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'invoicingCompanyName',
|
|
|
|
title: '开票公司名称',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'creditLimit',
|
|
|
|
title: '信用额度',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'integrityRating',
|
|
|
|
title: '诚信评级',
|
|
|
|
formatter: function (value, row, index) {
|
|
|
|
return $.table.selectDictLabel(integrityRatingDatas, value);
|
|
|
|
},
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerContact',
|
|
|
|
title: '联系人'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'contactNumber',
|
|
|
|
title: '联系电话'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerFax',
|
|
|
|
title: '传真'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerEmail',
|
|
|
|
title: 'Email'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerAbbreviation',
|
|
|
|
title: '客户简称',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customsCode',
|
|
|
|
title: '海关代码',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'paymentTerms',
|
|
|
|
title: '付款条件'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'invoiceCode',
|
|
|
|
title: '发票代码',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'portOfDestination',
|
|
|
|
title: '目的港',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'establishedTime',
|
|
|
|
title: '成立日期'
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'settlementBank',
|
|
|
|
title: '结汇银行',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'exchangeSettlementAccount',
|
|
|
|
title: '结汇账号',
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'depositBank',
|
|
|
|
title: '开户银行',
|
|
|
|
// visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'bankAccount',
|
|
|
|
title: '开户银行账号',
|
|
|
|
// visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'rmbRegisteredCapital',
|
|
|
|
title: 'RMB注册资金',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'registeredCapital',
|
|
|
|
title: '外币注册资金',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'orderLength',
|
|
|
|
title: '订单号长度',
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'shippingTemplate',
|
|
|
|
title: '出货单格式模板名称',
|
|
|
|
formatter: function (value, row, index) {
|
|
|
|
return $.table.selectDictLabel(shippingTemplateDatas, value);
|
|
|
|
},
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'businessMembers',
|
|
|
|
title: '业务员',
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'destinationPortCode',
|
|
|
|
title: '目的地港代号',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'departurePotentialName',
|
|
|
|
title: '起运潜名',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'departurePotentialCode',
|
|
|
|
title: '起运潜代号',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'unifiedNumbering',
|
|
|
|
title: '统一编号',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'shipmentUsage',
|
|
|
|
title: '出货需录入使用量',
|
|
|
|
formatter: function (value, row, index) {
|
|
|
|
return $.table.selectDictLabel(shipmentUsageDatas, value);
|
|
|
|
},
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'voucherPreparation',
|
|
|
|
title: '制单人',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'identifyingPeople',
|
|
|
|
title: '确认人',
|
|
|
|
// visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'confirmTax',
|
|
|
|
title: '是否含税',
|
|
|
|
formatter: function (value, row, index) {
|
|
|
|
return $.table.selectDictLabel(confirmTaxDatas, value);
|
|
|
|
},
|
|
|
|
// visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'taxRate',
|
|
|
|
title: '税率',
|
|
|
|
// visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'countryNumber',
|
|
|
|
title: '国家/地区编号',
|
|
|
|
formatter: function (value, row, index) {
|
|
|
|
return $.table.selectDictLabel(countryNumberDatas, value);
|
|
|
|
},
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'firstAddTime',
|
|
|
|
title: '录入时间',
|
|
|
|
formatter: function (value, row, index) {
|
|
|
|
if (value == null) {
|
|
|
|
return " ";
|
|
|
|
} else {
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'updateInfoTime',
|
|
|
|
title: '上次修改时间',
|
|
|
|
formatter: function (value, row, index) {
|
|
|
|
if (value == null) {
|
|
|
|
return " ";
|
|
|
|
} else {
|
|
|
|
var vArr = value.split(',')
|
|
|
|
return vArr[0];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ,
|
|
|
|
// {
|
|
|
|
// title: '操作',
|
|
|
|
// align: 'center',
|
|
|
|
// formatter: function (value, row, index) {
|
|
|
|
// var actions = [];
|
|
|
|
// actions.push('<a class="btn btn-success btn-xs ' + tocontacts + '" href="javascript:void(0)" onclick="addContactsTwo(\'' + row.customerId + '\')"><i class="fa fa-plus"></i>联系人明细</a> ');
|
|
|
|
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.customerId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
|
|
|
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.customerId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
|
|
|
// return actions.join('');
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
]
|
|
|
|
};
|
|
|
|
$.table.init(options);
|
|
|
|
});
|
|
|
|
// 联系人
|
|
|
|
var prefix1 = ctx + "system/contacts"
|
|
|
|
$("#form-contacts-add").validate({
|
|
|
|
focusCleanup: true
|
|
|
|
});
|
|
|
|
|
|
|
|
function submitHandler() {
|
|
|
|
if ($.validate.form('form-contacts-add')) {
|
|
|
|
$.operate.save(prefix1 + "/add", $('#form-contacts-add').serialize());
|
|
|
|
$('#infoModal').modal("hide")
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// 列表联系人明细
|
|
|
|
function addContactsTwo(customerId) {
|
|
|
|
console.log(customerId)
|
|
|
|
$("input").val('')
|
|
|
|
var Alldata = $("#bootstrap-table").bootstrapTable('getData');
|
|
|
|
var data = '';
|
|
|
|
for (i = 0; i < Alldata.length; i++) {
|
|
|
|
if (Alldata[i].customerId == customerId) {
|
|
|
|
data = Alldata[i]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$("#infoModal input[name='enterpriseCode']").val(data.enterpriseCode)
|
|
|
|
$("#infoModal input[name='enterpriseName']").val(data.enterpriseName)
|
|
|
|
$("#infoModal").modal("show");
|
|
|
|
}
|
|
|
|
|
|
|
|
// 联系人明细
|
|
|
|
function addContacts() {
|
|
|
|
|
|
|
|
$("input").val('')
|
|
|
|
var data = $("#bootstrap-table").bootstrapTable("getSelections");
|
|
|
|
|
|
|
|
if (data.length == 1) {
|
|
|
|
$(" #infoModal input[name='enterpriseCode']").val(data[0].enterpriseCode)
|
|
|
|
$(" #infoModal input[name='enterpriseName']").val(data[0].enterpriseName)
|
|
|
|
$("#infoModal").modal("show");
|
|
|
|
} else {
|
|
|
|
$.modal.alert("请选择一条数据");
|
|
|
|
}
|
|
|
|
console.log(data)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// 送货地址
|
|
|
|
function showaddress() {
|
|
|
|
$("input").val('')
|
|
|
|
var data = $("#bootstrap-table").bootstrapTable("getSelections");
|
|
|
|
if (data.length == 1) {
|
|
|
|
$("#addressModal input[name='enterpriseCode']").val(data[0].enterpriseCode)
|
|
|
|
$("#addressModal input[name='enterpriseName']").val(data[0].enterpriseName)
|
|
|
|
$("#addressModal").modal("show");
|
|
|
|
} else {
|
|
|
|
$.modal.alert("请选择一条数据");
|
|
|
|
}
|
|
|
|
console.log(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
var prefix2 = ctx + "system/shippingaddress"
|
|
|
|
$("#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 showdetails() {
|
|
|
|
var data = $("#bootstrap-table").bootstrapTable("getSelections");
|
|
|
|
// var enterpriseCode=data[0].enterpriseCode;
|
|
|
|
// console.log(data.length,enterpriseCode)
|
|
|
|
if (data.length == 1) {
|
|
|
|
$("#enterpriseCode").val(data[0].enterpriseCode)
|
|
|
|
$("input[name='exportSales']").val(data[0].exportSales)
|
|
|
|
$("#enterpriseName").val(data[0].enterpriseName)
|
|
|
|
$("input[name='englishName']").val(data[0].englishName)
|
|
|
|
$("input[name='customerAddress']").val(data[0].customerAddress)
|
|
|
|
$("#deliveryAddress").val(data[0].deliveryAddress)
|
|
|
|
$("input[name='postalCode']").val(data[0].postalCode)
|
|
|
|
$("input[name='customerCountry']").val(data[0].customerCountry)
|
|
|
|
$("input[name='commonCurrency']").val(data[0].commonCurrency)
|
|
|
|
$("textarea[name='customerRemarks']").val(data[0].customerRemarks)
|
|
|
|
$("input[name='legalRepresentative']").val(data[0].legalRepresentative)
|
|
|
|
$("input[name='invoicingCustomerName']").val(data[0].invoicingCustomerName)
|
|
|
|
$("input[name='invoicingCompanyName']").val(data[0].invoicingCompanyName)
|
|
|
|
$("input[name='creditLimit']").val(data[0].creditLimit)
|
|
|
|
$("input[name='integrityRating']").val(data[0].integrityRating)
|
|
|
|
$("input[name='customerContact']").val(data[0].customerContact)
|
|
|
|
$("input[name='contactNumber']").val(data[0].contactNumber)
|
|
|
|
$("input[name='customerFax']").val(data[0].customerFax)
|
|
|
|
$("input[name='customerEmail']").val(data[0].customerEmail)
|
|
|
|
$("input[name='customerAbbreviation']").val(data[0].customerAbbreviation)
|
|
|
|
$("input[name='customsCode']").val(data[0].customsCode)
|
|
|
|
$("input[name='paymentTerms']").val(data[0].paymentTerms)
|
|
|
|
$("input[name='invoiceCode']").val(data[0].invoiceCode)
|
|
|
|
$("input[name='portOfDestination']").val(data[0].portOfDestination)
|
|
|
|
$("input[name='establishedTime']").val(data[0].establishedTime)
|
|
|
|
$("input[name='settlementBank']").val(data[0].settlementBank)
|
|
|
|
$("input[name='exchangeSettlementAccount']").val(data[0].exchangeSettlementAccount)
|
|
|
|
$("input[name='depositBank']").val(data[0].depositBank)
|
|
|
|
$("input[name='bankAccount']").val(data[0].bankAccount)
|
|
|
|
$("input[name='rmbRegisteredCapital']").val(data[0].rmbRegisteredCapital)
|
|
|
|
$("input[name='registeredCapital']").val(data[0].registeredCapital)
|
|
|
|
$("input[name='orderLength']").val(data[0].orderLength)
|
|
|
|
$("input[name='shippingTemplate']").val(data[0].shippingTemplate)
|
|
|
|
|
|
|
|
$("input[name='businessMembers']").val(data[0].businessMembers)
|
|
|
|
$("input[name='destinationPortCode']").val(data[0].destinationPortCode)
|
|
|
|
$("input[name='departurePotentialName']").val(data[0].departurePotentialName)
|
|
|
|
$("input[name='departurePotentialCode']").val(data[0].departurePotentialCode)
|
|
|
|
$("input[name='unifiedNumbering']").val(data[0].unifiedNumbering)
|
|
|
|
// $("input[name='shipmentUsage']").val(data[0].shipmentUsage)
|
|
|
|
$("input[name='voucherPreparation']").val(data[0].voucherPreparation)
|
|
|
|
$("input[name='identifyingPeople']").val(data[0].identifyingPeople)
|
|
|
|
// $("input[name='confirmTax']").val(data[0].confirmTax)
|
|
|
|
$("input[name='taxRate']").val(data[0].taxRate)
|
|
|
|
$("input[name='countryNumber']").val(data[0].countryNumber)
|
|
|
|
console.log(data[0].shipmentUsage)
|
|
|
|
console.log(data[0].confirmTax)
|
|
|
|
if (data[0].confirmTax == 1) {
|
|
|
|
$("input[name='confirmTax']").val("是")
|
|
|
|
|
|
|
|
} else {
|
|
|
|
$("input[name='confirmTax']").val("否")
|
|
|
|
|
|
|
|
}
|
|
|
|
if (data[0].shipmentUsage == 1) {
|
|
|
|
$("input[name='shipmentUsage']").val("是")
|
|
|
|
|
|
|
|
} else {
|
|
|
|
$("input[name='shipmentUsage']").val("否")
|
|
|
|
|
|
|
|
}
|
|
|
|
// 联系人
|
|
|
|
$('#contacts-table').bootstrapTable('destroy');
|
|
|
|
$('#contacts-table').bootstrapTable({
|
|
|
|
url: '/system/contacts/list',
|
|
|
|
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: data[0].enterpriseCode
|
|
|
|
|
|
|
|
};
|
|
|
|
console.log(data[0].enterpriseCode)
|
|
|
|
return curParams
|
|
|
|
},
|
|
|
|
columns: [
|
|
|
|
{
|
|
|
|
field: 'enterpriseCode',
|
|
|
|
title: '客户/企业代码',
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'enterpriseName',
|
|
|
|
title: '客户/企业名称',
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerName',
|
|
|
|
title: '姓名'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerPosition',
|
|
|
|
title: '职务'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerBirthday',
|
|
|
|
title: '生日'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'officeTelephone',
|
|
|
|
title: '办公电话'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'homePhone',
|
|
|
|
title: '家中电话'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'cellPhone',
|
|
|
|
title: '手机号'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerFax',
|
|
|
|
title: '传真'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'standbyTelephoneOne',
|
|
|
|
title: '备用电话1'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'standbyTelephoneTwo',
|
|
|
|
title: '备用电话2'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'commonEmail',
|
|
|
|
title: '常用Email'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'alternateEmail',
|
|
|
|
title: '备用Email'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerRemarks',
|
|
|
|
title: '备注'
|
|
|
|
},
|
|
|
|
]
|
|
|
|
});
|
|
|
|
|
|
|
|
// 送货地址
|
|
|
|
$('#address-table').bootstrapTable('destroy');
|
|
|
|
$('#address-table').bootstrapTable({
|
|
|
|
url: '/system/shippingaddress/addresslist',
|
|
|
|
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: data[0].enterpriseCode
|
|
|
|
|
|
|
|
};
|
|
|
|
console.log(data[0].enterpriseCode)
|
|
|
|
return curParams
|
|
|
|
},
|
|
|
|
columns: [
|
|
|
|
|
|
|
|
{
|
|
|
|
field: 'enterpriseCode',
|
|
|
|
title: '客户/企业代码',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'enterpriseName',
|
|
|
|
title: '客户/企业名称',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerPhone',
|
|
|
|
title: '联系人电话'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerName',
|
|
|
|
title: '联系人'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerNameTwo',
|
|
|
|
title: '联系人2'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'deliveryAddress',
|
|
|
|
title: '送货地址'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'plantArea',
|
|
|
|
title: '厂区'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'detailedDescription',
|
|
|
|
title: '详细描述'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'postalCode',
|
|
|
|
title: '邮编'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerFax',
|
|
|
|
title: '传真'
|
|
|
|
},
|
|
|
|
]
|
|
|
|
});
|
|
|
|
$("#detailsModal").modal("show");
|
|
|
|
} else {
|
|
|
|
$.modal.alert("请选择一条数据");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function close() {
|
|
|
|
$("#detailsModal").modal("hide");
|
|
|
|
$(this).removeData("modal");
|
|
|
|
}
|
|
|
|
|
|
|
|
// 双击打开详情审核
|
|
|
|
$('#bootstrap-table').on('dbl-click-row.bs.table', function (e, row, index) {
|
|
|
|
$("#enterpriseCode").val(row.enterpriseCode)
|
|
|
|
$("input[name='exportSales']").val(row.exportSales)
|
|
|
|
$("#enterpriseName").val(row.enterpriseName)
|
|
|
|
$("input[name='englishName']").val(row.englishName)
|
|
|
|
$("input[name='customerAddress']").val(row.customerAddress)
|
|
|
|
$("#deliveryAddress").val(row.deliveryAddress)
|
|
|
|
$("input[name='postalCode']").val(row.postalCode)
|
|
|
|
$("input[name='customerCountry']").val(row.customerCountry)
|
|
|
|
$("input[name='commonCurrency']").val(row.commonCurrency)
|
|
|
|
$("textarea[name='customerRemarks']").val(row.customerRemarks)
|
|
|
|
$("input[name='legalRepresentative']").val(row.legalRepresentative)
|
|
|
|
$("input[name='invoicingCustomerName']").val(row.invoicingCustomerName)
|
|
|
|
$("input[name='invoicingCompanyName']").val(row.invoicingCompanyName)
|
|
|
|
$("input[name='creditLimit']").val(row.creditLimit)
|
|
|
|
$("input[name='integrityRating']").val(row.integrityRating)
|
|
|
|
$("input[name='customerContact']").val(row.customerContact)
|
|
|
|
$("input[name='contactNumber']").val(row.contactNumber)
|
|
|
|
$("input[name='customerFax']").val(row.customerFax)
|
|
|
|
$("input[name='customerEmail']").val(row.customerEmail)
|
|
|
|
$("input[name='customerAbbreviation']").val(row.customerAbbreviation)
|
|
|
|
$("input[name='customsCode']").val(row.customsCode)
|
|
|
|
$("input[name='paymentTerms']").val(row.paymentTerms)
|
|
|
|
$("input[name='invoiceCode']").val(row.invoiceCode)
|
|
|
|
$("input[name='portOfDestination']").val(row.portOfDestination)
|
|
|
|
$("input[name='establishedTime']").val(row.establishedTime)
|
|
|
|
$("input[name='settlementBank']").val(row.settlementBank)
|
|
|
|
$("input[name='exchangeSettlementAccount']").val(row.exchangeSettlementAccount)
|
|
|
|
$("input[name='depositBank']").val(row.depositBank)
|
|
|
|
$("input[name='bankAccount']").val(row.bankAccount)
|
|
|
|
$("input[name='rmbRegisteredCapital']").val(row.rmbRegisteredCapital)
|
|
|
|
$("input[name='registeredCapital']").val(row.registeredCapital)
|
|
|
|
$("input[name='orderLength']").val(row.orderLength)
|
|
|
|
$("input[name='shippingTemplate']").val(row.shippingTemplate)
|
|
|
|
|
|
|
|
$("input[name='businessMembers']").val(row.businessMembers)
|
|
|
|
$("input[name='destinationPortCode']").val(row.destinationPortCode)
|
|
|
|
$("input[name='departurePotentialName']").val(row.departurePotentialName)
|
|
|
|
$("input[name='departurePotentialCode']").val(row.departurePotentialCode)
|
|
|
|
$("input[name='unifiedNumbering']").val(row.unifiedNumbering)
|
|
|
|
// $("input[name='shipmentUsage']").val(data[0].shipmentUsage)
|
|
|
|
$("input[name='voucherPreparation']").val(row.voucherPreparation)
|
|
|
|
$("input[name='identifyingPeople']").val(row.identifyingPeople)
|
|
|
|
// $("input[name='confirmTax']").val(data[0].confirmTax)
|
|
|
|
$("input[name='taxRate']").val(row.taxRate)
|
|
|
|
$("input[name='countryNumber']").val(row.countryNumber)
|
|
|
|
// console.log(row.shipmentUsage)
|
|
|
|
// console.log(row.confirmTax)
|
|
|
|
if (row.confirmTax == 1) {
|
|
|
|
$("input[name='confirmTax']").val("是")
|
|
|
|
|
|
|
|
} else {
|
|
|
|
$("input[name='confirmTax']").val("否")
|
|
|
|
|
|
|
|
}
|
|
|
|
if (row.shipmentUsage == 1) {
|
|
|
|
$("input[name='shipmentUsage']").val("是")
|
|
|
|
|
|
|
|
} else {
|
|
|
|
$("input[name='shipmentUsage']").val("否")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// 联系人
|
|
|
|
$('#contacts-table').bootstrapTable('destroy');
|
|
|
|
$('#contacts-table').bootstrapTable({
|
|
|
|
url: '/system/contacts/list',
|
|
|
|
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: 'enterpriseCode',
|
|
|
|
title: '客户/企业代码',
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'enterpriseName',
|
|
|
|
title: '客户/企业名称',
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerName',
|
|
|
|
title: '姓名'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerPosition',
|
|
|
|
title: '职务'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerBirthday',
|
|
|
|
title: '生日'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'officeTelephone',
|
|
|
|
title: '办公电话'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'homePhone',
|
|
|
|
title: '家中电话'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'cellPhone',
|
|
|
|
title: '手机号'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerFax',
|
|
|
|
title: '传真'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'standbyTelephoneOne',
|
|
|
|
title: '备用电话1'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'standbyTelephoneTwo',
|
|
|
|
title: '备用电话2'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'commonEmail',
|
|
|
|
title: '常用Email'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'alternateEmail',
|
|
|
|
title: '备用Email'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerRemarks',
|
|
|
|
title: '备注'
|
|
|
|
},
|
|
|
|
]
|
|
|
|
});
|
|
|
|
|
|
|
|
// 送货地址
|
|
|
|
$('#address-table').bootstrapTable('destroy');
|
|
|
|
$('#address-table').bootstrapTable({
|
|
|
|
url: '/system/shippingaddress/addresslist',
|
|
|
|
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: 'enterpriseCode',
|
|
|
|
title: '客户/企业代码',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'enterpriseName',
|
|
|
|
title: '客户/企业名称',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerPhone',
|
|
|
|
title: '联系人电话'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerName',
|
|
|
|
title: '联系人'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerNameTwo',
|
|
|
|
title: '联系人2'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'deliveryAddress',
|
|
|
|
title: '送货地址'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'plantArea',
|
|
|
|
title: '厂区'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'detailedDescription',
|
|
|
|
title: '详细描述'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'postalCode',
|
|
|
|
title: '邮编'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerFax',
|
|
|
|
title: '传真'
|
|
|
|
},
|
|
|
|
]
|
|
|
|
});
|
|
|
|
$("#detailsModal").modal("show");
|
|
|
|
})
|
|
|
|
|
|
|
|
//导出
|
|
|
|
function exportCustomerInfo() {
|
|
|
|
// rows为选中行的id
|
|
|
|
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
|
|
|
|
//选择的行数据
|
|
|
|
var selectData = $("#bootstrap-table").bootstrapTable("getSelections")
|
|
|
|
// console.log(JSON.stringify(selectData))
|
|
|
|
// console.log(selectData)
|
|
|
|
|
|
|
|
if (rows.length !== 1) {
|
|
|
|
$.modal.alert("请选择一条记录");
|
|
|
|
return;
|
|
|
|
} else {
|
|
|
|
$.modal.confirm("是否确认要导出本条信息?", function (){
|
|
|
|
axios({
|
|
|
|
url: prefix + '/exportCustomerInfo',
|
|
|
|
data:{
|
|
|
|
selectData:JSON.stringify(selectData)
|
|
|
|
},
|
|
|
|
method: 'POST',
|
|
|
|
responseType: 'blob'
|
|
|
|
}).then(response => {
|
|
|
|
// console.log(response)
|
|
|
|
// console.log(response.data)
|
|
|
|
const URL = window.URL.createObjectURL(response.data)
|
|
|
|
// 创建隐藏<a>标签进行下载
|
|
|
|
const tempLink = document.createElement('a')
|
|
|
|
tempLink.style.display = 'none'
|
|
|
|
tempLink.href = URL
|
|
|
|
let time = new Date().toLocaleString()
|
|
|
|
tempLink.setAttribute('download', time + "客户基本信息.xlsx")
|
|
|
|
if (typeof tempLink.download === 'undefined') {
|
|
|
|
tempLink.setAttribute('target', '_blank')
|
|
|
|
}
|
|
|
|
document.body.appendChild(tempLink)
|
|
|
|
tempLink.click()
|
|
|
|
document.body.removeChild(tempLink)// 移除dom元素
|
|
|
|
window.URL.revokeObjectURL(URL)//释放内存
|
|
|
|
})
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|