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 c42a71ab..b2ab02be 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 @@ -352,9 +352,6 @@ public class QualityRefundsExchangesController extends BaseController return toAjax(qualityRefundsExchangesService.returnBeforeStorageDetail(qualityRefundsExchanges)); } - - - /** * 入库后退货-选择供应商-无供应商 */ @@ -391,4 +388,28 @@ public class QualityRefundsExchangesController extends BaseController + /** + * 入库前退货-确认供应商 + */ + @GetMapping("/beforeConfirmDelivery/{refundsExchangesId}") + public String beforeConfirmDelivery(@PathVariable("refundsExchangesId") Long refundsExchangesId, ModelMap mmap) + { + QualityRefundsExchanges qualityRefundsExchanges = qualityRefundsExchangesService.selectQualityRefundsExchangesById(refundsExchangesId); + mmap.put("qualityRefundsExchanges", qualityRefundsExchanges); + return prefix + "/beforeConfirmDelivery"; + } + + /** + * 保存入库前退货-确认供应商 + */ + @RequiresPermissions("quality:refundsExchanges:beforeConfirmDelivery") + @Log(title = "品质管理退换货单", businessType = BusinessType.UPDATE) + @PostMapping("/beforeConfirmDelivery") + @ResponseBody + public AjaxResult beforeConfirmDeliverySave(@RequestBody QualityRefundsExchanges qualityRefundsExchanges) + { + return toAjax(qualityRefundsExchangesService.updateBeforeConfirmDelivery(qualityRefundsExchanges)); + } + + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityRefundsExchanges.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityRefundsExchanges.java index aa42ff63..74804b68 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityRefundsExchanges.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityRefundsExchanges.java @@ -38,6 +38,10 @@ public class QualityRefundsExchanges extends BaseEntity @Excel(name = "采购状态") private String qualityPurchaseStatus; + /** 收货状态 */ + @Excel(name = "收货状态") + private String qualityDeliveryStatus; + /** 关联订单号 */ @Excel(name = "关联订单号") private String relatedOrderCode; @@ -120,7 +124,16 @@ public class QualityRefundsExchanges extends BaseEntity { return qualityPurchaseStatus; } - public void setRelatedOrderCode(String relatedOrderCode) + + public String getQualityDeliveryStatus() { + return qualityDeliveryStatus; + } + + public void setQualityDeliveryStatus(String qualityDeliveryStatus) { + this.qualityDeliveryStatus = qualityDeliveryStatus; + } + + public void setRelatedOrderCode(String relatedOrderCode) { this.relatedOrderCode = relatedOrderCode; } @@ -208,6 +221,7 @@ public class QualityRefundsExchanges extends BaseEntity .append("refundsExchangesStatus", getRefundsExchangesStatus()) .append("qualityWarehouseStatus", getQualityWarehouseStatus()) .append("qualityPurchaseStatus", getQualityPurchaseStatus()) + .append("qualityDeliveryStatus",getQualityDeliveryStatus()) .append("relatedOrderCode", getRelatedOrderCode()) .append("inStorageCode", getInStorageCode()) .append("warehouseStorageType", getWarehouseStorageType()) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityRefundsExchangesDetail.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityRefundsExchangesDetail.java index 21e87de8..a7340459 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityRefundsExchangesDetail.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityRefundsExchangesDetail.java @@ -38,6 +38,10 @@ public class QualityRefundsExchangesDetail extends BaseEntity @Excel(name = "采购状态") private String qualityPurchaseStatus; + /** 收货状态 */ + @Excel(name = "收货状态") + private String qualityDeliveryStatus; + /** 关联订单号 */ @Excel(name = "关联订单号") private String relatedOrderCode; @@ -183,7 +187,16 @@ public class QualityRefundsExchangesDetail extends BaseEntity { return qualityPurchaseStatus; } - public void setRelatedOrderCode(String relatedOrderCode) + + public String getQualityDeliveryStatus() { + return qualityDeliveryStatus; + } + + public void setQualityDeliveryStatus(String qualityDeliveryStatus) { + this.qualityDeliveryStatus = qualityDeliveryStatus; + } + + public void setRelatedOrderCode(String relatedOrderCode) { this.relatedOrderCode = relatedOrderCode; } @@ -401,6 +414,7 @@ public class QualityRefundsExchangesDetail extends BaseEntity .append("refundsExchangesStatus", getRefundsExchangesStatus()) .append("qualityWarehouseStatus", getQualityWarehouseStatus()) .append("qualityPurchaseStatus", getQualityPurchaseStatus()) + .append("qualityDeliveryStatus",getQualityDeliveryStatus()) .append("relatedOrderCode", getRelatedOrderCode()) .append("inStorageCode", getInStorageCode()) .append("qualityReturnNode", getQualityReturnNode()) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesService.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesService.java index 410365e1..e0c30d8a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesService.java @@ -84,4 +84,9 @@ public interface IQualityRefundsExchangesService * 保存入库后退货-选择供应商-无供应商 */ int updateAfterNoConfirmSupplier(QualityRefundsExchanges qualityRefundsExchanges); + + /** + * 保存入库前退货-确认供应商 + */ + int updateBeforeConfirmDelivery(QualityRefundsExchanges qualityRefundsExchanges); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesServiceImpl.java index c9f0b5dd..7a2baa4c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesServiceImpl.java @@ -208,6 +208,31 @@ public class QualityRefundsExchangesServiceImpl implements IQualityRefundsExchan return updateRows; } + /** + * 保存入库前退货-确认供应商 + */ + @Override + public int updateBeforeConfirmDelivery(QualityRefundsExchanges qualityRefundsExchanges) { + + String loginName = ShiroUtils.getLoginName(); + List refundsExchangesDetails = qualityRefundsExchanges.getRefundsExchangesDetails(); + if (StringUtils.isEmpty(refundsExchangesDetails)){ + log.warn("换货单[{}]无关联的物料详情信息", qualityRefundsExchanges.getRefundsExchangesCode()); + } + + int updateRows = 0; + for (QualityRefundsExchangesDetail refundsExchangesDetail : refundsExchangesDetails) { + refundsExchangesDetail.setRefundsExchangesCode(qualityRefundsExchanges.getRefundsExchangesCode()); + refundsExchangesDetail.setUpdateBy(loginName); + refundsExchangesDetail.setUpdateTime(new Date()); + + //更新数据库记录 + updateRows += refundsExchangesDetailMapper.updateQualityRefundsExchangesDetail(refundsExchangesDetail); + + } + return updateRows; + } + /** *退换货单号: diff --git a/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesDetailMapper.xml b/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesDetailMapper.xml index 18a547ba..63cdbc5c 100644 --- a/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesDetailMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesDetailMapper.xml @@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -41,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select refunds_exchanges_detail_id, refunds_exchanges_code, refunds_exchanges_status, quality_warehouse_status, quality_purchase_status, related_order_code, in_storage_code, quality_return_node, material_total, num_total, supplier_code, supplier_name, customer_contact, contact_number, supplier_address, material_no, material_name, material_type, material_photoUrl, material_brand, material_unit, material_describe, material_process_method, refunds_exchanges_num, quality_unqualified_num ,delivery_inspection_time, inspection_time ,quality_remark, remark, create_by, create_time, update_by, update_time from quality_refunds_exchanges_detail + select refunds_exchanges_detail_id, refunds_exchanges_code, refunds_exchanges_status, quality_warehouse_status, quality_purchase_status, quality_delivery_status , related_order_code, in_storage_code, quality_return_node, material_total, num_total, supplier_code, supplier_name, customer_contact, contact_number, supplier_address, material_no, material_name, material_type, material_photoUrl, material_brand, material_unit, material_describe, material_process_method, refunds_exchanges_num, quality_unqualified_num ,delivery_inspection_time, inspection_time ,quality_remark, remark, create_by, create_time, update_by, update_time from quality_refunds_exchanges_detail @@ -55,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" refunds_exchanges_status, quality_warehouse_status, quality_purchase_status, + quality_delivery_status, related_order_code, in_storage_code, warehouse_storage_type, @@ -74,6 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{refundsExchangesStatus}, #{qualityWarehouseStatus}, #{qualityPurchaseStatus}, + #{qualityDeliveryStatus}, #{relatedOrderCode}, #{inStorageCode}, #{warehouseStorageType}, @@ -97,6 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" refunds_exchanges_status = #{refundsExchangesStatus}, quality_warehouse_status = #{qualityWarehouseStatus}, quality_purchase_status = #{qualityPurchaseStatus}, + quality_delivery_status = #{qualityDeliveryStatus}, related_order_code = #{relatedOrderCode}, in_storage_code = #{inStorageCode}, warehouse_storage_type = #{warehouseStorageType}, diff --git a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/beforeConfirmDelivery.html b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/beforeConfirmDelivery.html new file mode 100644 index 00000000..beb720a7 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/beforeConfirmDelivery.html @@ -0,0 +1,275 @@ + + + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/refundsExchanges.html b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/refundsExchanges.html index c6865a8c..d04d0220 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/refundsExchanges.html +++ b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/refundsExchanges.html @@ -87,6 +87,9 @@ var beforeHasConfirmSupplierFlag = [[${@permission.hasPermi('quality:refundsExchanges:beforeHasConfirmSupplier')}]]; var afterNoConfirmSupplierFlag = [[${@permission.hasPermi('quality:refundsExchanges:afterNoConfirmSupplier')}]]; + var beforeConfirmDeliveryFlag = [[${@permission.hasPermi('quality:refundsExchanges:beforeConfirmDelivery')}]]; + + var refundsExchangesStatusDatas = [[${@dict.getType('refunds_exchanges_status')}]]; var qualityWarehouseStatusDatas = [[${@dict.getType('quality_warehouse_status')}]]; var qualityPurchaseStatusDatas = [[${@dict.getType('quality_purchase_status')}]]; @@ -204,6 +207,8 @@ /*入库前退换货-确认供应商-已有供应商*/ if (row.qualityReturnNode == 0){ actions.push('确认供应商 '); + actions.push('确认收货 '); + } /*入库后退货-确认供应商-没有供应商*/ @@ -211,6 +216,7 @@ actions.push('确认供应商 '); } + return actions.join(''); } }] @@ -270,6 +276,13 @@ $.modal.open("确认供应商",url); } + + /*入库前退货-确认收货*/ + function beforeConfirmDelivery(refundsExchangesId){ + var url = ctx + 'quality/refundsExchanges/beforeConfirmDelivery/' + refundsExchangesId; + $.modal.open("确认收货",url); + } + \ No newline at end of file