Browse Source

[feat]品质管理:

退换货详情
新增入库后退换货详情品质报告不合格数页面afterQualityReportDetail.html
新增入库后退换货详情质报告不合格数按钮
新增入库后退换货详情质报告不合格数接口
新增通过物料号和退货单号查询退换货详情信息
dev
liuxiaoxu 6 months ago
parent
commit
30e060eee0
  1. 49
      ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityRefundsExchangesController.java
  2. 5
      ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityRefundsExchangesDetailMapper.java
  3. 7
      ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityRefundsExchangesUnqualifiedMapper.java
  4. 9
      ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesDetailService.java
  5. 5
      ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesUnqualifiedService.java
  6. 15
      ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesDetailServiceImpl.java
  7. 10
      ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesUnqualifiedServiceImpl.java
  8. 6
      ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesDetailMapper.xml
  9. 6
      ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesUnqualifiedMapper.xml
  10. 139
      ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/afterQualityReportDetail.html
  11. 15
      ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/returnAfterStorageDetail.html

49
ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityRefundsExchangesController.java

@ -280,4 +280,53 @@ public class QualityRefundsExchangesController extends BaseController
} }
/**
* 入库后品质报告不合格数详情页面
*/
@GetMapping("/afterQualityReportDetail")
public String afterQualityReportDetail( @RequestParam("materialNo") String materialNo,
@RequestParam("refundsExchangesCode") String refundsExchangesCode, ModelMap mmap)
{
if (StringUtils.isEmpty(materialNo)){
log.warn("物料号为空:{}",materialNo);
}
if (StringUtils.isEmpty(refundsExchangesCode)){
log.warn("退换货号为空:{}",refundsExchangesCode);
}
QualityRefundsExchangesDetail refundsExchangesDetail = new QualityRefundsExchangesDetail();
refundsExchangesDetail.setRefundsExchangesCode(refundsExchangesCode);
refundsExchangesDetail.setMaterialNo(materialNo);
QualityRefundsExchangesDetail qualityRefundsExchangesDetail = refundsExchangesDetailService.selectQualityRefundsExchangesDetailByCodeAndNo(refundsExchangesDetail);
mmap.put("materialNo",materialNo);
mmap.put("refundsExchangesCode",refundsExchangesCode);
mmap.put("qualityRefundsExchangesDetail",qualityRefundsExchangesDetail);
return prefix + "/afterQualityReportDetail";
}
/**
* 保存入库后品质单报告不合格数详情页
*/
@Log(title = "品质管理品质单", businessType = BusinessType.INSERT)
@PostMapping("/afterQualityReportDetail")
@ResponseBody
public AjaxResult afterQualityReportDetailSave(QualityRefundsExchangesDetail refundsExchangesDetail)
{
return toAjax(refundsExchangesDetailService.saveAfterQualityRefundsExchangesDetail(refundsExchangesDetail));
}
/**
* 入库后品质报告不合格数信息列表
* */
@ResponseBody
@PostMapping("/getAfterQualityReportDetail")
public TableDataInfo getAfterQualityReportDetail(QualityRefundsExchangesDetail qualityRefundsExchangesDetail){
startPage();
List<QualityRefundsExchangesUnqualified> list = refundsExchangesUnqualifiedService.selectRefundsExchangesUnqualifiedListByCodeAndNo(qualityRefundsExchangesDetail);
return getDataTable(list);
}
} }

5
ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityRefundsExchangesDetailMapper.java

@ -82,4 +82,9 @@ public interface QualityRefundsExchangesDetailMapper
* @return 品质管理退换货单详情集合 * @return 品质管理退换货单详情集合
*/ */
List<QualityRefundsExchangesDetail> selectRefundsExchangesDetailListByCode(String refundsExchangesCode); List<QualityRefundsExchangesDetail> selectRefundsExchangesDetailListByCode(String refundsExchangesCode);
/*
* 通过物料号和退货单号查询退换货详情信息
* */
QualityRefundsExchangesDetail selectQualityRefundsExchangesDetailByCodeAndNo(QualityRefundsExchangesDetail refundsExchangesDetail);
} }

7
ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityRefundsExchangesUnqualifiedMapper.java

