Browse Source

删除sysMenu表种的returnGoods:returnGoodsOrder开头的数据

dev
liuxiaoxu 1 month ago
parent
commit
e82ba14ace
  1. 1085
      ruoyi-admin/src/main/resources/templates/quality/returnGoodsOrder/add.html
  2. 1065
      ruoyi-admin/src/main/resources/templates/quality/returnGoodsOrder/edit.html
  3. 955
      ruoyi-admin/src/main/resources/templates/quality/returnGoodsOrder/returnGoodsOrder.html

1085
ruoyi-admin/src/main/resources/templates/quality/returnGoodsOrder/add.html

File diff suppressed because it is too large

1065
ruoyi-admin/src/main/resources/templates/quality/returnGoodsOrder/edit.html

File diff suppressed because it is too large

955
ruoyi-admin/src/main/resources/templates/quality/returnGoodsOrder/returnGoodsOrder.html

@ -1,955 +0,0 @@
<!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>
<style>
.table-striped{
border: 0px!important;
white-space:nowrap;
}
.base-returnGoods-order {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.base-returnGoods-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;
}
</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>
<label>退货单号:</label>
<input type="text" name="returnGoodsNumber"/>
</li>
<li>
<label>订单号:</label>
<input type="text" name="orderNumber"/>
</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>-->
<!-- <input type="text" name="orderTakenWay"/>-->
<!-- </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>
<select name="confirmOrNot" 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="closeCaseOrNot" 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>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</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="quality:returnGoodsOrder:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="quality:returnGoodsOrder:edit">
<i class="fa fa-edit"></i> 修改
</a>
<!--<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="returnGoods:returnGoodsOrder:remove">
<i class="fa fa-remove"></i> 删除
</a>-->
<a class="btn btn-danger multiple disabled" onclick="removeSelected()" shiro:hasPermission="quality:returnGoodsOrder:remove">
<i class="fa fa-remove"></i> 删除
</a>
<!--<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="returnGoods:returnGoodsOrder:export">
<i class="fa fa-download"></i> 导出
</a>-->
<!-- <a class="btn btn-info single disabled" onclick="showOrderDetailModal()">-->
<!-- <i class="fa fa-file-text"></i> 订单详情-->
<!-- </a>-->
<!-- <a class="btn btn-warning" onclick="exportOrderDetail()" shiro:hasPermission="returnGoods:returnGoodsOrder:export">-->
<!-- <i class="fa fa-download"></i> 导出订单详情-->
<!-- </a>-->
<a class="btn btn-primary" onclick="confirmOrder()" shiro:hasPermission="quality:returnGoodsOrder:confirm">
<i class="fa fa-hand-grab-o"></i> 确认
</a>
<a class="btn btn-primary" onclick="closeCaseOrder()" shiro:hasPermission="quality:returnGoodsOrder:close">
<i class="fa fa-hand-grab-o"></i> 结案
</a>
</div>
<div class="col-sm-12 select-table table-striped" style="white-space: nowrap">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<!--详情信息模态框-->
<div class="modal inmodal" id="orderDetailsModal" 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-returnGoods-order">
<div class="form-group">
<label class="col-sm-3 control-label is-required">退货单号:</label>
<div class="col-sm-8">
<input id="returnGoodsNumber" name="returnGoodsNumber" 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="orderNumber" 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="enterpriseCode" 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">
<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="billingDate" 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">
<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="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="paymentCondition" 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="deliveryCondition" 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="deliveryWay" 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="orderTakenDate" 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="reviseDate" 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="confirmDate" 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="orderTakenWay" 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="businessDirector" 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="returnGoodsRemark" 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="exportSales" 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="confirmOrNot" 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="closeCaseOrNot" 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="returnGoodsCategory" class="form-control" type="text" readonly>
</div>
</div>
</div>
<hr>
<div class="returnGoodsList" style="margin-top: 20px;">
<div class="returnGoodsProductList">
<div class="col-sm-12 table-striped" style="margin-top: 20px;">
<div class="details" style="font-size: 18px">产品信息</div>
<table id="returnGoodsProductTable"></table>
</div>
</div>
</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="closeOrderDetailModal()">关闭</button>
</div>
</div>
</div>
</div>
<!--结案-->
<div class="modal fade" id="closeCaseModal">
<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-closeCase-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="returnGoodsId1" name="returnGoodsId" 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="closeCaseOrNot1" name="closeCaseOrNot" 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="closeCaseTime" name="closeCaseTime" 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="closeCaseName" name="closeCaseName" 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="closeCaseSubmit()" 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="returnGoodsId2" name="returnGoodsId" 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="confirmOrNot2" name="confirmOrNot" 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>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js"/>
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('returnGoods:returnGoodsOrder:edit')}]];
var removeFlag = [[${@permission.hasPermi('returnGoods:returnGoodsOrder:remove')}]];
var exportSalesDatas = [[${@dict.getType('sys_export_sales')}]];
var confirmOrNotDatas = [[${@dict.getType('sys_whether')}]];
var closeCaseOrNotDatas = [[${@dict.getType('sys_whether')}]];
var returnGoodsCategoryDatas = [[${@dict.getType('return_goods_category')}]];
var inventoryUnitDatas = [[${@dict.getType('sys_unit_class')}]];
var commonCurrencyDatas = [[${@dict.getType('sys_common_currency')}]];
var currentQuoteDatas = [[${@dict.getType('sys_whether')}]];
var approveNoDatas = [[${@dict.getType('sys_whether')}]];
var whetherDatas = [[${@dict.getType('sys_whether')}]];
var prefix = ctx + "quality/returnGoodsOrder";
var prefixReturnGoodsProduct = ctx + "quality/returnGoodsProduct";
$(function() {
/*显示退货列表数据*/
selectDataToTable();
/*获取客户信息*/
getCustomerList();
});
/*显示退货列表数据*/
function selectDataToTable() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "退换货订单",
clickToSelect: true,
columns: [{
checkbox: true
},
{
field: 'returnGoodsId',
title: '退货单号id',
visible: false
},
{
field: 'closeCaseOrNot',
title: '结案否',
formatter: function(value, row, index) {
//return $.table.selectDictLabel(confirmOrNotDatas, value);
// console.log($.table.selectDictLabel(confirmOrNotDatas, value))
var actions = [];
if ($.table.selectDictLabel(closeCaseOrNotDatas, 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: 'confirmOrNot',
title: '确认否',
formatter: function(value, row, index) {
//return $.table.selectDictLabel(confirmOrNotDatas, value);
// console.log($.table.selectDictLabel(confirmOrNotDatas, value))
var actions = [];
if ($.table.selectDictLabel(confirmOrNotDatas, 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: 'returnGoodsNumber',
title: '退货单号'
},
{
field: 'orderNumber',
title: '订单号'
},
{
field: 'enterpriseCode',
title: '客户代码'
},
{
field: 'enterpriseName',
title: '客户名称'
},
{
field: 'billingDate',
title: '开单日期时间'
},
{
field: 'customerContact',
title: '联系人'
},
{
field: 'contactNumber',
title: '联系电话'
},
{
field: 'customerFax',
title: '传真号码'
},
{
field: 'deliveryAddress',
title: '交货地点'
},
{
field: 'paymentCondition',
title: '付款条件'
},
{
field: 'deliveryCondition',
title: '交货条件'
},
{
field: 'deliveryWay',
title: '交货方式'
},
{
field: 'orderTakenDate',
title: '接单日期'
},
// {
// field: 'reviseDate',
// title: '修改日期'
// },
// {
// field: 'confirmDate',
// title: '订单确认日期'
// },
{
field: 'orderTakenWay',
title: '接单方式'
},
{
field: 'businessDirector',
title: '业务负责人'
},
{
field: 'returnGoodsRemark',
title: '备注内容'
},
{
field: 'exportSales',
title: '内外销',
formatter: function(value, row, index) {
return $.table.selectDictLabel(exportSalesDatas, value);
}
},
{
field: 'returnGoodsCategory',
title: '类别',
formatter: function(value, row, index) {
return $.table.selectDictLabel(returnGoodsCategoryDatas, value);
}
},
{
field: 'closeCaseName',
title: '结案人'
},
{
field: 'closeCaseTime',
title: '结案时间'
},
{
field: 'confirmName',
title: '确认人'
},
{
field: 'confirmTime',
title: '确认日期'
},
{
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.returnGoodsId + '\')"><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.returnGoodsId + '\')"><i class="fa fa-remove"></i>删除</a>');
// return actions.join('');
// }
// }
]
};
$.table.init(options);
}
/*获取客户信息*/
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 exportOrderDetail() {
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].orderNumber,
method: 'POST',
responseType: 'blob'
}).then(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 showOrderDetailModal() {
let data = $("#bootstrap-table").bootstrapTable("getSelections");
// console.log(data.length)
if (data.length ===1) {
$("#returnGoodsNumber").val(data[0].returnGoodsNumber)
$("#orderNumber").val(data[0].orderNumber)
$("#enterpriseCode").val(data[0].enterpriseCode)
$("#enterpriseName").val(data[0].enterpriseName)
$("#billingDate").val(data[0].billingDate)
$("#customerContact").val(data[0].customerContact)
$("#contactNumber").val(data[0].contactNumber)
$("#customerFax").val(data[0].customerFax)
$("#deliveryAddress").val(data[0].deliveryAddress)
$("#paymentCondition").val(data[0].paymentCondition)
$("#deliveryCondition").val(data[0].deliveryCondition)
$("#deliveryWay").val(data[0].deliveryWay)
$("#orderTakenDate").val(data[0].orderTakenDate)
$("#reviseDate").val(data[0].reviseDate)
$("#confirmDate").val(data[0].confirmDate)
$("#orderTakenWay").val(data[0].orderTakenWay)
$("#businessDirector").val(data[0].businessDirector)
$("#returnGoodsRemark").val(data[0].returnGoodsRemark)
$("#returnGoodsCategory").val(data[0].returnGoodsCategory)
// $("#exportSales").val(data[0].exportSales)
// $("#confirmOrNot").val(data[0].confirmOrNot)
if (data[0].exportSales == 1) {
$("#exportSales").val("外销")
} else if (data[0].exportSales == 2) {
$("#exportSales").val("内销")
} else {
$("#exportSales").val("")
}
if (data[0].confirmOrNot == 0) {
$("#confirmOrNot").val("否")
} else if (data[0].confirmOrNot == 1) {
$("#confirmOrNot").val("是")
} else {
$("#confirmOrNot").val("")
}
if (data[0].closeCaseOrNot == 0) {
$("#closeCaseOrNot").val("否")
} else if (data[0].closeCaseOrNot == 1) {
$("#closeCaseOrNot").val("是")
} else {
$("#closeCaseOrNot").val("")
}
//退货成品信息
$('#returnGoodsProductTable').bootstrapTable('destroy');
$('#returnGoodsProductTable').bootstrapTable({
url: prefixReturnGoodsProduct + '/getReturnGoodsProductByOrderNumber',
pagination: false,
// 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,
orderNumber: data[0].orderNumber
};
// console.log($("input[name='orderNumber']").val());
return curParams
},
columns: [
// {
// checkbox: true
// },
{
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: 'quantity',
title: '数量'
},
{
field: 'amountOfMoney',
title: '金额'
},
{
field: 'deliveryDate',
title: '交期'
},
{
field: 'batchNumber',
title: '批号'
},
{
field: 'description',
title: '说明'
},
{
field: 'completedQuantity',
title: '完成数量'
},
{
field: 'incompletedQuantity',
title: '欠单数量'
},
{
field: 'closeCaseOrNot',
title: '结案否',
formatter: function (value, row, index) {
return $.table.selectDictLabel(whetherDatas, value);
}
}]
})
$("#orderDetailsModal").modal("show");
} else {
$.modal.alertWarning("请选择一条数据");
}
}
/*关闭订单详情页面*/
function closeOrderDetailModal() {
$("#orderDetailsModal").modal("hide");
}
//删除
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 closeCaseOrder() {
var data = $("#bootstrap-table").bootstrapTable("getSelections");
let userName = [[${@permission.getPrincipalProperty('userName')}]];
if (data.length === 1) {
$("#returnGoodsId1").val(data[0].returnGoodsId)
$("#closeCaseOrNot1").val(data[0].closeCaseOrNot).trigger("change")
$("#closeCaseName").val(userName)
$("#closeCaseTime").datetimepicker("setDate", new Date());
$("#closeCaseModal").modal("show");
} else {
$.modal.alert("请选择一条数据");
}
}
/*结案*/
function closeCaseSubmit() {
$.ajax({
url: prefix + "/edit",
type: "post",
resultType: "json",
data: $('#form-closeCase-edit').serialize(),
success: function (resp) {
$("#bootstrap-table").bootstrapTable('refresh');
$.modal.msgSuccess("操作成功!")
},
error: function () {
$.modal.msgError("出错了!");
}
});
}
/*确认订单*/
function confirmOrder() {
var data = $("#bootstrap-table").bootstrapTable("getSelections");
let userName = [[${@permission.getPrincipalProperty('userName')}]];
if (data.length === 1) {
$("#returnGoodsId2").val(data[0].returnGoodsId)
$("#confirmOrNot2").val(data[0].confirmOrNot).trigger("change")
$("#confirmName").val(userName)
$("#confirmTime").datetimepicker("setDate", new Date());
$("#confirmModel").modal("show");
} else {
$.modal.alert("请选择一条数据");
}
}
/*确认提交*/
function confirmSubmit(){
var data = $("#bootstrap-table").bootstrapTable("getSelections");
$.ajax({
url: prefix + "/edit",
type: "post",
resultType: "json",
data: $('#form-confirm-edit').serialize(),
success: function (resp) {
$("#bootstrap-table").bootstrapTable('refresh');
$.modal.msgSuccess("操作成功!")
},
error: function () {
$.modal.msgError("出错了!");
}
});
}
</script>
</body>
</html>
Loading…
Cancel
Save