Browse Source

[feat]仓库管理

修改入库-仓库入库前端和其详情页面,按照新版prd调整:供应商不在分组,放在from表单上,入库数和存放位置加上4个校验条件,修改提交方法
修改入库-采购入库前端和其详情页面,按照新版prd调整:供应商不在分组,放在from表单上,入库数和存放位置加上4个校验条件,修改提交方法
修改 入库-采购单(仓库入库) 供应商物料详情列表后端接口,不在进行分组和就加工方式的筛选:采用分页查询接口
修改 入库-采购单(采购入库) 供应商物料详情列表后端接口,不在进行分组和就加工方式的筛选:采用分页查询接口
dev
liuxiaoxu 6 hours ago
parent
commit
bb84cfe762
  1. 18
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseStorageOrderController.java
  2. 243
      ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storagePurchase.html
  3. 215
      ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storagePurchaseDetail.html
  4. 283
      ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storagePurchaseWarehouse.html
  5. 215
      ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storagePurchaseWarehouseDetail.html

18
ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseStorageOrderController.java

@ -357,11 +357,10 @@ public class WarehouseStorageOrderController extends BaseController
*/ */
@ResponseBody @ResponseBody
@RequestMapping("/storagePurchaseDetailList") @RequestMapping("/storagePurchaseDetailList")
public Map<String,List<WarehouseStorageOrderDetail>> storagePurchaseDetail(String warehouseStorageCode){ public TableDataInfo storagePurchaseDetail(String warehouseStorageCode){
List<WarehouseStorageOrderDetail> allDetails = storageOrderDetailService.selectStorageOrderDetailListByCode(warehouseStorageCode); startPage();
List<WarehouseStorageOrderDetail> filterAllDetails = allDetails.stream().filter(wso -> "1".equals(wso.getMaterialDeptType())).collect(Collectors.toList()); List<WarehouseStorageOrderDetail> list = storageOrderDetailService.selectStorageOrderDetailListByCode(warehouseStorageCode);
Map<String, List<WarehouseStorageOrderDetail>> groupedDetails = filterAllDetails.stream().collect(Collectors.groupingBy(WarehouseStorageOrderDetail::getSupplierCode)); return getDataTable(list);
return groupedDetails;
} }
@ -420,11 +419,10 @@ public class WarehouseStorageOrderController extends BaseController
*/ */
@ResponseBody @ResponseBody
@RequestMapping("/storagePurchaseWarehouseDetailList") @RequestMapping("/storagePurchaseWarehouseDetailList")
public Map<String,List<WarehouseStorageOrderDetail>> storagePurchaseWarehouseDetail(String warehouseStorageCode){ public TableDataInfo storagePurchaseWarehouseDetail(String warehouseStorageCode){
List<WarehouseStorageOrderDetail> allDetails = storageOrderDetailService.selectStorageOrderDetailListByCode(warehouseStorageCode); startPage();
List<WarehouseStorageOrderDetail> filterAllDetails = allDetails.stream().filter(wso -> "0".equals(wso.getMaterialDeptType())).collect(Collectors.toList()); List<WarehouseStorageOrderDetail> list = storageOrderDetailService.selectStorageOrderDetailListByCode(warehouseStorageCode);
Map<String, List<WarehouseStorageOrderDetail>> groupedDetails = filterAllDetails.stream().collect(Collectors.groupingBy(WarehouseStorageOrderDetail::getSupplierCode)); return getDataTable(list);
return groupedDetails;
} }

243
ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storagePurchase.html