@ -1,6 +1,8 @@
package com.ruoyi.quality.mapper; package com.ruoyi.quality.mapper;
import java.util.List; import java.util.List;
import com.ruoyi.quality.domain.QualityRefundsExchangesDetail;
import com.ruoyi.quality.domain.QualityRefundsExchangesUnqualified; import com.ruoyi.quality.domain.QualityRefundsExchangesUnqualified;
/** /**
@ -82,4 +84,9 @@ public interface QualityRefundsExchangesUnqualifiedMapper
* @return 品质管理退换货不合格分类 * @return 品质管理退换货不合格分类
*/ */
QualityRefundsExchangesUnqualified selectRefundsExchangesUnqualifiedByNoAndCode(QualityRefundsExchangesUnqualified refundsExchangesUnqualified); QualityRefundsExchangesUnqualified selectRefundsExchangesUnqualifiedByNoAndCode(QualityRefundsExchangesUnqualified refundsExchangesUnqualified);
/*
* 通过物料号和退货单号查询退换货不合格分类集合
* */
List<QualityRefundsExchangesUnqualified> selectRefundsExchangesUnqualifiedListByCodeAndNo(QualityRefundsExchangesDetail qualityRefundsExchangesDetail);
} }

9
ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesDetailService.java

@ -2,6 +2,7 @@ package com.ruoyi.quality.service;
import java.util.List; import java.util.List;
import com.ruoyi.quality.domain.QualityRefundsExchangesDetail; import com.ruoyi.quality.domain.QualityRefundsExchangesDetail;
import com.ruoyi.quality.domain.QualityRefundsExchangesUnqualified;
/** /**
* 品质管理退换货单详情Service接口 * 品质管理退换货单详情Service接口
@ -82,4 +83,12 @@ public interface IQualityRefundsExchangesDetailService
*/ */
int restoreQualityRefundsExchangesDetailById(Long refundsExchangesDetailId); int restoreQualityRefundsExchangesDetailById(Long refundsExchangesDetailId);
/*通过物料号和退货单号查询退换货详情信息*/
QualityRefundsExchangesDetail selectQualityRefundsExchangesDetailByCodeAndNo(QualityRefundsExchangesDetail refundsExchangesDetail);
/*
* 保存入库后退货详情品质报告
* */
int saveAfterQualityRefundsExchangesDetail(QualityRefundsExchangesDetail refundsExchangesDetail);
} }

5
ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesUnqualifiedService.java

@ -1,6 +1,8 @@
package com.ruoyi.quality.service; package com.ruoyi.quality.service;
import java.util.List; import java.util.List;
import com.ruoyi.quality.domain.QualityRefundsExchangesDetail;
import com.ruoyi.quality.domain.QualityRefundsExchangesUnqualified; import com.ruoyi.quality.domain.QualityRefundsExchangesUnqualified;
/** /**
@ -86,4 +88,7 @@ public interface IQualityRefundsExchangesUnqualifiedService
* 新增保存品质单报告不良分类 * 新增保存品质单报告不良分类
*/ */
int addRefundsExchangesUnqualified(QualityRefundsExchangesUnqualified refundsExchangesUnqualified); int addRefundsExchangesUnqualified(QualityRefundsExchangesUnqualified refundsExchangesUnqualified);
/*通过物料号和退货单号查询退换货不合格分类集合*/
List<QualityRefundsExchangesUnqualified> selectRefundsExchangesUnqualifiedListByCodeAndNo(QualityRefundsExchangesDetail qualityRefundsExchangesDetail);
} }

15
ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesDetailServiceImpl.java

@ -161,4 +161,19 @@ public class QualityRefundsExchangesDetailServiceImpl implements IQualityRefunds
{ {
return qualityRefundsExchangesDetailMapper.restoreQualityRefundsExchangesDetailById(refundsExchangesDetailId); return qualityRefundsExchangesDetailMapper.restoreQualityRefundsExchangesDetailById(refundsExchangesDetailId);
} }
/*
* 通过物料号和退货单号查询退换货详情信息
* */
@Override
public QualityRefundsExchangesDetail selectQualityRefundsExchangesDetailByCodeAndNo(QualityRefundsExchangesDetail refundsExchangesDetail) {
return qualityRefundsExchangesDetailMapper.selectQualityRefundsExchangesDetailByCodeAndNo(refundsExchangesDetail);
}
@Override
public int saveAfterQualityRefundsExchangesDetail(QualityRefundsExchangesDetail refundsExchangesDetail) {
return 1;
}
} }

