diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityRefundsExchangesController.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityRefundsExchangesController.java index a1fc5c66..6116a10e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityRefundsExchangesController.java +++ b/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 list = refundsExchangesUnqualifiedService.selectRefundsExchangesUnqualifiedListByCodeAndNo(qualityRefundsExchangesDetail); + return getDataTable(list); + } + + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityRefundsExchangesDetailMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityRefundsExchangesDetailMapper.java index 2402ca44..0f8e2319 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityRefundsExchangesDetailMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityRefundsExchangesDetailMapper.java @@ -82,4 +82,9 @@ public interface QualityRefundsExchangesDetailMapper * @return 品质管理退换货单详情集合 */ List selectRefundsExchangesDetailListByCode(String refundsExchangesCode); + + /* + * 通过物料号和退货单号查询退换货详情信息 + * */ + QualityRefundsExchangesDetail selectQualityRefundsExchangesDetailByCodeAndNo(QualityRefundsExchangesDetail refundsExchangesDetail); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityRefundsExchangesUnqualifiedMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityRefundsExchangesUnqualifiedMapper.java index 17f2de56..da964bb4 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityRefundsExchangesUnqualifiedMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityRefundsExchangesUnqualifiedMapper.java @@ -1,6 +1,8 @@ package com.ruoyi.quality.mapper; import java.util.List; + +import com.ruoyi.quality.domain.QualityRefundsExchangesDetail; import com.ruoyi.quality.domain.QualityRefundsExchangesUnqualified; /** @@ -82,4 +84,9 @@ public interface QualityRefundsExchangesUnqualifiedMapper * @return 品质管理退换货不合格分类 */ QualityRefundsExchangesUnqualified selectRefundsExchangesUnqualifiedByNoAndCode(QualityRefundsExchangesUnqualified refundsExchangesUnqualified); + + /* + * 通过物料号和退货单号查询退换货不合格分类集合 + * */ + List selectRefundsExchangesUnqualifiedListByCodeAndNo(QualityRefundsExchangesDetail qualityRefundsExchangesDetail); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesDetailService.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesDetailService.java index aa603d7f..40023f9f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesDetailService.java +++ b/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 com.ruoyi.quality.domain.QualityRefundsExchangesDetail; +import com.ruoyi.quality.domain.QualityRefundsExchangesUnqualified; /** * 品质管理退换货单详情Service接口 @@ -82,4 +83,12 @@ public interface IQualityRefundsExchangesDetailService */ int restoreQualityRefundsExchangesDetailById(Long refundsExchangesDetailId); + /*通过物料号和退货单号查询退换货详情信息*/ + QualityRefundsExchangesDetail selectQualityRefundsExchangesDetailByCodeAndNo(QualityRefundsExchangesDetail refundsExchangesDetail); + + /* + * 保存入库后退货详情品质报告 + * */ + int saveAfterQualityRefundsExchangesDetail(QualityRefundsExchangesDetail refundsExchangesDetail); + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesUnqualifiedService.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesUnqualifiedService.java index 799f11e5..ac84332f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesUnqualifiedService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesUnqualifiedService.java @@ -1,6 +1,8 @@ package com.ruoyi.quality.service; import java.util.List; + +import com.ruoyi.quality.domain.QualityRefundsExchangesDetail; import com.ruoyi.quality.domain.QualityRefundsExchangesUnqualified; /** @@ -86,4 +88,7 @@ public interface IQualityRefundsExchangesUnqualifiedService * 新增保存品质单报告不良分类 */ int addRefundsExchangesUnqualified(QualityRefundsExchangesUnqualified refundsExchangesUnqualified); + + /*通过物料号和退货单号查询退换货不合格分类集合*/ + List selectRefundsExchangesUnqualifiedListByCodeAndNo(QualityRefundsExchangesDetail qualityRefundsExchangesDetail); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesDetailServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesDetailServiceImpl.java index d14cba8f..1bb023d9 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesDetailServiceImpl.java +++ b/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); } + + /* + * 通过物料号和退货单号查询退换货详情信息 + * */ + @Override + public QualityRefundsExchangesDetail selectQualityRefundsExchangesDetailByCodeAndNo(QualityRefundsExchangesDetail refundsExchangesDetail) { + + return qualityRefundsExchangesDetailMapper.selectQualityRefundsExchangesDetailByCodeAndNo(refundsExchangesDetail); + } + + @Override + public int saveAfterQualityRefundsExchangesDetail(QualityRefundsExchangesDetail refundsExchangesDetail) { + + return 1; + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesUnqualifiedServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesUnqualifiedServiceImpl.java index 8c54e285..4f67ab1a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesUnqualifiedServiceImpl.java +++ b/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 com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.ShiroUtils; +import com.ruoyi.quality.domain.QualityRefundsExchangesDetail; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.quality.mapper.QualityRefundsExchangesUnqualifiedMapper; @@ -148,4 +149,13 @@ public class QualityRefundsExchangesUnqualifiedServiceImpl implements IQualityRe refundsExchangesUnqualified.setUpdateTime(DateUtils.getNowDate()); return qualityRefundsExchangesUnqualifiedMapper.insertQualityRefundsExchangesUnqualified(refundsExchangesUnqualified); } + + /* + * 通过物料号和退货单号查询退换货不合格分类集合 + * */ + @Override + public List selectRefundsExchangesUnqualifiedListByCodeAndNo(QualityRefundsExchangesDetail qualityRefundsExchangesDetail) { + + return qualityRefundsExchangesUnqualifiedMapper.selectRefundsExchangesUnqualifiedListByCodeAndNo(qualityRefundsExchangesDetail); + } } diff --git a/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesDetailMapper.xml b/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesDetailMapper.xml index 9b38a313..2ab29598 100644 --- a/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesDetailMapper.xml +++ b/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} + + insert into quality_refunds_exchanges_detail diff --git a/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesUnqualifiedMapper.xml b/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesUnqualifiedMapper.xml index bed5552f..d1490b8c 100644 --- a/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesUnqualifiedMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesUnqualifiedMapper.xml @@ -44,6 +44,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + insert into quality_refunds_exchanges_unqualified diff --git a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/afterQualityReportDetail.html b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/afterQualityReportDetail.html new file mode 100644 index 00000000..19d46a0f --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/afterQualityReportDetail.html @@ -0,0 +1,139 @@ + + + + + + + +
+
+ +
+ +
+
+
+ 不合格数 +
+
+
+
+
+
+
+
+ +
+ + +
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+
+ + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/returnAfterStorageDetail.html b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/returnAfterStorageDetail.html index 0181c90c..f8125ea6 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/returnAfterStorageDetail.html +++ b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/returnAfterStorageDetail.html @@ -11,14 +11,14 @@
- +
- +
@@ -26,7 +26,7 @@
- +
@@ -163,7 +163,7 @@ formatter: function(value, row, index) { // 这里直接使用row对象获取refundsExchangesCode,假设它是存在的 var actions = []; - actions.push('报告 '); + actions.push('报告 '); return actions.join(''); } }, @@ -214,9 +214,10 @@ var queryParams = new URLSearchParams(); queryParams.append('materialNo', materialNo); queryParams.append('refundsExchangesCode', encodeURIComponent(refundsExchangesCode)); - - var url = ctx + 'quality/refundsExchanges/qualityReport?' + queryParams.toString(); - $.modal.open("品质报告", url); + console.log("materialNo:"+materialNo); + console.log("refundsExchangesCode:"+refundsExchangesCode); + var url = ctx + 'quality/refundsExchanges/afterQualityReportDetail?' + queryParams.toString(); + $.modal.open("品质报告详情", url); }