@ -15,7 +15,7 @@
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-temporaryPurchaseWarehouse-edit" th:object="${warehouseStorageOrder}"> <form class="form-horizontal m" id="form-storagePurchase-edit" th:object="${warehouseStorageOrder}">
<input name="warehouseStorageId" th:field="*{warehouseStorageId}" type="hidden"> <input name="warehouseStorageId" th:field="*{warehouseStorageId}" type="hidden">
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">入库单号:</label> <label class="col-sm-4 control-label">入库单号:</label>
@ -37,6 +37,38 @@
</select> </select>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-4 control-label">供应商ID:</label>
<div class="col-sm-8">
<input name="supplierCode" th:field="*{supplierCode}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">供应商名称:</label>
<div class="col-sm-8">
<input name="supplierName" th:field="*{supplierName}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">联系人:</label>
<div class="col-sm-8">
<input name="customerContact" th:field="*{customerContact}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">联系人电话:</label>
<div class="col-sm-8">
<input name="contactNumber" th:field="*{contactNumber}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">联系人地址:</label>
<div class="col-sm-8">
<input name="supplierAddress" th:field="*{supplierAddress}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">到货时间:</label> <label class="col-sm-4 control-label">到货时间:</label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -76,11 +108,11 @@
</div> </div>
</div> </div>
<!--物料信息-->
<div class="container"> <div class="container">
<!--供应商物料相关-->
<div class="row"> <div class="row">
<div class="col-sm-12" id="tablesContainer"> <div class="col-sm-12 select-table table-striped">
<!-- 表格将在这里动态生成 --> <table id="bootstrap-table"></table>
</div> </div>
</div> </div>
</div> </div>
@ -95,67 +127,62 @@
var warehouseStorageCode = [[${warehouseStorageOrder.warehouseStorageCode}]] var warehouseStorageCode = [[${warehouseStorageOrder.warehouseStorageCode}]]
var warehouseCode = [[${warehouseStorageOrder.warehouseCode}]] var warehouseCode = [[${warehouseStorageOrder.warehouseCode}]]
var prefix = ctx + "warehouse/storageOrder"; var prefix = ctx + "warehouse/storageOrder";
$("#form-temporaryPurchaseWarehouse-edit").validate({ $("#form-storagePurchase-edit").validate({
focusCleanup: true focusCleanup: true
}); });
//生成的不同table的id集合
var tableDatas = [];
function submitHandler() { function submitHandler() {
const storageOrderData = $("#form-temporaryPurchaseWarehouse-edit").serializeArray().reduce((obj, item) => { if ($.validate.form()) {
obj[item.name] = item.value;
return obj;
}, {}); const storageOrderData = $("#form-storagePurchase-edit").serializeArray().reduce((obj, item) => {
// 初始化一个数组用于存放所有表格的数据 obj[item.name] = item.value;
let allMaterialDataList = []; return obj;
for(let i in tableDatas){ }, {});
$('#' + tableDatas[i]).each(function() {
const tableData = $(this).bootstrapTable('getData');
console.log(JSON.stringify(tableData)); var table = $('#bootstrap-table').bootstrapTable("getData");
// 将表数据转换成与qualityReportData格式一致的数组
var materialDataList = tableData.map(function (item) { var materialDataList = table.map(function(item) {
// 根据实际字段名调整 // 根据实际字段名调整
return { return {
"warehouseStorageDetailId":item.warehouseStorageDetailId, "warehouseStorageDetailId":item.warehouseStorageDetailId,
"supplierCode": item.supplierCode, "supplierCode": item.supplierCode,
"materialNo": item.materialNo, "materialNo": item.materialNo,
"materialName": item.materialName, "materialName": item.materialName,
"materialType": item.materialType, "materialType": item.materialType,
"materialPhotourl": item.materialPhotourl, "materialPhotourl": item.materialPhotourl,
"materialDescribe": item.materialDescribe, "materialDescribe": item.materialDescribe,
"materialBrand": item.materialBrand, "materialModel": item.materialModel,
"materialUnit": item.materialUnit, "materialBrand": item.materialBrand,
"materialProcessMethod": item.materialProcessMethod, "materialUnit": item.materialUnit,
"notifyHasArrivedNum": item.notifyHasArrivedNum, "materialProcessMethod": item.materialProcessMethod,
"actualHasArrivedNum": item.actualHasArrivedNum, "notifyHasArrivedNum": item.notifyHasArrivedNum,
"temporaryHasQualifiedNum": item.temporaryHasQualifiedNum, "actualHasArrivedNum": item.actualHasArrivedNum,
"hasStorageNum": item.hasStorageNum, "temporaryHasQualifiedNum": item.temporaryHasQualifiedNum,
"notifyArriveNum": item.notifyArriveNum, "hasStorageNum": item.hasStorageNum,
"actualArriveNum": item.actualArriveNum, "notifyArriveNum": item.notifyArriveNum,
"temporaryQualifiedNum": item.temporaryQualifiedNum, "actualArriveNum": item.actualArriveNum,
"temporaryRemark": item.temporaryRemark, "temporaryQualifiedNum": item.temporaryQualifiedNum,
"temporaryReportUrl": item.temporaryReportUrl, "temporaryRemark": item.temporaryRemark,
"storageNum": item.storageNum, "temporaryReportUrl": item.temporaryReportUrl,
"storageLocation": item.storageLocation, "storageNum": item.storageNum,
"storageLocation": item.storageLocation,
// ...其他字段 // ...其他字段
}; };
});
allMaterialDataList = allMaterialDataList.concat(materialDataList);
}); });
}
const combinedData = Object.assign({}, storageOrderData, { const combinedData = Object.assign({}, storageOrderData, {
warehouseStorageOrderDetailList: allMaterialDataList warehouseStorageOrderDetailList: materialDataList,
}); });
// 合并表单数据和表格数据 // 合并表单数据和表格数据
// const combinedData = Object.assign({}, ...complaintNoticeData.array(item => ({ [item.name]: item.value })), ...materialData); console.log(combinedData)
console.log(combinedData) // 使用 JSON.stringify() 序列化数据
// 使用 JSON.stringify() 序列化数据 const jsonData = JSON.stringify(combinedData);
const jsonData = JSON.stringify(combinedData); // 发送 AJAX 请求到后端接口
// 发送 AJAX 请求到后端接口 $.operate.saveJson(prefix + "/storagePurchase", jsonData);
$.operate.saveJson(prefix + "/storagePurchase", jsonData); }
} }
$("input[name='arrivedTime']").datetimepicker({ $("input[name='arrivedTime']").datetimepicker({
@ -170,38 +197,18 @@
autoclose: true autoclose: true
}); });
$(function() {
// 假设qualityOrderCode已经定义或者可以通过某种方式获取到
var warehouseStorageCode = [[${warehouseStorageOrder.warehouseStorageCode}]]; // 这里需要实际赋值,比如从前端某个地方读取
$.getJSON(prefix + "/storagePurchaseDetailList?warehouseStorageCode=" + warehouseStorageCode, function(data) {
for (var supplierCode in data) {
if (data.hasOwnProperty(supplierCode)) {
var supplierData = data[supplierCode];
createTableForSupplier(supplierCode, supplierData);
}
}
});
});
function createTableForSupplier(supplierCode, supplierData) {
var tableId = 'bootstrap-table-' + supplierCode.replace(/[^a-z0-9]/gi, '_').toLowerCase();
tableDatas.push(tableId);
var $tableWrapper = $('<div class="table-responsive mt-3"></div>');
// 确保supplierData至少有一条记录,并从中提取供应商详细信息
var supplierInfo = supplierData.length > 0 ? supplierData[0] : {}; // 默认为空对象,以防数据不存在
// 构建含有额外供应商信息的标题字符串
var headerTitle ='供应商'+'</br>'+supplierCode + ' - ' + (supplierInfo.supplierName || 'N/A') +
' </br> ' + (supplierInfo.customerContact || 'N/A') +
' - ' + (supplierInfo.contactNumber || 'N/A') +
' - ' + (supplierInfo.supplierAddress || 'N/A');
var $header = $('<h4>' + headerTitle + '</h4>'); //物料信息展示列表
var $table = $('<table id="' + tableId + '" class="table table-striped table-bordered"></table>'); $(function() {
var options = {
$table.bootstrapTable({ modalName: "选择物料",
data: supplierData, url: prefix + "/storagePurchaseDetailList",
queryParams: queryParams,
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
pagination: false, // 设置不分页
columns: [{ columns: [{
checkbox: true checkbox: true
}, },
@ -235,10 +242,15 @@
title: '物料描述', title: '物料描述',
field: 'materialDescribe', field: 'materialDescribe',
}, },
{
title: '物料型号',
field: 'materialModel',
},
{ {
title: '物料品牌', title: '物料品牌',
field: 'materialBrand', field: 'materialBrand',
}, },
{ {
title: '物料单位', title: '物料单位',
field: 'materialUnit', field: 'materialUnit',
@ -259,7 +271,6 @@
{ {
title: '暂收已合格数', title: '暂收已合格数',
field: 'temporaryHasQualifiedNum', field: 'temporaryHasQualifiedNum',
visible: false,
}, },
{ {
title: '已入库数', title: '已入库数',
@ -292,17 +303,29 @@
{ {
title: '入库数', title: '入库数',
field: 'storageNum', field: 'storageNum',
editable:{ editable: {
type: 'text', validate: function(value) {
mode:'inline', if ($.trim(value) === '') {
validate: function (v) { return '入库数不能为空';
if (!v) return '数量不能为空'; }
if (isNaN(v)) return '数量必须是数字'; if (isNaN(value)) {
var processBadNum = parseInt(v); return '请输入有效的数字';
if (processBadNum <= 0) return '数量必须是正整数'; }
if (value < 0) {
return '入库数不能小于0';
}
//不能为小数
if (value % 1 !== 0) {
return '入库数不能为小数';
}
}, },
}, },
formatter: function (value, row) { formatter: function (value, row) {
// 检查 row 是否存在
if (!row) {
return "";
}
// 检查 storageNum 是否存在 // 检查 storageNum 是否存在
if (row.storageNum === undefined || row.storageNum === null) { if (row.storageNum === undefined || row.storageNum === null) {
return ""; return "";
@ -324,6 +347,11 @@
mode:'inline', mode:'inline',
}, },
formatter: function (value, row) { formatter: function (value, row) {
// 检查 row 是否存在
if (!row) {
return "";
}
// 检查 storageLocation 是否存在 // 检查 storageLocation 是否存在
if (row.storageLocation === undefined || row.storageLocation === null) { if (row.storageLocation === undefined || row.storageLocation === null) {
return ""; return "";
@ -336,17 +364,20 @@
return value; return value;
} }
} }
}, },]
};
] $.table.init(options);
}); })
$tableWrapper.append($header).append($table); function queryParams(params) {
$('#tablesContainer').append($tableWrapper); var curParams = {
// 传递参数查询参数
warehouseStorageCode: warehouseStorageCode
};
return curParams;
} }
//根据仓库ID查询仓库名称 //根据仓库ID查询仓库名称
$(document).ready(function() { $(document).ready(function() {
// 初始化时默认加载仓库ID列表 // 初始化时默认加载仓库ID列表

215
ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storagePurchaseDetail.html

@ -3,6 +3,7 @@
<head> <head>
<th:block th:include="include :: header('入库-采购单(采购入库)详情')" /> <th:block th:include="include :: header('入库-采购单(采购入库)详情')" />
<th:block th:include="include :: datetimepicker-css" /> <th:block th:include="include :: datetimepicker-css" />
<th:block th:include="include :: bootstrap-editable-css" />
<style> <style>
.supplier-value span { .supplier-value span {
@ -13,7 +14,7 @@
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-temporaryPurchaseWarehouse-edit" th:object="${warehouseStorageOrder}"> <form class="form-horizontal m" id="form-storagePurchase-edit" th:object="${warehouseStorageOrder}">
<input name="warehouseStorageId" th:field="*{warehouseStorageId}" type="hidden"> <input name="warehouseStorageId" th:field="*{warehouseStorageId}" type="hidden">
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">入库单号:</label> <label class="col-sm-4 control-label">入库单号:</label>
@ -35,6 +36,38 @@
</select> </select>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-4 control-label">供应商ID:</label>
<div class="col-sm-8">
<input name="supplierCode" th:field="*{supplierCode}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">供应商名称:</label>
<div class="col-sm-8">
<input name="supplierName" th:field="*{supplierName}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">联系人:</label>
<div class="col-sm-8">
<input name="customerContact" th:field="*{customerContact}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">联系人电话:</label>
<div class="col-sm-8">
<input name="contactNumber" th:field="*{contactNumber}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">联系人地址:</label>
<div class="col-sm-8">
<input name="supplierAddress" th:field="*{supplierAddress}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">到货时间:</label> <label class="col-sm-4 control-label">到货时间:</label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -74,11 +107,11 @@
</div> </div>
</div> </div>
<!--物料信息-->
<div class="container"> <div class="container">
<!--供应商物料相关-->
<div class="row"> <div class="row">
<div class="col-sm-12" id="tablesContainer"> <div class="col-sm-12 select-table table-striped">
<!-- 表格将在这里动态生成 --> <table id="bootstrap-table"></table>
</div> </div>
</div> </div>
</div> </div>
@ -92,66 +125,62 @@
var warehouseStorageCode = [[${warehouseStorageOrder.warehouseStorageCode}]] var warehouseStorageCode = [[${warehouseStorageOrder.warehouseStorageCode}]]
var warehouseCode = [[${warehouseStorageOrder.warehouseCode}]] var warehouseCode = [[${warehouseStorageOrder.warehouseCode}]]
var prefix = ctx + "warehouse/storageOrder"; var prefix = ctx + "warehouse/storageOrder";
$("#form-temporaryPurchaseWarehouse-edit").validate({ $("#form-storagePurchase-edit").validate({
focusCleanup: true focusCleanup: true
}); });
//生成的不同table的id集合 //生成的不同table的id集合
var tableDatas = [];
function submitHandler() { function submitHandler() {
const storageOrderData = $("#form-temporaryPurchaseWarehouse-edit").serializeArray().reduce((obj, item) => { if ($.validate.form()) {
obj[item.name] = item.value;
return obj;
}, {});
// 初始化一个数组用于存放所有表格的数据
let allMaterialDataList = [];
for(let i in tableDatas){
$('#' + tableDatas[i]).each(function() {
const tableData = $(this).bootstrapTable('getData');
console.log(JSON.stringify(tableData));
// 将表数据转换成与qualityReportData格式一致的数组
var materialDataList = tableData.map(function (item) {
// 根据实际字段名调整
return {
"supplierCode": item.supplierCode,
"materialNo": item.materialNo,
"materialName": item.materialName,
"materialType": item.materialType,
"materialPhotourl": item.materialPhotourl,
"materialDescribe": item.materialDescribe,
"materialBrand": item.materialBrand,
"materialUnit": item.materialUnit,
"materialProcessMethod": item.materialProcessMethod,
"notifyHasArrivedNum": item.notifyHasArrivedNum,
"actualHasArrivedNum": item.actualHasArrivedNum,
"temporaryHasQualifiedNum": item.temporaryHasQualifiedNum,
"hasStorageNum": item.hasStorageNum,
"notifyArriveNum": item.notifyArriveNum,
"actualArriveNum": item.actualArriveNum,
"temporaryQualifiedNum": item.temporaryQualifiedNum,
"temporaryRemark": item.temporaryRemark,
"temporaryReportUrl": item.temporaryReportUrl,
"storageNum": item.storageNum,
"storageLocation": item.storageLocation,
// ...其他字段
}; const storageOrderData = $("#form-storagePurchase-edit").serializeArray().reduce((obj, item) => {
}); obj[item.name] = item.value;
allMaterialDataList = allMaterialDataList.concat(materialDataList); return obj;
}, {});
var table = $('#bootstrap-table').bootstrapTable("getData");
var materialDataList = table.map(function(item) {
// 根据实际字段名调整
return {
"warehouseStorageDetailId":item.warehouseStorageDetailId,
"supplierCode": item.supplierCode,
"materialNo": item.materialNo,
"materialName": item.materialName,
"materialType": item.materialType,
"materialPhotourl": item.materialPhotourl,
"materialDescribe": item.materialDescribe,
"materialModel": item.materialModel,
"materialBrand": item.materialBrand,
"materialUnit": item.materialUnit,
"materialProcessMethod": item.materialProcessMethod,
"notifyHasArrivedNum": item.notifyHasArrivedNum,
"actualHasArrivedNum": item.actualHasArrivedNum,
"temporaryHasQualifiedNum": item.temporaryHasQualifiedNum,
"hasStorageNum": item.hasStorageNum,
"notifyArriveNum": item.notifyArriveNum,
"actualArriveNum": item.actualArriveNum,
"temporaryQualifiedNum": item.temporaryQualifiedNum,
"temporaryRemark": item.temporaryRemark,
"temporaryReportUrl": item.temporaryReportUrl,
"storageNum": item.storageNum,
"storageLocation": item.storageLocation,
// ...其他字段
};
}); });
}
const combinedData = Object.assign({}, storageOrderData, { const combinedData = Object.assign({}, storageOrderData, {
warehouseStorageOrderDetailList: allMaterialDataList warehouseStorageOrderDetailList: materialDataList,
}); });
// 合并表单数据和表格数据 // 合并表单数据和表格数据
// const combinedData = Object.assign({}, ...complaintNoticeData.array(item => ({ [item.name]: item.value })), ...materialData); console.log(combinedData)
console.log(combinedData) // 使用 JSON.stringify() 序列化数据
// 使用 JSON.stringify() 序列化数据 const jsonData = JSON.stringify(combinedData);
const jsonData = JSON.stringify(combinedData); // 发送 AJAX 请求到后端接口
// 发送 AJAX 请求到后端接口 $.operate.saveJson(prefix + "/storagePurchaseDetail", jsonData);
$.operate.saveJson(prefix + "/storagePurchase", jsonData); }
} }
$("input[name='arrivedTime']").datetimepicker({ $("input[name='arrivedTime']").datetimepicker({
@ -166,41 +195,26 @@
autoclose: true autoclose: true
}); });
//物料信息展示列表
$(function() { $(function() {
// 假设qualityOrderCode已经定义或者可以通过某种方式获取到 var options = {
var warehouseStorageCode = [[${warehouseStorageOrder.warehouseStorageCode}]]; // 这里需要实际赋值,比如从前端某个地方读取 modalName: "选择物料",
url: prefix + "/storagePurchaseDetailList",
$.getJSON(prefix + "/storagePurchaseDetailList?warehouseStorageCode=" + warehouseStorageCode, function(data) { queryParams: queryParams,
for (var supplierCode in data) { showSearch: false,
if (data.hasOwnProperty(supplierCode)) { showRefresh: false,
var supplierData = data[supplierCode]; showToggle: false,
createTableForSupplier(supplierCode, supplierData); showColumns: false,
} pagination: false, // 设置不分页
}
});
});
function createTableForSupplier(supplierCode, supplierData) {
var tableId = 'bootstrap-table-' + supplierCode.replace(/[^a-z0-9]/gi, '_').toLowerCase();
tableDatas.push(tableId);
var $tableWrapper = $('<div class="table-responsive mt-3"></div>');
// 确保supplierData至少有一条记录,并从中提取供应商详细信息
var supplierInfo = supplierData.length > 0 ? supplierData[0] : {}; // 默认为空对象,以防数据不存在
// 构建含有额外供应商信息的标题字符串
var headerTitle ='供应商'+'</br>'+supplierCode + ' - ' + (supplierInfo.supplierName || 'N/A') +
' </br> ' + (supplierInfo.customerContact || 'N/A') +
' - ' + (supplierInfo.contactNumber || 'N/A') +
' - ' + (supplierInfo.supplierAddress || 'N/A');
var $header = $('<h4>' + headerTitle + '</h4>');
var $table = $('<table id="' + tableId + '" class="table table-striped table-bordered"></table>');
$table.bootstrapTable({
data: supplierData,
columns: [{ columns: [{
checkbox: true checkbox: true
}, },
{
title: '入库单详情ID',
field: 'warehouseStorageDetailId',
visible: false
},
{ {
title: '供应商ID', title: '供应商ID',
field: 'supplierCode', field: 'supplierCode',
@ -225,10 +239,15 @@
title: '物料描述', title: '物料描述',
field: 'materialDescribe', field: 'materialDescribe',
}, },
{
title: '物料型号',
field: 'materialModel',
},
{ {
title: '物料品牌', title: '物料品牌',
field: 'materialBrand', field: 'materialBrand',
}, },
{ {
title: '物料单位', title: '物料单位',
field: 'materialUnit', field: 'materialUnit',
@ -249,7 +268,6 @@
{ {
title: '暂收已合格数', title: '暂收已合格数',
field: 'temporaryHasQualifiedNum', field: 'temporaryHasQualifiedNum',
visible: false,
}, },
{ {
title: '已入库数', title: '已入库数',
@ -265,11 +283,6 @@
field: 'actualArriveNum' field: 'actualArriveNum'
}, },
{
title: '暂收合格数',
field: 'temporaryQualifiedNum',
visible: false,
},
{ {
title: '暂收数量', title: '暂收数量',
field: 'temporaryQualifiedNum' field: 'temporaryQualifiedNum'
@ -291,13 +304,17 @@
{ {
title: '存放位置', title: '存放位置',
field: 'storageLocation', field: 'storageLocation',
}, },]
};
] $.table.init(options);
}); })
$tableWrapper.append($header).append($table); function queryParams(params) {
$('#tablesContainer').append($tableWrapper); var curParams = {
// 传递参数查询参数
warehouseStorageCode: warehouseStorageCode
};
return curParams;
} }

283
ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storagePurchaseWarehouse.html

@ -3,6 +3,7 @@
<head> <head>
<th:block th:include="include :: header('入库-采购单(仓库入库)')" /> <th:block th:include="include :: header('入库-采购单(仓库入库)')" />
<th:block th:include="include :: datetimepicker-css" /> <th:block th:include="include :: datetimepicker-css" />
<th:block th:include="include :: bootstrap-editable-css" />
<style> <style>
.supplier-value span { .supplier-value span {
@ -13,7 +14,7 @@
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-temporaryPurchaseWarehouse-edit" th:object="${warehouseStorageOrder}"> <form class="form-horizontal m" id="form-storagePurchaseWarehouse-edit" th:object="${warehouseStorageOrder}">
<input name="warehouseStorageId" th:field="*{warehouseStorageId}" type="hidden"> <input name="warehouseStorageId" th:field="*{warehouseStorageId}" type="hidden">
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">入库单号:</label> <label class="col-sm-4 control-label">入库单号:</label>
@ -35,6 +36,38 @@
</select> </select>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-4 control-label">供应商ID:</label>
<div class="col-sm-8">
<input name="supplierCode" th:field="*{supplierCode}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">供应商名称:</label>
<div class="col-sm-8">
<input name="supplierName" th:field="*{supplierName}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">联系人:</label>
<div class="col-sm-8">
<input name="customerContact" th:field="*{customerContact}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">联系人电话:</label>
<div class="col-sm-8">
<input name="contactNumber" th:field="*{contactNumber}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">联系人地址:</label>
<div class="col-sm-8">
<input name="supplierAddress" th:field="*{supplierAddress}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">到货时间:</label> <label class="col-sm-4 control-label">到货时间:</label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -74,11 +107,11 @@
</div> </div>
</div> </div>
<!--物料信息-->
<div class="container"> <div class="container">
<!--供应商物料相关-->
<div class="row"> <div class="row">
<div class="col-sm-12" id="tablesContainer"> <div class="col-sm-12 select-table table-striped">
<!-- 表格将在这里动态生成 --> <table id="bootstrap-table"></table>
</div> </div>
</div> </div>
</div> </div>
@ -92,67 +125,62 @@
var warehouseStorageCode = [[${warehouseStorageOrder.warehouseStorageCode}]] var warehouseStorageCode = [[${warehouseStorageOrder.warehouseStorageCode}]]
var warehouseCode = [[${warehouseStorageOrder.warehouseCode}]] var warehouseCode = [[${warehouseStorageOrder.warehouseCode}]]
var prefix = ctx + "warehouse/storageOrder"; var prefix = ctx + "warehouse/storageOrder";
$("#form-temporaryPurchaseWarehouse-edit").validate({ $("#form-storagePurchaseWarehouse-edit").validate({
focusCleanup: true focusCleanup: true
}); });
//生成的不同table的id集合 //生成的不同table的id集合
var tableDatas = [];
function submitHandler() { function submitHandler() {
const storageOrderData = $("#form-temporaryPurchaseWarehouse-edit").serializeArray().reduce((obj, item) => { if ($.validate.form()) {
obj[item.name] = item.value;
return obj;
}, {}); const storageOrderData = $("#form-storagePurchaseWarehouse-edit").serializeArray().reduce((obj, item) => {
// 初始化一个数组用于存放所有表格的数据 obj[item.name] = item.value;
let allMaterialDataList = []; return obj;
for(let i in tableDatas){ }, {});
$('#' + tableDatas[i]).each(function() {
const tableData = $(this).bootstrapTable('getData');
console.log(JSON.stringify(tableData)); var table = $('#bootstrap-table').bootstrapTable("getData");
// 将表数据转换成与qualityReportData格式一致的数组
var materialDataList = tableData.map(function (item) { var materialDataList = table.map(function(item) {
// 根据实际字段名调整 // 根据实际字段名调整
return { return {
"warehouseStorageDetailId":item.warehouseStorageDetailId, "warehouseStorageDetailId":item.warehouseStorageDetailId,
"supplierCode": item.supplierCode, "supplierCode": item.supplierCode,
"materialNo": item.materialNo, "materialNo": item.materialNo,
"materialName": item.materialName, "materialName": item.materialName,
"materialType": item.materialType, "materialType": item.materialType,
"materialPhotourl": item.materialPhotourl, "materialPhotourl": item.materialPhotourl,
"materialDescribe": item.materialDescribe, "materialDescribe": item.materialDescribe,
"materialBrand": item.materialBrand, "materialModel": item.materialModel,
"materialUnit": item.materialUnit, "materialBrand": item.materialBrand,
"materialProcessMethod": item.materialProcessMethod, "materialUnit": item.materialUnit,
"notifyHasArrivedNum": item.notifyHasArrivedNum, "materialProcessMethod": item.materialProcessMethod,
"actualHasArrivedNum": item.actualHasArrivedNum, "notifyHasArrivedNum": item.notifyHasArrivedNum,
"temporaryHasQualifiedNum": item.temporaryHasQualifiedNum, "actualHasArrivedNum": item.actualHasArrivedNum,
"qualityHasQualifiedNum": item.qualityHasQualifiedNum, "temporaryHasQualifiedNum": item.temporaryHasQualifiedNum,
"hasStorageNum": item.hasStorageNum, "hasStorageNum": item.hasStorageNum,
"notifyArriveNum": item.notifyArriveNum, "notifyArriveNum": item.notifyArriveNum,
"actualArriveNum": item.actualArriveNum, "actualArriveNum": item.actualArriveNum,
"temporaryQualifiedNum": item.temporaryQualifiedNum, "temporaryQualifiedNum": item.temporaryQualifiedNum,
"temporaryRemark": item.temporaryRemark, "temporaryRemark": item.temporaryRemark,
"temporaryReportUrl": item.temporaryReportUrl, "temporaryReportUrl": item.temporaryReportUrl,
"storageNum": item.storageNum, "storageNum": item.storageNum,
"storageLocation": item.storageLocation, "storageLocation": item.storageLocation,
// ...其他字段 // ...其他字段
}; };
});
allMaterialDataList = allMaterialDataList.concat(materialDataList);
}); });
}
const combinedData = Object.assign({}, storageOrderData, { const combinedData = Object.assign({}, storageOrderData, {
warehouseStorageOrderDetailList: allMaterialDataList warehouseStorageOrderDetailList: materialDataList,
}); });
// 合并表单数据和表格数据 // 合并表单数据和表格数据
// const combinedData = Object.assign({}, ...complaintNoticeData.array(item => ({ [item.name]: item.value })), ...materialData); console.log(combinedData)
console.log(combinedData) // 使用 JSON.stringify() 序列化数据
// 使用 JSON.stringify() 序列化数据 const jsonData = JSON.stringify(combinedData);
const jsonData = JSON.stringify(combinedData); // 发送 AJAX 请求到后端接口
// 发送 AJAX 请求到后端接口 $.operate.saveJson(prefix + "/storagePurchase", jsonData);
$.operate.saveJson(prefix + "/storagePurchaseWarehouse", jsonData); }
} }
$("input[name='arrivedTime']").datetimepicker({ $("input[name='arrivedTime']").datetimepicker({
@ -167,41 +195,26 @@
autoclose: true autoclose: true
}); });
//物料信息展示列表
$(function() { $(function() {
// 假设qualityOrderCode已经定义或者可以通过某种方式获取到 var options = {
var warehouseStorageCode = [[${warehouseStorageOrder.warehouseStorageCode}]]; // 这里需要实际赋值,比如从前端某个地方读取 modalName: "选择物料",
url: prefix + "/storagePurchaseWarehouseDetailList",
$.getJSON(prefix + "/storagePurchaseWarehouseDetailList?warehouseStorageCode=" + warehouseStorageCode, function(data) { queryParams: queryParams,
for (var supplierCode in data) { showSearch: false,
if (data.hasOwnProperty(supplierCode)) { showRefresh: false,
var supplierData = data[supplierCode]; showToggle: false,
createTableForSupplier(supplierCode, supplierData); showColumns: false,
} pagination: false, // 设置不分页
}
});
});
function createTableForSupplier(supplierCode, supplierData) {
var tableId = 'bootstrap-table-' + supplierCode.replace(/[^a-z0-9]/gi, '_').toLowerCase();
tableDatas.push(tableId);
var $tableWrapper = $('<div class="table-responsive mt-3"></div>');
// 确保supplierData至少有一条记录,并从中提取供应商详细信息
var supplierInfo = supplierData.length > 0 ? supplierData[0] : {}; // 默认为空对象,以防数据不存在
// 构建含有额外供应商信息的标题字符串
var headerTitle ='供应商'+'</br>'+supplierCode + ' - ' + (supplierInfo.supplierName || 'N/A') +
' </br> ' + (supplierInfo.customerContact || 'N/A') +
' - ' + (supplierInfo.contactNumber || 'N/A') +
' - ' + (supplierInfo.supplierAddress || 'N/A');
var $header = $('<h4>' + headerTitle + '</h4>');
var $table = $('<table id="' + tableId + '" class="table table-striped table-bordered"></table>');
$table.bootstrapTable({
data: supplierData,
columns: [{ columns: [{
checkbox: true checkbox: true
}, },
{
title: '入库单详情ID',
field: 'warehouseStorageDetailId',
visible: false
},
{ {
title: '供应商ID', title: '供应商ID',
field: 'supplierCode', field: 'supplierCode',
@ -226,10 +239,15 @@
title: '物料描述', title: '物料描述',
field: 'materialDescribe', field: 'materialDescribe',
}, },
{
title: '物料型号',
field: 'materialModel',
},
{ {
title: '物料品牌', title: '物料品牌',
field: 'materialBrand', field: 'materialBrand',
}, },
{ {
title: '物料单位', title: '物料单位',
field: 'materialUnit', field: 'materialUnit',
@ -250,11 +268,6 @@
{ {
title: '暂收已合格数', title: '暂收已合格数',
field: 'temporaryHasQualifiedNum', field: 'temporaryHasQualifiedNum',
visible: false,
},
{
title: '品质已合格数',
field: 'qualityHasQualifiedNum',
}, },
{ {
title: '已入库数', title: '已入库数',
@ -267,12 +280,12 @@
{ {
title: '实际到货数', title: '实际到货数',
field: 'actualArriveNum', field: 'actualArriveNum'
}, },
{ {
title: '暂收数量', title: '暂收数量',
field: 'temporaryQualifiedNum', field: 'temporaryQualifiedNum'
}, },
{ {
title: '暂收备注', title: '暂收备注',
@ -287,26 +300,78 @@
{ {
title: '入库数', title: '入库数',
field: 'storageNum', field: 'storageNum',
editable:{ editable: {
type: 'text', validate: function(value) {
mode:'inline', if ($.trim(value) === '') {
validate: function (v) { return '入库数不能为空';
if (!v) return '数量不能为空'; }
if (isNaN(v)) return '数量必须是数字'; if (isNaN(value)) {
var processBadNum = parseInt(v); return '请输入有效的数字';
if (processBadNum <= 0) return '数量必须是正整数'; }
if (value < 0) {
return '入库数不能小于0';
}
//不能为小数
if (value % 1 !== 0) {
return '入库数不能为小数';
}
},
},
formatter: function (value, row) {
// 检查 row 是否存在
if (!row) {
return "";
}
// 检查 storageNum 是否存在
if (row.storageNum === undefined || row.storageNum === null) {
return "";
}
// 根据 storageNum 的值决定返回值
if (row.storageNum) {
return row.storageNum;
} else {
return value;
} }
} }
}, },
{ {
title: '存放位置', title: '存放位置',
field: 'storageLocation', field: 'storageLocation',
editable: true editable: {
}] type: 'text',
}); mode:'inline',
},
formatter: function (value, row) {
// 检查 row 是否存在
if (!row) {
return "";
}
// 检查 storageLocation 是否存在
if (row.storageLocation === undefined || row.storageLocation === null) {
return "";
}
// 根据 storageLocation 的值决定返回值
if (row.storageLocation) {
return row.storageLocation;
} else {
return value;
}
}
},]
};
$.table.init(options);
})
$tableWrapper.append($header).append($table); function queryParams(params) {
$('#tablesContainer').append($tableWrapper); var curParams = {
// 传递参数查询参数
warehouseStorageCode: warehouseStorageCode
};
return curParams;
} }

215
ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storagePurchaseWarehouseDetail.html

@ -3,6 +3,7 @@
<head> <head>
<th:block th:include="include :: header('入库-采购单(仓库入库)详情')" /> <th:block th:include="include :: header('入库-采购单(仓库入库)详情')" />
<th:block th:include="include :: datetimepicker-css" /> <th:block th:include="include :: datetimepicker-css" />
<th:block th:include="include :: bootstrap-editable-css" />
<style> <style>
.supplier-value span { .supplier-value span {
@ -35,6 +36,38 @@
</select> </select>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-4 control-label">供应商ID:</label>
<div class="col-sm-8">
<input name="supplierCode" th:field="*{supplierCode}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">供应商名称:</label>
<div class="col-sm-8">
<input name="supplierName" th:field="*{supplierName}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">联系人:</label>
<div class="col-sm-8">
<input name="customerContact" th:field="*{customerContact}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">联系人电话:</label>
<div class="col-sm-8">
<input name="contactNumber" th:field="*{contactNumber}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">联系人地址:</label>
<div class="col-sm-8">
<input name="supplierAddress" th:field="*{supplierAddress}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">到货时间:</label> <label class="col-sm-4 control-label">到货时间:</label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -74,11 +107,11 @@
</div> </div>
</div> </div>
<!--物料信息-->
<div class="container"> <div class="container">
<!--供应商物料相关-->
<div class="row"> <div class="row">
<div class="col-sm-12" id="tablesContainer"> <div class="col-sm-12 select-table table-striped">
<!-- 表格将在这里动态生成 --> <table id="bootstrap-table"></table>
</div> </div>
</div> </div>
</div> </div>
@ -96,62 +129,57 @@
focusCleanup: true focusCleanup: true
}); });
//生成的不同table的id集合
var tableDatas = [];
function submitHandler() { function submitHandler() {
const storageOrderData = $("#form-temporaryPurchaseWarehouse-edit").serializeArray().reduce((obj, item) => { if ($.validate.form()) {
obj[item.name] = item.value;
return obj;
}, {}); const storageOrderData = $("#form-temporaryPurchaseWarehouse-edit").serializeArray().reduce((obj, item) => {
// 初始化一个数组用于存放所有表格的数据 obj[item.name] = item.value;
let allMaterialDataList = []; return obj;
for(let i in tableDatas){ }, {});
$('#' + tableDatas[i]).each(function() {
const tableData = $(this).bootstrapTable('getData');
console.log(JSON.stringify(tableData)); var table = $('#bootstrap-table').bootstrapTable("getData");
// 将表数据转换成与qualityReportData格式一致的数组
var materialDataList = tableData.map(function (item) { var materialDataList = table.map(function(item) {
// 根据实际字段名调整 // 根据实际字段名调整
return { return {
"supplierCode": item.supplierCode, "warehouseStorageDetailId":item.warehouseStorageDetailId,
"materialNo": item.materialNo, "supplierCode": item.supplierCode,
"materialName": item.materialName, "materialNo": item.materialNo,
"materialType": item.materialType, "materialName": item.materialName,
"materialPhotourl": item.materialPhotourl, "materialType": item.materialType,
"materialDescribe": item.materialDescribe, "materialPhotourl": item.materialPhotourl,
"materialBrand": item.materialBrand, "materialDescribe": item.materialDescribe,
"materialUnit": item.materialUnit, "materialModel": item.materialModel,
"materialProcessMethod": item.materialProcessMethod, "materialBrand": item.materialBrand,
"notifyHasArrivedNum": item.notifyHasArrivedNum, "materialUnit": item.materialUnit,
"actualHasArrivedNum": item.actualHasArrivedNum, "materialProcessMethod": item.materialProcessMethod,
"temporaryHasQualifiedNum": item.temporaryHasQualifiedNum, "notifyHasArrivedNum": item.notifyHasArrivedNum,
"qualityHasQualifiedNum": item.qualityHasQualifiedNum, "actualHasArrivedNum": item.actualHasArrivedNum,
"hasStorageNum": item.hasStorageNum, "temporaryHasQualifiedNum": item.temporaryHasQualifiedNum,
"notifyArriveNum": item.notifyArriveNum, "hasStorageNum": item.hasStorageNum,
"actualArriveNum": item.actualArriveNum, "notifyArriveNum": item.notifyArriveNum,
"temporaryQualifiedNum": item.temporaryQualifiedNum, "actualArriveNum": item.actualArriveNum,
"temporaryRemark": item.temporaryRemark, "temporaryQualifiedNum": item.temporaryQualifiedNum,
"temporaryReportUrl": item.temporaryReportUrl, "temporaryRemark": item.temporaryRemark,
"storageNum": item.storageNum, "temporaryReportUrl": item.temporaryReportUrl,
"storageLocation": item.storageLocation, "storageNum": item.storageNum,
// ...其他字段 "storageLocation": item.storageLocation,
}; // ...其他字段
}); };
allMaterialDataList = allMaterialDataList.concat(materialDataList);
}); });
}
const combinedData = Object.assign({}, storageOrderData, { const combinedData = Object.assign({}, storageOrderData, {
warehouseStorageOrderDetailList: allMaterialDataList warehouseStorageOrderDetailList: materialDataList,
}); });
// 合并表单数据和表格数据 // 合并表单数据和表格数据
// const combinedData = Object.assign({}, ...complaintNoticeData.array(item => ({ [item.name]: item.value })), ...materialData); console.log(combinedData)
console.log(combinedData) // 使用 JSON.stringify() 序列化数据
// 使用 JSON.stringify() 序列化数据 const jsonData = JSON.stringify(combinedData);
const jsonData = JSON.stringify(combinedData); // 发送 AJAX 请求到后端接口
// 发送 AJAX 请求到后端接口 $.operate.saveJson(prefix + "/storagePurchase", jsonData);
$.operate.saveJson(prefix + "/storagePurchaseWarehouseDetail", jsonData); }
} }
$("input[name='arrivedTime']").datetimepicker({ $("input[name='arrivedTime']").datetimepicker({
@ -166,41 +194,26 @@
autoclose: true autoclose: true
}); });
//物料信息展示列表
$(function() { $(function() {
// 假设qualityOrderCode已经定义或者可以通过某种方式获取到 var options = {
var warehouseStorageCode = [[${warehouseStorageOrder.warehouseStorageCode}]]; // 这里需要实际赋值,比如从前端某个地方读取 modalName: "选择物料",
url: prefix + "/storagePurchaseWarehouseDetailList",
$.getJSON(prefix + "/storagePurchaseWarehouseDetailList?warehouseStorageCode=" + warehouseStorageCode, function(data) { queryParams: queryParams,
for (var supplierCode in data) { showSearch: false,
if (data.hasOwnProperty(supplierCode)) { showRefresh: false,
var supplierData = data[supplierCode]; showToggle: false,
createTableForSupplier(supplierCode, supplierData); showColumns: false,
} pagination: false, // 设置不分页
}
});
});
function createTableForSupplier(supplierCode, supplierData) {
var tableId = 'bootstrap-table-' + supplierCode.replace(/[^a-z0-9]/gi, '_').toLowerCase();
tableDatas.push(tableId);
var $tableWrapper = $('<div class="table-responsive mt-3"></div>');
// 确保supplierData至少有一条记录,并从中提取供应商详细信息
var supplierInfo = supplierData.length > 0 ? supplierData[0] : {}; // 默认为空对象,以防数据不存在
// 构建含有额外供应商信息的标题字符串
var headerTitle ='供应商'+'</br>'+supplierCode + ' - ' + (supplierInfo.supplierName || 'N/A') +
' </br> ' + (supplierInfo.customerContact || 'N/A') +
' - ' + (supplierInfo.contactNumber || 'N/A') +
' - ' + (supplierInfo.supplierAddress || 'N/A');
var $header = $('<h4>' + headerTitle + '</h4>');
var $table = $('<table id="' + tableId + '" class="table table-striped table-bordered"></table>');
$table.bootstrapTable({
data: supplierData,
columns: [{ columns: [{
checkbox: true checkbox: true
}, },
{
title: '入库单详情ID',
field: 'warehouseStorageDetailId',
visible: false
},
{ {
title: '供应商ID', title: '供应商ID',
field: 'supplierCode', field: 'supplierCode',
@ -225,10 +238,15 @@
title: '物料描述', title: '物料描述',
field: 'materialDescribe', field: 'materialDescribe',
}, },
{
title: '物料型号',
field: 'materialModel',
},
{ {
title: '物料品牌', title: '物料品牌',
field: 'materialBrand', field: 'materialBrand',
}, },
{ {
title: '物料单位', title: '物料单位',
field: 'materialUnit', field: 'materialUnit',
@ -249,11 +267,6 @@
{ {
title: '暂收已合格数', title: '暂收已合格数',
field: 'temporaryHasQualifiedNum', field: 'temporaryHasQualifiedNum',
visible: false,
},
{
title: '品质已合格数',
field: 'qualityHasQualifiedNum',
}, },
{ {
title: '已入库数', title: '已入库数',
@ -266,12 +279,12 @@
{ {
title: '实际到货数', title: '实际到货数',
field: 'actualArriveNum', field: 'actualArriveNum'
}, },
{ {
title: '暂收数量', title: '暂收数量',
field: 'temporaryQualifiedNum', field: 'temporaryQualifiedNum'
}, },
{ {
title: '暂收备注', title: '暂收备注',
@ -290,11 +303,17 @@
{ {
title: '存放位置', title: '存放位置',
field: 'storageLocation', field: 'storageLocation',
}] },]
}); };
$.table.init(options);
})
$tableWrapper.append($header).append($table); function queryParams(params) {
$('#tablesContainer').append($tableWrapper); var curParams = {
// 传递参数查询参数
warehouseStorageCode: warehouseStorageCode
};
return curParams;
} }

Loading…
Cancel
Save