10
ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesUnqualifiedServiceImpl.java

@ -3,6 +3,7 @@ package com.ruoyi.quality.service.impl;
import java.util.List; import java.util.List;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.quality.domain.QualityRefundsExchangesDetail;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.ruoyi.quality.mapper.QualityRefundsExchangesUnqualifiedMapper; import com.ruoyi.quality.mapper.QualityRefundsExchangesUnqualifiedMapper;
@ -148,4 +149,13 @@ public class QualityRefundsExchangesUnqualifiedServiceImpl implements IQualityRe
refundsExchangesUnqualified.setUpdateTime(DateUtils.getNowDate()); refundsExchangesUnqualified.setUpdateTime(DateUtils.getNowDate());
return qualityRefundsExchangesUnqualifiedMapper.insertQualityRefundsExchangesUnqualified(refundsExchangesUnqualified); return qualityRefundsExchangesUnqualifiedMapper.insertQualityRefundsExchangesUnqualified(refundsExchangesUnqualified);
} }
/*
* 通过物料号和退货单号查询退换货不合格分类集合
* */
@Override
public List<QualityRefundsExchangesUnqualified> selectRefundsExchangesUnqualifiedListByCodeAndNo(QualityRefundsExchangesDetail qualityRefundsExchangesDetail) {
return qualityRefundsExchangesUnqualifiedMapper.selectRefundsExchangesUnqualifiedListByCodeAndNo(qualityRefundsExchangesDetail);
}
} }

6
ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesDetailMapper.xml

@ -60,6 +60,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where refunds_exchanges_code = #{refundsExchangesCode} where refunds_exchanges_code = #{refundsExchangesCode}
</select> </select>
<select id="selectQualityRefundsExchangesDetailByCodeAndNo" parameterType="QualityRefundsExchangesDetail" resultMap="QualityRefundsExchangesDetailResult">
<include refid="selectQualityRefundsExchangesDetailVo"/>
where refunds_exchanges_code = #{refundsExchangesCode}
and material_no = #{materialNo}
</select>
<insert id="insertQualityRefundsExchangesDetail" parameterType="QualityRefundsExchangesDetail" useGeneratedKeys="true" keyProperty="refundsExchangesDetailId"> <insert id="insertQualityRefundsExchangesDetail" parameterType="QualityRefundsExchangesDetail" useGeneratedKeys="true" keyProperty="refundsExchangesDetailId">
insert into quality_refunds_exchanges_detail insert into quality_refunds_exchanges_detail

6
ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesUnqualifiedMapper.xml

@ -44,6 +44,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectRefundsExchangesUnqualifiedListByCodeAndNo" parameterType="QualityRefundsExchangesUnqualified" resultMap="QualityRefundsExchangesUnqualifiedResult">
<include refid="selectQualityRefundsExchangesUnqualifiedVo"/>
where refunds_exchanges_code = #{refundsExchangesCode}
and material_no = #{materialNo}
</select>
<insert id="insertQualityRefundsExchangesUnqualified" parameterType="QualityRefundsExchangesUnqualified" useGeneratedKeys="true" keyProperty="refundsExchangesUnqualifiedId"> <insert id="insertQualityRefundsExchangesUnqualified" parameterType="QualityRefundsExchangesUnqualified" useGeneratedKeys="true" keyProperty="refundsExchangesUnqualifiedId">
insert into quality_refunds_exchanges_unqualified insert into quality_refunds_exchanges_unqualified
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">

139
ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/afterQualityReportDetail.html

