Browse Source

[fix]品质管理 入库管理

设置仓库入库单暂存时间
设置品质管理品质单暂存时间
修改品质管理品质单报告的前端提交方法
dev
liuxiaoxu 5 months ago
parent
commit
67d427bd38
  1. 2
      ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderServiceImpl.java
  2. 6
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java
  3. 8
      ruoyi-admin/src/main/resources/templates/quality/qualityOrder/qualityOrderReport.html

2
ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderServiceImpl.java

@ -105,7 +105,7 @@ public class QualityOrderServiceImpl implements IQualityOrderService
{
String loginName = ShiroUtils.getLoginName();
qualityOrder.setUpdateBy(loginName);
qualityOrder.setUpdateTime(DateUtils.getNowDate());
qualityOrder.setUpdateTime(new Date());
List<QualityOrderDetail> qualityOrderDetailList = qualityOrder.getQualityOrderDetailList();
//根据品质单号从数据库查询

6
ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java

@ -104,7 +104,7 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS
{
String loginName = ShiroUtils.getLoginName();
warehouseStorageOrder.setUpdateBy(loginName);
warehouseStorageOrder.setUpdateTime(DateUtils.getNowDate());
warehouseStorageOrder.setUpdateTime(new Date());
List<WarehouseStorageOrderDetail> storageOrderDetailList = warehouseStorageOrder.getWarehouseStorageOrderDetailList();
@ -145,6 +145,8 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS
warehouseStorageOrder.setUpdateBy(loginName);
warehouseStorageOrder.setUpdateTime(DateUtils.getNowDate());
warehouseStorageOrder.setWarehouseStorageStatus("1");
//设置暂存时间
warehouseStorageOrder.setTemporaryTime(new Date());
updateWarehouseStorageOrderDetails(warehouseStorageOrder);
int updateResult = warehouseStorageOrderMapper.updateWarehouseStorageOrder(warehouseStorageOrder);
@ -178,6 +180,8 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS
warehouseStorageOrder.setWarehouseStorageStatus("2");
//目前假设全部品质
warehouseStorageOrder.setWarehouseQualityStatus("2");
//设置品质时间
warehouseStorageOrder.setQualityTime(new Date());
for (QualityOrderDetail qualityOrderDetail : qualityOrderDetailList) {
WarehouseStorageOrderDetail storageOrderDetail = new WarehouseStorageOrderDetail();
storageOrderDetail.setWarehouseStorageCode(qualityOrder.getInStorageCode());

8
ruoyi-admin/src/main/resources/templates/quality/qualityOrder/qualityOrderReport.html

@ -109,6 +109,7 @@
});
function submitHandler() {
if ($.validate.form()) {
// 获取表单数据
const qualityReportData = $("#form-qualityOrderReport-edit").serializeArray().reduce((obj, item) => {
obj[item.name] = item.value;
@ -117,13 +118,13 @@
// 获取bootstrap-table的数据,这里假设你使用bootstrap-table的API获取所有数据
var table = $('#bootstrap-unqualified-table').bootstrapTable('getData');
// 检查表格数据是否为空
if (table.length===0){
if (table.length === 0) {
$.modal.alertWarning("请至少添加一条不合格数再保存!");
return;
}
console.log(JSON.stringify(table));
// 将表数据转换成与qualityReportData格式一致的数组
var unqualifiedDataList = table.map(function(item) {
var unqualifiedDataList = table.map(function (item) {
// 根据实际字段名调整
return {
"processBadClassification": item.processBadClassification,
@ -134,7 +135,7 @@
};
});
const combinedData = Object.assign({}, qualityReportData, { unqualifiedDataList: unqualifiedDataList });
const combinedData = Object.assign({}, qualityReportData, {unqualifiedDataList: unqualifiedDataList});
// 合并表单数据和表格数据
// const combinedData = Object.assign({}, ...complaintNoticeData.array(item => ({ [item.name]: item.value })), ...materialData);
console.log(combinedData)
@ -143,6 +144,7 @@
// 发送 AJAX 请求到后端接口
$.operate.saveJson(prefix + "/qualityReport", jsonData);
}
}
$("input[name='checkoutCompletionTime']").datetimepicker({
format: "yyyy-mm-dd",

Loading…
Cancel
Save