|
|
|
<!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('销售对账列表')"/>
|
|
|
|
<th:block th:include="include :: datetimepicker-css"/>
|
|
|
|
<style>
|
|
|
|
.table-striped {
|
|
|
|
border: 0px !important;
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<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 class="select-time">
|
|
|
|
<label>创建时间: </label>
|
|
|
|
<input type="text" class="time-input" id="startTime" placeholder="开始时间"
|
|
|
|
name="params[beginTime]"/>
|
|
|
|
<span>-</span>
|
|
|
|
<input type="text" class="time-input" id="endTime" placeholder="结束时间"
|
|
|
|
name="params[endTime]"/>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<label>订单号码:</label>
|
|
|
|
<input type="text" name="salesOrderNumber"/>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<label>客户代码:</label>
|
|
|
|
<select name="enterpriseCode">
|
|
|
|
<option value="">所有</option>
|
|
|
|
</select>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<label>客户名称:</label>
|
|
|
|
<select name="enterpriseName">
|
|
|
|
<option value="">所有</option>
|
|
|
|
</select>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<label>客户使用否:</label>
|
|
|
|
<select name="customerUseOrNot" th:with="type=${@dict.getType('sys_whether')}">
|
|
|
|
<option value="">所有</option>
|
|
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
|
|
|
th:value="${dict.dictValue}"></option>
|
|
|
|
</select>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<label>对账否:</label>
|
|
|
|
<select name="accountReconciliationOrNot" th:with="type=${@dict.getType('sys_whether')}">
|
|
|
|
<option value="">所有</option>
|
|
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
|
|
|
th:value="${dict.dictValue}"></option>
|
|
|
|
</select>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<label>是否开国税发票:</label>
|
|
|
|
<select name="nationalTaxBill" th:with="type=${@dict.getType('sys_whether')}">
|
|
|
|
<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="finishProductCode"/>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<label>成品名称:</label>
|
|
|
|
<input type="text" name="finishProductName"/>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="searchAll()"><i
|
|
|
|
class="fa fa-search"></i> 搜索</a>
|
|
|
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="resetAll()"><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="salesAccountReconciliation:salesAccountReconciliation:add">-->
|
|
|
|
<!-- <i class="fa fa-plus"></i> 添加-->
|
|
|
|
<!-- </a>-->
|
|
|
|
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="salesAccountReconciliation:salesAccountReconciliation:edit">-->
|
|
|
|
<!-- <i class="fa fa-edit"></i> 修改-->
|
|
|
|
<!-- </a>-->
|
|
|
|
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="salesAccountReconciliation:salesAccountReconciliation:remove">-->
|
|
|
|
<!-- <i class="fa fa-remove"></i> 删除-->
|
|
|
|
<!-- </a>-->
|
|
|
|
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="salesAccountReconciliation:salesAccountReconciliation:export">-->
|
|
|
|
<!-- <i class="fa fa-download"></i> 导出-->
|
|
|
|
<!-- </a>-->
|
|
|
|
<b>销售信息</b>
|
|
|
|
<a class="btn btn-success" onclick="confirmAccountReconciliation()"
|
|
|
|
shiro:hasPermission="salesAccountReconciliation:salesAccountReconciliation:confirm">
|
|
|
|
<i class="fa fa-hand-grab-o"></i> 销售对账确认
|
|
|
|
</a>
|
|
|
|
<a class="btn btn-success" onclick="confirmCustomerUse()"
|
|
|
|
shiro:hasPermission="salesAccountReconciliation:salesAccountReconciliation:customConfirm">
|
|
|
|
<i class="fa fa-hand-grab-o"></i> 客户使用确认
|
|
|
|
</a>
|
|
|
|
<a class="btn btn-warning" onclick="$.table.exportExcel()"
|
|
|
|
shiro:hasPermission="salesAccountReconciliation:salesAccountReconciliation:export">
|
|
|
|
<i class="fa fa-download"></i> 导出
|
|
|
|
</a>
|
|
|
|
<!-- <a class="btn btn-primary" onclick="toNationalTaxBill()">-->
|
|
|
|
<!-- <i class="fa fa-file-text"></i> 开国税发票-->
|
|
|
|
<!-- </a>-->
|
|
|
|
</div>
|
|
|
|
<div class="btn-group-sm" id="toolbar1" role="group">
|
|
|
|
<b>退货信息</b>
|
|
|
|
<a class="btn btn-success" onclick="confirmRGAccountReconciliation()"
|
|
|
|
shiro:hasPermission="salesAccountReconciliation:salesAccountReconciliation:returnConfirm">
|
|
|
|
<i class="fa fa-hand-grab-o"></i> 退货对账确认
|
|
|
|
</a>
|
|
|
|
<a class="btn btn-warning" onclick="exportRGExcel('formId')">
|
|
|
|
<i class="fa fa-download"></i> 导出
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-sm-12 select-table table-striped" style="white-space: nowrap;">
|
|
|
|
<table id="bootstrap-table"></table>
|
|
|
|
<table id="bootstrap-table1"></table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!--销售对账确认-->
|
|
|
|
<div class="modal fade" id="accountReconciliationModal" tabindex="-1"
|
|
|
|
role="dilog" aria-hidden="true">
|
|
|
|
<div class="modal-dialog" style="width: 500px;max-height: 800px; background-color: #FFFFFF">
|
|
|
|
<div class="modal-content" style="background-color: #FFFFFF">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
|
|
|
|
aria-hidden="true">×</span></button>
|
|
|
|
<h4 class="modal-title">销售对账确认</h4>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body" style="height: 180px">
|
|
|
|
<form id="form-accountReconciliation-edit">
|
|
|
|
<div class="form-group" style="display: none">
|
|
|
|
<label class="col-sm-3 control-label is-required">订单id:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input id="salesFinishId" name="salesFinishId" class="form-control" type="text" required
|
|
|
|
readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">对账否:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<select id="accountReconciliationOrNot" name="accountReconciliationOrNot"
|
|
|
|
class="form-control" th:with="type=${@dict.getType('sys_whether')}">
|
|
|
|
<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="accountReconciliationPerson" name="accountReconciliationPerson"
|
|
|
|
class="form-control" type="text">
|
|
|
|
</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="accountReconciliationTime" name="accountReconciliationTime"
|
|
|
|
class="form-control" placeholder="yyyy-mm-dd hh:ii:ss" type="text">
|
|
|
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
|
|
|
|
<button type="button" class="btn btn-success" onclick="updateAccountReconciliation()">确认</button>
|
|
|
|
<!-- <button type="button" class="btn btn-default" data-dismiss="modal" onclick="closeAccountReconciliationModal()">关闭</button>-->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!--客户使用确认-->
|
|
|
|
<div class="modal fade" id="customerUseModal" tabindex="-1"
|
|
|
|
role="dilog" aria-hidden="true">
|
|
|
|
<div class="modal-dialog" style="width: 500px;max-height: 800px; background-color: #FFFFFF">
|
|
|
|
<div class="modal-content" style="background-color: #FFFFFF">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
|
|
|
|
aria-hidden="true">×</span></button>
|
|
|
|
<h4 class="modal-title">客户使用确认</h4>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body" style="height: 300px">
|
|
|
|
<form id="form-customerUse-edit">
|
|
|
|
<div class="form-group" style="display: none">
|
|
|
|
<label class="col-sm-4 control-label is-required">订单id:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input id="salesFinishId1" name="salesFinishId" class="form-control" type="text" required
|
|
|
|
readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-4 control-label is-required">订单编号:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input id="salesOrderCode" name="salesOrderCode" class="form-control" type="text" required>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-4 control-label is-required">成品代码:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input id="finishProductCode" name="finishProductCode" class="form-control" type="text"
|
|
|
|
required>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-4 control-label is-required">成品名称:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input id="finishProductName" name="finishProductName" class="form-control" type="text"
|
|
|
|
required>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-4 control-label">客户使用否:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<select id="customerUseOrNot" name="customerUseOrNot" class="form-control"
|
|
|
|
th:with="type=${@dict.getType('sys_whether')}">
|
|
|
|
<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-4 control-label">客户使用数量:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input id="customerUseQuantity" name="customerUseQuantity" class="form-control" type="text">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-4 control-label">备注:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<!-- <input id="customerUseRemarks" name="customerUseRemarks" class="form-control" type="text">-->
|
|
|
|
<textarea id="customerUseRemarks" name="customerUseRemarks" style="width: 100%;"
|
|
|
|
rows="4"></textarea>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
|
|
|
|
<button type="button" class="btn btn-success" onclick="updateCustomerUse()">客户使用确认</button>
|
|
|
|
<!-- <button type="button" class="btn btn-default" data-dismiss="modal" onclick="closeAccountReconciliationModal()">关闭</button>-->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!--退货对账确认-->
|
|
|
|
<div class="modal fade" id="RGAccountReconciliationModal" tabindex="-1"
|
|
|
|
role="dilog" aria-hidden="true">
|
|
|
|
<div class="modal-dialog" style="width: 500px;max-height: 800px; background-color: #FFFFFF">
|
|
|
|
<div class="modal-content" style="background-color: #FFFFFF">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
|
|
|
|
aria-hidden="true">×</span></button>
|
|
|
|
<h4 class="modal-title">退货对账确认</h4>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body" style="height: 180px">
|
|
|
|
<form id="form-rgAccountReconciliation-edit">
|
|
|
|
<div class="form-group" style="display: none">
|
|
|
|
<label class="col-sm-3 control-label is-required">退货产品id:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input id="returnGoodsProductId" name="returnGoodsProductId" class="form-control"
|
|
|
|
type="text" required
|
|
|
|
readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">对账否:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<select id="accountReconciliationOrNot1" name="accountReconciliationOrNot"
|
|
|
|
class="form-control" th:with="type=${@dict.getType('sys_whether')}">
|
|
|
|
<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="accountReconciliationPerson1" name="accountReconciliationPerson"
|
|
|
|
class="form-control" type="text">
|
|
|
|
</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="accountReconciliationTime1" name="accountReconciliationTime"
|
|
|
|
class="form-control" placeholder="yyyy-mm-dd hh:ii:ss" type="text">
|
|
|
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
|
|
|
|
<button type="button" class="btn btn-success" onclick="updateRGAccountReconciliation()">确认</button>
|
|
|
|
<!-- <button type="button" class="btn btn-default" data-dismiss="modal" onclick="closeAccountReconciliationModal()">关闭</button>-->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<th:block th:include="include :: footer"/>
|
|
|
|
<th:block th:include="include :: datetimepicker-js"/>
|
|
|
|
<script th:inline="javascript">
|
|
|
|
var editFlag = [[${@permission.hasPermi('sales:salesAccountReconciliation:edit')}]];
|
|
|
|
var removeFlag = [[${@permission.hasPermi('sales:salesAccountReconciliation:remove')}]];
|
|
|
|
var customerUseOrNotDatas = [[${@dict.getType('sys_whether')}]];
|
|
|
|
var accountReconciliationOrNotDatas = [[${@dict.getType('sys_whether')}]];
|
|
|
|
var nationalTaxBillDatas = [[${@dict.getType('sys_whether')}]];
|
|
|
|
var closeCaseOrNotDatas = [[${@dict.getType('sys_whether')}]];
|
|
|
|
var inventoryUnitDatas = [[${@dict.getType('sys_unit_class')}]];
|
|
|
|
var commonCurrencyDatas = [[${@dict.getType('sys_coin_class')}]];
|
|
|
|
var prefix = ctx + "sales/salesAccountReconciliation";
|
|
|
|
var prefix1 = ctx + "returnGoods/returnGoodsProduct";
|
|
|
|
|
|
|
|
$(function () {
|
|
|
|
/*显示销售列表数据*/
|
|
|
|
var options = {
|
|
|
|
id: "bootstrap-table",
|
|
|
|
formId: "formId",
|
|
|
|
toolbar: "toolbar",
|
|
|
|
url: prefix + '/list',
|
|
|
|
exportUrl: prefix + '/export',
|
|
|
|
clickToSelect: true,
|
|
|
|
modalName: "销售对账",
|
|
|
|
columns: [{
|
|
|
|
checkbox: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'accountReconciliationOrNot',
|
|
|
|
title: '对账否',
|
|
|
|
formatter: function (value, row, index) {
|
|
|
|
// return $.table.selectDictLabel(accountReconciliationOrNotDatas, value);
|
|
|
|
var actions = [];
|
|
|
|
if ($.table.selectDictLabel(accountReconciliationOrNotDatas, value) == "<span class=''>是</span>") {
|
|
|
|
actions.push('<a class="btn btn-primary btn-xs disabled">已对账</a> ');
|
|
|
|
} else {
|
|
|
|
actions.push('<a class="btn btn-danger btn-xs disabled">未对账</a> ');
|
|
|
|
}
|
|
|
|
return actions.join('');
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'salesFinishId',
|
|
|
|
title: '订单id',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'salesOrderCode',
|
|
|
|
title: '订单编号',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'salesOrderNumber',
|
|
|
|
title: '订单号码'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'appointmentNumber',
|
|
|
|
title: '预约单号',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'enterpriseCode',
|
|
|
|
title: '客户代码'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'enterpriseName',
|
|
|
|
title: '客户名称'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'finishProductCode',
|
|
|
|
title: '成品代码'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'finishProductName',
|
|
|
|
title: '成品名称'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'paymentTerms',
|
|
|
|
title: '付款条件',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'deliveryConditions',
|
|
|
|
title: '交货条件',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'deliveryMethod',
|
|
|
|
title: '交货方式',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'orderReceivingMode',
|
|
|
|
title: '接单方式',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerContact',
|
|
|
|
title: '联系人'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerFactory',
|
|
|
|
title: '客户厂区',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'contactNumber',
|
|
|
|
title: '联系电话',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'businessMembers',
|
|
|
|
title: '业务人员',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerFax',
|
|
|
|
title: '传真号码',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'deliveryAddress',
|
|
|
|
title: '交货地点',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'orderReceivingTime',
|
|
|
|
title: '接单日期',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'billingTime',
|
|
|
|
title: '开单日期时间',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerRemarks',
|
|
|
|
title: '备注内容',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'currentInventory',
|
|
|
|
title: '当前库存数',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'creditLimit',
|
|
|
|
title: '信用额度',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'unpaidAmount',
|
|
|
|
title: '未付款数',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'availableCredit',
|
|
|
|
title: '可用额度',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'confirmTax',
|
|
|
|
title: '是否含税',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'taxRate',
|
|
|
|
title: '税率',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'totalAmount',
|
|
|
|
title: '合计金额',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'modificationTime',
|
|
|
|
title: '修改日期',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'confirmTime',
|
|
|
|
title: '确认日期',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'confirmNo',
|
|
|
|
title: '确认否',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'confirmName',
|
|
|
|
title: '确认人',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'auditNo',
|
|
|
|
title: '审核否',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'auditName',
|
|
|
|
title: '审核人',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'auditTime',
|
|
|
|
title: '审核时间',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'auditRemarks',
|
|
|
|
title: '审核备注',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerUseOrNot',
|
|
|
|
title: '客户使用否',
|
|
|
|
formatter: function (value, row, index) {
|
|
|
|
return $.table.selectDictLabel(customerUseOrNotDatas, value);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerUseQuantity',
|
|
|
|
title: '客户使用数量',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerUseRemarks',
|
|
|
|
title: '客户使用备注说明',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'accountReconciliationPerson',
|
|
|
|
title: '对账人'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'accountReconciliationTime',
|
|
|
|
title: '对账时间'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'nationalTaxBill',
|
|
|
|
title: '是否开国税发票',
|
|
|
|
formatter: function (value, row, index) {
|
|
|
|
return $.table.selectDictLabel(nationalTaxBillDatas, value);
|
|
|
|
},
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'specificationModel',
|
|
|
|
title: '规格型号',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'typeMachine',
|
|
|
|
title: '机种',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'inventoryUnit',
|
|
|
|
title: '单位'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'stockUnitWeight',
|
|
|
|
title: '重量',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'processPrice',
|
|
|
|
title: '单价'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'productQuantity',
|
|
|
|
title: '数量'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'amountMoney',
|
|
|
|
title: '金额'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'deliveryTime',
|
|
|
|
title: '交期',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'line',
|
|
|
|
title: 'Line#',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'versionNumber',
|
|
|
|
title: '版本号',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'salesExplain',
|
|
|
|
title: '说明',
|
|
|
|
visible: false
|
|
|
|
}]
|
|
|
|
};
|
|
|
|
$.table.init(options);
|
|
|
|
|
|
|
|
/*显示退货列表数据*/
|
|
|
|
var options1 = {
|
|
|
|
id: "bootstrap-table1",
|
|
|
|
url: prefix1 + "/list",
|
|
|
|
exportUrl: prefix1 + '/export',
|
|
|
|
formId: "formId",
|
|
|
|
toolbar: "toolbar1",
|
|
|
|
clickToSelect: true,
|
|
|
|
modalName: "退货对账",
|
|
|
|
columns: [{
|
|
|
|
checkbox: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'accountReconciliationOrNot',
|
|
|
|
title: '对账否',
|
|
|
|
formatter: function (value, row, index) {
|
|
|
|
// return $.table.selectDictLabel(accountReconciliationOrNotDatas, value);
|
|
|
|
var actions = [];
|
|
|
|
if ($.table.selectDictLabel(accountReconciliationOrNotDatas, value) == "<span class=''>是</span>") {
|
|
|
|
actions.push('<a class="btn btn-primary btn-xs disabled">已对账</a> ');
|
|
|
|
} else {
|
|
|
|
actions.push('<a class="btn btn-danger btn-xs disabled">未对账</a> ');
|
|
|
|
}
|
|
|
|
return actions.join('');
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'returnGoodsProductId',
|
|
|
|
title: '退货产品id',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'returnGoodsNumber',
|
|
|
|
title: '退货单号'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'orderNumber',
|
|
|
|
title: '订单号'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'finishProductCode',
|
|
|
|
title: '成品代码'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'finishProductName',
|
|
|
|
title: '成品名称'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'specificationModel',
|
|
|
|
title: '规格型号'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'typeMachine',
|
|
|
|
title: '机种'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'inventoryUnit',
|
|
|
|
title: '单位',
|
|
|
|
formatter: function (value, row, index) {
|
|
|
|
return $.table.selectDictLabel(inventoryUnitDatas, value);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'commonCurrency',
|
|
|
|
title: '币别',
|
|
|
|
formatter: function (value, row, index) {
|
|
|
|
return $.table.selectDictLabel(commonCurrencyDatas, value);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'processPrice',
|
|
|
|
title: '单价'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'taxRate',
|
|
|
|
title: '税率',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'priceExcludingTax',
|
|
|
|
title: '不含税价',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'priceIncludingTax',
|
|
|
|
title: '含税价',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'quantity',
|
|
|
|
title: '数量'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'amountOfMoney',
|
|
|
|
title: '金额'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'deliveryDate',
|
|
|
|
title: '交期',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'batchNumber',
|
|
|
|
title: '批号',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'description',
|
|
|
|
title: '说明',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'completedQuantity',
|
|
|
|
title: '完成数量',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'incompletedQuantity',
|
|
|
|
title: '欠单数量',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'piNo',
|
|
|
|
title: 'pi_no',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'accountReconciliationPerson',
|
|
|
|
title: '对账人'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'accountReconciliationTime',
|
|
|
|
title: '对账时间'
|
|
|
|
}
|
|
|
|
// ,
|
|
|
|
// {
|
|
|
|
// title: '操作',
|
|
|
|
// align: 'center',
|
|
|
|
// formatter: function(value, row, index) {
|
|
|
|
// var actions = [];
|
|
|
|
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.returnGoodsProductId + '\')"><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.returnGoodsProductId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
|
|
|
// return actions.join('');
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
]
|
|
|
|
}
|
|
|
|
$.table.init(options1);
|
|
|
|
|
|
|
|
/*获取客户信息*/
|
|
|
|
getCustomerList();
|
|
|
|
});
|
|
|
|
|
|
|
|
/*表单搜索*/
|
|
|
|
function searchAll() {
|
|
|
|
$.table.search('formId', 'bootstrap-table');
|
|
|
|
$.table.search('formId', 'bootstrap-table1');
|
|
|
|
}
|
|
|
|
|
|
|
|
/*表单重置*/
|
|
|
|
function resetAll() {
|
|
|
|
$.form.reset('formId', 'bootstrap-table');
|
|
|
|
$.form.reset('formId', 'bootstrap-table1');
|
|
|
|
}
|
|
|
|
|
|
|
|
/*获取客户信息*/
|
|
|
|
function getCustomerList() {
|
|
|
|
$.ajax({
|
|
|
|
url: prefix + "/getCustomerList",
|
|
|
|
type: "POST",
|
|
|
|
success: function (res) {
|
|
|
|
//console.log(res)
|
|
|
|
if (res.length > 0) {
|
|
|
|
customerListData = res;
|
|
|
|
//alert(JSON.stringify(data));
|
|
|
|
for (let i in customerListData) {
|
|
|
|
$("select[name='enterpriseCode']").append("<option value='" + customerListData[i].enterpriseCode + "'>" + customerListData[i].enterpriseCode + "</option>");
|
|
|
|
$("select[name='enterpriseName']").append("<option value='" + customerListData[i].enterpriseName + "'>" + customerListData[i].enterpriseName + "</option>");
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
$.modal.msgError(res.msg);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
error: function () {
|
|
|
|
$.modal.msgError("后台出错啦!");
|
|
|
|
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
/*销售对账确认*/
|
|
|
|
function confirmAccountReconciliation() {
|
|
|
|
let data = $("#bootstrap-table").bootstrapTable("getSelections");
|
|
|
|
// console.log(data)
|
|
|
|
let userName = [[${@permission.getPrincipalProperty('userName')}]];
|
|
|
|
if (data.length === 1) {
|
|
|
|
$("#salesFinishId").val(data[0].salesFinishId)
|
|
|
|
$("#accountReconciliationOrNot").val(1).trigger("change")
|
|
|
|
$("#accountReconciliationPerson").val(userName)
|
|
|
|
$("#accountReconciliationTime").datetimepicker("setDate", new Date());
|
|
|
|
$("#accountReconciliationModal").modal("show");
|
|
|
|
// console.log(userName)
|
|
|
|
} else {
|
|
|
|
$.modal.alertWarning("请选择一条数据")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*销售对账确认提交*/
|
|
|
|
function updateAccountReconciliation() {
|
|
|
|
let data = $('#form-accountReconciliation-edit').serialize();
|
|
|
|
// console.log(data)
|
|
|
|
$.ajax({
|
|
|
|
url: prefix + "/edit",
|
|
|
|
type: "post",
|
|
|
|
resultType: "json",
|
|
|
|
data: data,
|
|
|
|
success: function (resp) {
|
|
|
|
// console.log(resp)
|
|
|
|
$("#bootstrap-table").bootstrapTable('refresh');
|
|
|
|
$.modal.msgSuccess("对账确认完成!")
|
|
|
|
$("#accountReconciliationModal").modal("hide");
|
|
|
|
},
|
|
|
|
error: function () {
|
|
|
|
$.modal.msgError("出错了!");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/*客户使用确认*/
|
|
|
|
function confirmCustomerUse() {
|
|
|
|
let data = $("#bootstrap-table").bootstrapTable("getSelections");
|
|
|
|
// console.log(data)
|
|
|
|
if (data.length === 1) {
|
|
|
|
$("#salesFinishId1").val(data[0].salesFinishId)
|
|
|
|
$("#salesOrderCode").val(data[0].salesOrderCode)
|
|
|
|
$("#finishProductCode").val(data[0].finishProductCode)
|
|
|
|
$("#finishProductName").val(data[0].finishProductName)
|
|
|
|
$("#customerUseOrNot").val(1).trigger("change")
|
|
|
|
$("#customerUseModal").modal("show");
|
|
|
|
// console.log(userName)
|
|
|
|
} else {
|
|
|
|
$.modal.alertWarning("请选择一条数据")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*客户确认提交*/
|
|
|
|
function updateCustomerUse() {
|
|
|
|
// $.modal.msgWarning("111")
|
|
|
|
let data = $('#form-customerUse-edit').serialize();
|
|
|
|
// console.log(data)
|
|
|
|
$.ajax({
|
|
|
|
url: prefix + "/edit",
|
|
|
|
type: "post",
|
|
|
|
resultType: "json",
|
|
|
|
data: data,
|
|
|
|
success: function (resp) {
|
|
|
|
console.log(resp)
|
|
|
|
$("#bootstrap-table").bootstrapTable('refresh');
|
|
|
|
$.modal.msgSuccess("客户确认完成!")
|
|
|
|
$("#customerUseModal").modal("hide");
|
|
|
|
},
|
|
|
|
error: function () {
|
|
|
|
$.modal.msgError("出错了!");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/*退货对账确认*/
|
|
|
|
function confirmRGAccountReconciliation() {
|
|
|
|
let data = $("#bootstrap-table1").bootstrapTable("getSelections");
|
|
|
|
// console.log(data)
|
|
|
|
let userName = [[${@permission.getPrincipalProperty('userName')}]];
|
|
|
|
if (data.length === 1) {
|
|
|
|
$("#returnGoodsProductId").val(data[0].returnGoodsProductId)
|
|
|
|
$("#accountReconciliationOrNot1").val(1).trigger("change")
|
|
|
|
$("#accountReconciliationPerson1").val(userName)
|
|
|
|
$("#accountReconciliationTime1").datetimepicker("setDate", new Date());
|
|
|
|
$("#RGAccountReconciliationModal").modal("show");
|
|
|
|
// console.log(userName)
|
|
|
|
} else {
|
|
|
|
$.modal.alertWarning("请选择一条数据")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*退货对账确认提交*/
|
|
|
|
function updateRGAccountReconciliation() {
|
|
|
|
let data = $('#form-rgAccountReconciliation-edit').serialize();
|
|
|
|
// console.log(data)
|
|
|
|
$.ajax({
|
|
|
|
url: prefix1 + "/edit",
|
|
|
|
type: "post",
|
|
|
|
resultType: "json",
|
|
|
|
data: data,
|
|
|
|
success: function (resp) {
|
|
|
|
// console.log(resp)
|
|
|
|
$("#bootstrap-table1").bootstrapTable('refresh');
|
|
|
|
$.modal.msgSuccess("对账确认完成!")
|
|
|
|
$("#RGAccountReconciliationModal").modal("hide");
|
|
|
|
},
|
|
|
|
error: function () {
|
|
|
|
$.modal.msgError("出错了!");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/*退货对账导出*/
|
|
|
|
function exportRGExcel(formId) {
|
|
|
|
table.set();
|
|
|
|
// console.log(table)
|
|
|
|
$.modal.confirm("确定导出所有" + table.options.modalName + "吗?", function () {
|
|
|
|
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
|
|
|
|
var params = $("#" + table.options.id).bootstrapTable('getOptions');
|
|
|
|
var dataParam = $("#" + currentId).serializeArray();
|
|
|
|
dataParam.push({"name": "orderByColumn", "value": params.sortName});
|
|
|
|
dataParam.push({"name": "isAsc", "value": params.sortOrder});
|
|
|
|
$.modal.loading("正在导出数据,请稍后...");
|
|
|
|
$.post(table.options.exportUrl, dataParam, function (result) {
|
|
|
|
if (result.code == web_status.SUCCESS) {
|
|
|
|
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
|
|
|
|
} else if (result.code == web_status.WARNING) {
|
|
|
|
$.modal.alertWarning(result.msg)
|
|
|
|
} else {
|
|
|
|
$.modal.alertError(result.msg);
|
|
|
|
}
|
|
|
|
$.modal.closeLoading();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|