@ -0,0 +1,139 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改品质管理退换货报告')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-afterQualityReportDetail-edit" th:object="${qualityRefundsExchangesDetail}">
<input name="materialNo" th:field="*{materialNo}" type="hidden">
<div class="container">
<!--不合格数-->
<div class="col-sm-12">
<div class="row">
<div class="col-sm-12 d-flex align-items-center">
<span style="font-weight: bold; font-family: Arial, sans-serif; font-size: 15px;">不合格数</span>
</div>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-afterUnqualifiedDetail-table"></table>
</div>
</div>
</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="inspectionTime" th:value="${#dates.format(qualityRefundsExchangesDetail.inspectionTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" 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 name="remark" th:field="*{remark}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: bootstrap-table-editable-js"/>
<script th:inline="javascript">
var prefix = ctx + "quality/refundsExchanges";
var materialNo = /*[[${materialNo}]]*/'';
var refundsExchangesCode = /*[[${refundsExchangesCode}]]*/'';
var processBadClassificationDatas = [[${@dict.getType('process_bad_classification')}]];
var processBadGradeDatas = [[${@dict.getType('process_bad_grade')}]];
var $table = $("#bootstrap-afterUnqualifiedDetail-table");
$("input[name='inspectionTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("#form-afterQualityReportDetail-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/afterQualityReportDetail", $('#form-afterQualityReportDetail-edit').serialize());
}
}
//收款凭证table列表
$(function() {
var options = {
id:"bootstrap-afterUnqualifiedDetail-table",
url: ctx + "quality/refundsExchanges/getAfterQualityReportDetail",
modalName: "收款凭证",
showColumns: false,
pagination: false,
showToggle: false,
showRefresh:false,
showSearch:false,
singleSelect:true,
queryParams:queryParams,
columns: [{
checkbox: false
},
{
title: '品质报告单id',
field: 'qualityOrderReportId',
visible: false
},
{
title: '不良分类',
field: 'processBadClassification',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processBadClassificationDatas, value);
}
},
{
title: '不良等级',
field: 'processBadGrade',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processBadGradeDatas, value);
}
},
{
title: '数量',
field: 'processBadNum',
},
{
title: '报告',
field: 'unqualifiedReportUrl',
},
]
};
$.table.init(options);
});
function queryParams(params){
var curParams = {
//传递查询参数
materialNo : materialNo,
refundsExchangesCode :refundsExchangesCode
}
return curParams;
}
</script>
</body>
</html>

15
ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/returnAfterStorageDetail.html

@ -11,14 +11,14 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">退换货单号:</label> <label class="col-sm-3 control-label">退换货单号:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="refundsExchangesCode" th:field="*{refundsExchangesCode}" class="form-control" type="text"> <input name="refundsExchangesCode" th:field="*{refundsExchangesCode}" class="form-control" type="text" disabled>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">交检时间:</label> <label class="col-sm-3 control-label">交检时间:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group date"> <div class="input-group date">
<input name="deliveryInspectionTime" th:value="${#dates.format(qualityRefundsExchanges.deliveryInspectionTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> <input name="deliveryInspectionTime" th:value="${#dates.format(qualityRefundsExchanges.deliveryInspectionTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" disabled>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
@ -26,7 +26,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">品质备注:</label> <label class="col-sm-3 control-label">品质备注:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="qualityRemark" th:field="*{qualityRemark}" class="form-control" type="text"> <input name="qualityRemark" th:field="*{qualityRemark}" class="form-control" type="text" disabled>
</div> </div>
</div> </div>
</form> </form>
@ -163,7 +163,7 @@
formatter: function(value, row, index) { formatter: function(value, row, index) {
// 这里直接使用row对象获取refundsExchangesCode,假设它是存在的 // 这里直接使用row对象获取refundsExchangesCode,假设它是存在的
var actions = []; var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="qualityReport(\'' + row.materialNo + '\', \'' + refundsExchangesCode + '\')"><i class="fa fa-plus"></i>报告</a> '); actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="qualityReport(\'' + row.materialNo + '\', \'' + row.refundsExchangesCode + '\')"><i class="fa fa-plus"></i>报告</a> ');
return actions.join(''); return actions.join('');
} }
}, },
@ -214,9 +214,10 @@
var queryParams = new URLSearchParams(); var queryParams = new URLSearchParams();
queryParams.append('materialNo', materialNo); queryParams.append('materialNo', materialNo);
queryParams.append('refundsExchangesCode', encodeURIComponent(refundsExchangesCode)); queryParams.append('refundsExchangesCode', encodeURIComponent(refundsExchangesCode));
console.log("materialNo:"+materialNo);
var url = ctx + 'quality/refundsExchanges/qualityReport?' + queryParams.toString(); console.log("refundsExchangesCode:"+refundsExchangesCode);
$.modal.open("品质报告", url); var url = ctx + 'quality/refundsExchanges/afterQualityReportDetail?' + queryParams.toString();
$.modal.open("品质报告详情", url);
} }
</script> </script>

Loading…
Cancel
Save