|
|
|
<!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"/>
|
|
|
|
<script type="text/javascript" th:src="@{/js/axios.min.js}"></script>
|
|
|
|
|
|
|
|
</head>
|
|
|
|
<style>
|
|
|
|
.division {
|
|
|
|
width: 100%;
|
|
|
|
border-bottom: 1px solid #f1ecec;
|
|
|
|
padding: 10px 0 0;
|
|
|
|
margin-bottom: 30px;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.col-sm-3 {
|
|
|
|
width: 30%;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.hiddenDetailInfo {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.search-collapse, .select-table {
|
|
|
|
box-shadow: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.get-finish-product h4 {
|
|
|
|
padding: 0 40px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.base-sales-order {
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
justify-content: space-between;
|
|
|
|
}
|
|
|
|
|
|
|
|
.base-sales-order .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;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/*结案*/
|
|
|
|
|
|
|
|
.audit {
|
|
|
|
display: flex;
|
|
|
|
width: 100%;
|
|
|
|
height: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
.audit .changeWidth {
|
|
|
|
flex: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
.audit-title {
|
|
|
|
font-size: 16px;
|
|
|
|
padding: 2px 10px;
|
|
|
|
float: left
|
|
|
|
}
|
|
|
|
/*提醒框*/
|
|
|
|
.alert{
|
|
|
|
position: fixed;
|
|
|
|
top: 50%;
|
|
|
|
left: 50%;
|
|
|
|
transform: translate(-50%, -50%);
|
|
|
|
/* width: 200px; */
|
|
|
|
/* margin-left: 20%; */
|
|
|
|
z-index: 2000;
|
|
|
|
text-align: center;
|
|
|
|
font-size: 18px;
|
|
|
|
padding: 20px 50px;
|
|
|
|
}
|
|
|
|
</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 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="salesOrderCode"/>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<label>订单号码:</label>
|
|
|
|
<input type="text" name="salesOrderNumber"/>
|
|
|
|
</li>
|
|
|
|
<!-- <li>-->
|
|
|
|
<!-- <label>预约单号:</label>-->
|
|
|
|
<!-- <input type="text" name="appointmentNumber"/>-->
|
|
|
|
<!-- </li>-->
|
|
|
|
<li>
|
|
|
|
<label>客户代码:</label>
|
|
|
|
<input type="text" name="enterpriseCode"/>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<label>客户名称:</label>
|
|
|
|
|
|
|
|
<input type="text" name="enterpriseName"/>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<label>联系人:</label>
|
|
|
|
<input type="text" name="customerContact"/>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<label>联系电话:</label>
|
|
|
|
<input type="text" name="contactNumber"/>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<label>业务人员:</label>
|
|
|
|
<input type="text" name="businessMembers"/>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<label>结案否:</label>
|
|
|
|
<select name="auditNo" 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="confirmNo" 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>
|
|
|
|
<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:salesOrder:add">
|
|
|
|
<i class="fa fa-plus"></i> 添加
|
|
|
|
</a>
|
|
|
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()"
|
|
|
|
shiro:hasPermission="system:salesOrder:edit">
|
|
|
|
<i class="fa fa-edit"></i> 修改
|
|
|
|
</a>
|
|
|
|
<a class="btn btn-danger" onclick="removeSelected()"
|
|
|
|
shiro:hasPermission="system:salesOrder:remove">
|
|
|
|
<i class="fa fa-remove"></i> 删除
|
|
|
|
</a>
|
|
|
|
<a class="btn btn-warning" onclick="exportSalesOrder()" shiro:hasPermission="system:salesOrder:export">
|
|
|
|
<i class="fa fa-download"></i> 导出
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<a class="btn btn-info" onclick="reviewAudit()" shiro:hasPermission="system:salesOrder:audit">
|
|
|
|
|
|
|
|
<i class="fa fa-hand-grab-o"></i> 结案
|
|
|
|
</a>
|
|
|
|
<a class="btn btn-success" onclick="reviewConfirm()" shiro:hasPermission="system:salesOrder:confirm">
|
|
|
|
|
|
|
|
<i class="fa fa-hand-grab-o"></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="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="alert alert-danger hide">结案信息未确认,请先确认</div>
|
|
|
|
<div class="modal-body details-body">
|
|
|
|
<div class="row">
|
|
|
|
<div class="base-sales-order">
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label is-required">订单编号:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input id="salesOrderCode" name="salesOrderCode" 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 id="salesOrderNumber" 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">
|
|
|
|
<input id="appointmentNumber" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label is-required">开单日期时间:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<!– <div class="input-group date">–>
|
|
|
|
<!– <input name="billingTime" class="form-control" placeholder="yyyy-MM-dd" type="text" required readonly>–>
|
|
|
|
<!– <span class="input-group-addon"><i class="fa fa-calendar"></i></span>–>
|
|
|
|
<!– </div>–>
|
|
|
|
<input id="billingTime" class="form-control" type="text" readonly>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label is-required">客户代码:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<!– <select name="enterpriseCode" class="form-control m-b" required readonly>–>
|
|
|
|
<!– <option value="">请选择客户代码</option>–>
|
|
|
|
<!– </select>–>
|
|
|
|
<input id="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">
|
|
|
|
<!– <select name="enterpriseName" class="form-control m-b">–>
|
|
|
|
<!– <option value="">所有</option>–>
|
|
|
|
<!– </select>–>
|
|
|
|
|
|
|
|
<input id="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 id="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">
|
|
|
|
<!– <select name="customerFactory" class="form-control m-b">–>
|
|
|
|
<!– <option value="">请选择客户厂区</option>–>
|
|
|
|
<!– </select>–>
|
|
|
|
<input id="customerFactory" 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="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 id="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 id="customerFax" 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" 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="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 id="deliveryConditions" 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="deliveryMethod" 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="orderReceivingMode" 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_whether')}">–>
|
|
|
|
<!– <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 id="confirmTax" 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="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">
|
|
|
|
<!– <div class="input-group date">–>
|
|
|
|
<!– <input name="orderReceivingTime" 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>–>
|
|
|
|
|
|
|
|
<input id="orderReceivingTime" 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="modificationTime" class="form-control" placeholder="yyyy-MM-dd" type="text" readonly>–>
|
|
|
|
<!– <span class="input-group-addon"><i class="fa fa-calendar"></i></span>–>
|
|
|
|
<!– </div>–>
|
|
|
|
<input id="modificationTime" 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">
|
|
|
|
<textarea id="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 id="currentInventory" 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="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 id="unpaidAmount" 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="availableCredit" 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="totalAmount" class="form-control" type="text" readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="salesFinishList">
|
|
|
|
<div class="col-sm-12 select-table table-striped">
|
|
|
|
<div class="details" style="padding: 8px 0;font-size: 18px">产品信息</div>
|
|
|
|
<table id="salesFinish-table"></table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="audit-container">
|
|
|
|
<form id="form-audit-edit">
|
|
|
|
<div class="audit">
|
|
|
|
<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="salesOrderId" name="salesOrderId" class="form-control" type="text" required
|
|
|
|
readonly>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group changeWidth">
|
|
|
|
<label class="audit-title">结案否:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<select id="auditNo" name="auditNo" class="form-control m-b"
|
|
|
|
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 changeWidth">
|
|
|
|
<label class="audit-title">结案人:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<!– <input id="auditName" name="auditName" class="form-control" type="text" th:value="${@permission.getPrincipalProperty('userName')}">–>
|
|
|
|
<input id="auditName" name="auditName" class="form-control" type="text">
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group changeWidth">
|
|
|
|
<label class="audit-title">结案时间:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<div class="input-group date">
|
|
|
|
<input id="auditTime" name="auditTime" 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>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="audit-title">结案备注:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<textarea id="auditRemarks" rows="5" name="auditRemarks" class="form-control"></textarea>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer" style=" border-top: none;background-color: #a7b1c2">
|
|
|
|
<button type="button" class="btn btn-success" onclick="btnAudit()">结案确认</button>
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal" onclick="close()">关闭</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>-->
|
|
|
|
|
|
|
|
<!--结案确认-->
|
|
|
|
<!--<div class="modal fade" id="AuditModel">
|
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content message_align">
|
|
|
|
<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">
|
|
|
|
<p id="delcfmMsg">确认结案通过吗?</p>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
|
|
|
|
<button type="button" onclick="AuditSubmit()" class="btn btn-success" data-dismiss="modal">确定</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="alert alert-success hide">结案成功</div>-->
|
|
|
|
|
|
|
|
<!--结案-->
|
|
|
|
<div class="modal fade" id="auditModal">
|
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content message_align">
|
|
|
|
<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-audit-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="salesOrderId" name="salesOrderId" 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="auditNo" name="auditNo" 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">
|
|
|
|
<div class="input-group date">
|
|
|
|
<input id="auditTime" name="auditTime" 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>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label ">结案人:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<!-- <input id="auditName" name="auditName" class="form-control" type="text" th:value="${@permission.getPrincipalProperty('userName')}">-->
|
|
|
|
<input id="auditName" name="auditName" class="form-control" type="text">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label ">结案备注:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<textarea id="auditRemarks" rows="5" name="auditRemarks" class="form-control"></textarea>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
|
|
|
|
<button type="button" onclick="AuditSubmit()" class="btn btn-success" data-dismiss="modal">确定</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!--订单确认-->
|
|
|
|
<div class="modal fade" id="confirmModel">
|
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content message_align">
|
|
|
|
<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-confirm-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="salesOrderId2" name="salesOrderId" 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="confirmNo" name="confirmNo" 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">
|
|
|
|
<div class="input-group date">
|
|
|
|
<input id="confirmTime" name="confirmTime" 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>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">确认人:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input id="confirmName" name="confirmName" class="form-control" type="text">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
|
|
|
|
<button type="button" onclick="ConfirmSubmit()" class="btn btn-success" data-dismiss="modal">确定</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="alert alert-info hide">订单已确认</div>
|
|
|
|
|
|
|
|
<th:block th:include="include :: footer"/>
|
|
|
|
<th:block th:include="include :: datetimepicker-js"/>
|
|
|
|
|
|
|
|
<script th:inline="javascript">
|
|
|
|
var editFlag = [[${@permission.hasPermi('system:salesOrder:edit')}]];
|
|
|
|
var removeFlag = [[${@permission.hasPermi('system:salesOrder:remove')}]];
|
|
|
|
var confirmTaxDatas = [[${@dict.getType('sys_whether')}]];
|
|
|
|
var confirmNoDatas = [[${@dict.getType('sys_whether')}]];
|
|
|
|
var auditNoDatas = [[${@dict.getType('sys_whether')}]];
|
|
|
|
var prefix = ctx + "system/salesOrder";
|
|
|
|
$(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: 'salesOrderId',
|
|
|
|
title: '订单id',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'auditNo',
|
|
|
|
title: '结案否',
|
|
|
|
formatter: function (value, row, index) {
|
|
|
|
// return $.table.selectDictLabel(auditNoDatas, value);
|
|
|
|
var actions = [];
|
|
|
|
if ($.table.selectDictLabel(auditNoDatas, 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: 'confirmNo',
|
|
|
|
title: '确认否',
|
|
|
|
formatter: function (value, row, index) {
|
|
|
|
// return $.table.selectDictLabel(confirmNoDatas, value);
|
|
|
|
|
|
|
|
var actions = [];
|
|
|
|
if ($.table.selectDictLabel(confirmNoDatas, 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: 'salesOrderCode',
|
|
|
|
title: '订单编号'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'salesOrderNumber',
|
|
|
|
title: '订单号码'
|
|
|
|
},
|
|
|
|
// {
|
|
|
|
// field: 'appointmentNumber',
|
|
|
|
// title: '预约单号'
|
|
|
|
// },
|
|
|
|
{
|
|
|
|
field: 'enterpriseCode',
|
|
|
|
title: '客户代码'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'enterpriseName',
|
|
|
|
title: '客户名称'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'paymentTerms',
|
|
|
|
title: '付款条件'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'deliveryConditions',
|
|
|
|
title: '交货条件'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'deliveryMethod',
|
|
|
|
title: '交货方式'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'orderReceivingMode',
|
|
|
|
title: '接单方式'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerContact',
|
|
|
|
title: '联系人'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerFactory',
|
|
|
|
title: '客户厂区'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'contactNumber',
|
|
|
|
title: '联系电话'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'businessMembers',
|
|
|
|
title: '业务人员',
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerFax',
|
|
|
|
title: '传真号码'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'deliveryAddress',
|
|
|
|
title: '交货地点'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'orderReceivingTime',
|
|
|
|
title: '接单日期',
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'billingTime',
|
|
|
|
title: '开单日期时间',
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'customerRemarks',
|
|
|
|
title: '备注内容',
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'currentInventory',
|
|
|
|
title: '当前库存数',
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'creditLimit',
|
|
|
|
title: '信用额度'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'unpaidAmount',
|
|
|
|
title: '未付款数'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'availableCredit',
|
|
|
|
title: '可用额度'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'confirmTax',
|
|
|
|
title: '是否含税',
|
|
|
|
formatter: function (value, row, index) {
|
|
|
|
return $.table.selectDictLabel(confirmTaxDatas, value);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'taxRate',
|
|
|
|
title: '税率'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'totalAmount',
|
|
|
|
title: '合计金额'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'fileUpload',
|
|
|
|
title: '文件存储',
|
|
|
|
formatter: function(value, row, index) {
|
|
|
|
var filepath = value.substring(value.lastIndexOf("/")+1)
|
|
|
|
var actions = [];
|
|
|
|
actions.push('<a href="javascript:void(0)" onclick="downloadFile(\'' + value + '\')">'+filepath+'</a> ');
|
|
|
|
return actions.join('');
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'modificationTime',
|
|
|
|
title: '修改日期',
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
field: 'auditName',
|
|
|
|
title: '结案人',
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'auditTime',
|
|
|
|
title: '结案时间',
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'auditRemarks',
|
|
|
|
title: '结案备注',
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'confirmTime',
|
|
|
|
title: '确认日期',
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
field: 'confirmName',
|
|
|
|
title: '确认人',
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'standbyOne',
|
|
|
|
title: '备用一',
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'standbyTwo',
|
|
|
|
title: '备用二',
|
|
|
|
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 ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.salesOrderId + '\')"><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.salesOrderId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
|
|
|
// return actions.join('');
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
]
|
|
|
|
};
|
|
|
|
$.table.init(options);
|
|
|
|
});
|
|
|
|
|
|
|
|
// 结案
|
|
|
|
|
|
|
|
$("input[name='auditTime']").datetimepicker({
|
|
|
|
format: 'yyyy-mm-dd hh:ii:ss',
|
|
|
|
autoclose: true,
|
|
|
|
minView: 0,
|
|
|
|
minuteStep: 1
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// 结案确认
|
|
|
|
/*function btnAudit() {
|
|
|
|
if($("#auditNo").val()==1){
|
|
|
|
$("#AuditModel").modal("show");
|
|
|
|
}else {
|
|
|
|
|
|
|
|
$(".alert-danger").addClass("show");
|
|
|
|
window.setTimeout(function(){
|
|
|
|
$(".alert-danger").removeClass("show");
|
|
|
|
},1000);//显示的时间
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//结案
|
|
|
|
function reviewAudit() {
|
|
|
|
let data = $("#bootstrap-table").bootstrapTable("getSelections");
|
|
|
|
let userName = [[${@permission.getPrincipalProperty('userName')}]];
|
|
|
|
// console.log(data.length)
|
|
|
|
if (data.length === 1) {
|
|
|
|
$("#salesOrderId").val(data[0].salesOrderId)
|
|
|
|
$("#auditNo").val(data[0].auditNo).trigger("change")
|
|
|
|
$("#auditName").val(userName)
|
|
|
|
$("#auditTime").datetimepicker("setDate", new Date());
|
|
|
|
$("#auditRemarks").val(data[0].auditRemarks)
|
|
|
|
$("#auditModal").modal("show");
|
|
|
|
} else {
|
|
|
|
// alert("请选择一条数据")
|
|
|
|
$.modal.alert("请选择一条数据");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// 结案修改
|
|
|
|
function AuditSubmit(){
|
|
|
|
$.ajax({
|
|
|
|
url: prefix + "/edit",
|
|
|
|
type: "post",
|
|
|
|
resultType: "json",
|
|
|
|
data: $('#form-audit-edit').serialize(),
|
|
|
|
success: function (resp) {
|
|
|
|
// console.log(resp)
|
|
|
|
$("#auditModal").modal("hide");
|
|
|
|
$("#bootstrap-table").bootstrapTable('refresh');
|
|
|
|
$.modal.msgSuccess("操作成功!")
|
|
|
|
},
|
|
|
|
error: function () {
|
|
|
|
$.modal.msgError("出错了!");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
// 订单确认
|
|
|
|
function reviewConfirm(){
|
|
|
|
let data = $("#bootstrap-table").bootstrapTable("getSelections");
|
|
|
|
let userName = [[${@permission.getPrincipalProperty('userName')}]];
|
|
|
|
if (data.length ===1) {
|
|
|
|
$("#salesOrderId2").val(data[0].salesOrderId)
|
|
|
|
$("#confirmNo").val(1).trigger("change")
|
|
|
|
$("#confirmName").val(userName)
|
|
|
|
$("#confirmTime").datetimepicker("setDate", new Date());
|
|
|
|
$("#confirmModel").modal("show");
|
|
|
|
}else {
|
|
|
|
$.modal.alert("请选择一条数据");
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// 订单确认
|
|
|
|
function ConfirmSubmit(){
|
|
|
|
$.ajax({
|
|
|
|
url: prefix + "/edit",
|
|
|
|
type: "post",
|
|
|
|
resultType: "json",
|
|
|
|
data: $('#form-confirm-edit').serialize(),
|
|
|
|
success: function (resp) {
|
|
|
|
// console.log(resp)
|
|
|
|
$("#bootstrap-table").bootstrapTable('refresh');
|
|
|
|
// $(".alert-info").addClass("show");
|
|
|
|
// window.setTimeout(function(){
|
|
|
|
// $(".alert-info").removeClass("show");
|
|
|
|
// },1000);//显示的时间
|
|
|
|
$.modal.msgSuccess("操作成功!")
|
|
|
|
},
|
|
|
|
error: function () {
|
|
|
|
$.modal.msgError("出错了!");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// 双击打开详情结案
|
|
|
|
$('#bootstrap-table').on('dbl-click-row.bs.table', function (e, row, index) {
|
|
|
|
$("#salesOrderId").val(row.salesOrderId)
|
|
|
|
$("#salesOrderCode").val(row.salesOrderCode)
|
|
|
|
$("#salesOrderNumber").val(row.salesOrderNumber)
|
|
|
|
$("#appointmentNumber").val(row.appointmentNumber)
|
|
|
|
$("#billingTime").val(row.billingTime)
|
|
|
|
$("#enterpriseCode").val(row.enterpriseCode)
|
|
|
|
$("#enterpriseName").val(row.enterpriseName)
|
|
|
|
$("#customerContact").val(row.customerContact)
|
|
|
|
$("#customerFactory").val(row.customerFactory)
|
|
|
|
$("#contactNumber").val(row.contactNumber)
|
|
|
|
$("#businessMembers").val(row.businessMembers)
|
|
|
|
$("#customerFax").val(row.customerFax)
|
|
|
|
$("#deliveryAddress").val(row.deliveryAddress)
|
|
|
|
$("#paymentTerms").val(row.paymentTerms)
|
|
|
|
$("#deliveryConditions").val(row.deliveryConditions)
|
|
|
|
$("#deliveryMethod").val(row.deliveryMethod)
|
|
|
|
$("#orderReceivingMode").val(row.orderReceivingMode)
|
|
|
|
$("#taxRate").val(row.taxRate)
|
|
|
|
$("#orderReceivingTime").val(row.orderReceivingTime)
|
|
|
|
$("#modificationTime").val(row.modificationTime)
|
|
|
|
$("#customerRemarks").val(row.customerRemarks)
|
|
|
|
$("#currentInventory").val(row.currentInventory)
|
|
|
|
$("#creditLimit").val(row.creditLimit)
|
|
|
|
$("#unpaidAmount").val(row.unpaidAmount)
|
|
|
|
$("#availableCredit").val(row.availableCredit)
|
|
|
|
$("#totalAmount").val(row.totalAmount)
|
|
|
|
$("#auditNo").val(row.auditNo).trigger("change")
|
|
|
|
$("#auditName").val(row.auditName)
|
|
|
|
$("#auditTime").val(row.auditTime)
|
|
|
|
$("#auditRemarks").val(row.auditRemarks)
|
|
|
|
if (row.confirmTax == 1) {
|
|
|
|
$(".confirmTax").val("是")
|
|
|
|
|
|
|
|
} else {
|
|
|
|
$(".confirmTax").val("否")
|
|
|
|
|
|
|
|
}
|
|
|
|
// 产品信息
|
|
|
|
|
|
|
|
$('#salesFinish-table').bootstrapTable('destroy');
|
|
|
|
$('#salesFinish-table').bootstrapTable({
|
|
|
|
url: '/system/salesFinish/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,
|
|
|
|
salesOrderNumber: row.salesOrderNumber
|
|
|
|
|
|
|
|
};
|
|
|
|
// console.log(row.enterpriseCode)
|
|
|
|
return curParams
|
|
|
|
},
|
|
|
|
columns: [
|
|
|
|
{
|
|
|
|
field: 'salesFinishId',
|
|
|
|
title: '订单id',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'salesOrderCode',
|
|
|
|
title: '订单编号',
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'salesOrderNumber',
|
|
|
|
title: '订单号码',
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'enterpriseCode',
|
|
|
|
title: '客户代码',
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'enterpriseName',
|
|
|
|
title: '客户名称',
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'finishProductCode',
|
|
|
|
title: '成品代码'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'finishProductName',
|
|
|
|
title: '成品名称'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'specificationModel',
|
|
|
|
title: '规格型号'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'typeMachine',
|
|
|
|
title: '机种'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'inventoryUnit',
|
|
|
|
title: '单位'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'stockUnitWeight',
|
|
|
|
title: '重量'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'processPrice',
|
|
|
|
title: '单价'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'productQuantity',
|
|
|
|
title: '数量'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'amountMoney',
|
|
|
|
title: '金额'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'deliveryTime',
|
|
|
|
title: '交期'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'line',
|
|
|
|
title: 'Line#'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'versionNumber',
|
|
|
|
title: '版本号'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'salesExplain',
|
|
|
|
title: '说明'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'standbyOne',
|
|
|
|
title: '备用一',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
field: 'standbyTwo',
|
|
|
|
title: '备用二',
|
|
|
|
visible: false
|
|
|
|
},
|
|
|
|
]
|
|
|
|
});
|
|
|
|
$("#detailsModal").modal("show");
|
|
|
|
});
|
|
|
|
|
|
|
|
//导出
|
|
|
|
function exportSalesOrder() {
|
|
|
|
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
|
|
|
|
var data = $("#bootstrap-table").bootstrapTable("getSelections")
|
|
|
|
|
|
|
|
if (rows.length !== 1) {
|
|
|
|
$.modal.alert("请选择一条记录");
|
|
|
|
return;
|
|
|
|
} else {
|
|
|
|
// rows为选中行的id
|
|
|
|
// console.log(rows);
|
|
|
|
// console.log(data);
|
|
|
|
// console.log(data[0].orderNumber)
|
|
|
|
$.modal.confirm("是否确认要导出本条订单?", function (){
|
|
|
|
axios({
|
|
|
|
url: prefix + '/exportSelected/'+data[0].salesOrderId,
|
|
|
|
method: 'POST',
|
|
|
|
responseType: 'blob'
|
|
|
|
}).then(response => {
|
|
|
|
// console.log(response)
|
|
|
|
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)//释放内存
|
|
|
|
})
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//删除
|
|
|
|
function removeSelected() {
|
|
|
|
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
|
|
|
|
console.log(rows)
|
|
|
|
if (rows.length > 0) {
|
|
|
|
$.modal.confirm("是否删除选中的"+ rows.length +"条销售订单?", function () {
|
|
|
|
$.ajax({
|
|
|
|
url: prefix + '/removeSelected',
|
|
|
|
type: 'post',
|
|
|
|
data: {
|
|
|
|
ids : rows.join()
|
|
|
|
},
|
|
|
|
success: function (res) {
|
|
|
|
// console.log(res)
|
|
|
|
$("#bootstrap-table").bootstrapTable("refresh");
|
|
|
|
$.modal.msgSuccess("删除成功!")
|
|
|
|
},
|
|
|
|
error: function (res) {
|
|
|
|
$.modal.msgError(res.error())
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
$.modal.msgWarning("请选择一条数据")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*下载*/
|
|
|
|
function downloadFile(filepath) {
|
|
|
|
window.location.href =prefix + "/downloadFile?filepath="+ filepath;
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|