Browse Source

[fix]品质管理:

退换货
新增结案接口
新增结案页面closingProcedures.html
dev
liuxiaoxu 6 months ago
parent
commit
06afd4bd3c
  1. 23
      ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityRefundsExchangesController.java
  2. 3
      ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesService.java
  3. 11
      ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesServiceImpl.java
  4. 46
      ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/closingProcedures.html
  5. 12
      ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/refundsExchanges.html

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

@ -140,4 +140,27 @@ public class QualityRefundsExchangesController extends BaseController
}
/**
* 结案
*/
@GetMapping("/closingProcedures/{refundsExchangesId}")
public String closingProcedures(@PathVariable("refundsExchangesId") Long refundsExchangesId, ModelMap mmap)
{
QualityRefundsExchanges qualityRefundsExchanges = qualityRefundsExchangesService.selectQualityRefundsExchangesById(refundsExchangesId);
mmap.put("qualityRefundsExchanges", qualityRefundsExchanges);
return prefix + "/closingProcedures";
}
/**
* 修改保存结案
*/
@RequiresPermissions("quality:refundsExchanges:closingProcedures")
@Log(title = "品质管理退换货单", businessType = BusinessType.UPDATE)
@PostMapping("/closingProcedures")
@ResponseBody
public AjaxResult closingProceduresSave(QualityRefundsExchanges qualityRefundsExchanges)
{
return toAjax(qualityRefundsExchangesService.updateRefundsExchangesStatus(qualityRefundsExchanges));
}
}

3
ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesService.java

@ -72,4 +72,7 @@ public interface IQualityRefundsExchangesService
* @return
*/
int restoreQualityRefundsExchangesById(Long refundsExchangesId);
/*修改退换货状态*/
int updateRefundsExchangesStatus(QualityRefundsExchanges qualityRefundsExchanges);
}

11
ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesServiceImpl.java

@ -157,6 +157,17 @@ public class QualityRefundsExchangesServiceImpl implements IQualityRefundsExchan
return qualityRefundsExchangesMapper.restoreQualityRefundsExchangesById(refundsExchangesId);
}
/*修改退换货状态*/
@Override
public int updateRefundsExchangesStatus(QualityRefundsExchanges qualityRefundsExchanges) {
String loginName = ShiroUtils.getLoginName();
qualityRefundsExchanges.setUpdateBy(loginName);
qualityRefundsExchanges.setUpdateTime(DateUtils.getNowDate());
qualityRefundsExchanges.setRefundsExchangesStatus("1");
return qualityRefundsExchangesMapper.updateQualityRefundsExchanges(qualityRefundsExchanges);
}
/**
*退换货单号:

46
ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/closingProcedures.html

@ -0,0 +1,46 @@
<!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-refundsExchanges-edit" th:object="${qualityRefundsExchanges}">
<input name="refundsExchangesId" th:field="*{refundsExchangesId}" type="hidden">
<div class="form-group">
<label class="col-sm-4 control-label">退换货单号:</label>
<div class="col-sm-8">
<input name="refundsExchangesCode" th:field="*{refundsExchangesCode}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="remark" maxlength="500" class="form-control" rows="3"></textarea>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "quality/refundsExchanges";
$("#form-refundsExchanges-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/closingProcedures", $('#form-refundsExchanges-edit').serialize());
}
}
$("input[name='deliveryInspectionTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

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

@ -79,6 +79,9 @@
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('quality:refundsExchanges:edit')}]];
var closingProceduresFlag = [[${@permission.hasPermi('quality:refundsExchanges:closingProcedures')}]];
var refundsExchangesStatusDatas = [[${@dict.getType('refunds_exchanges_status')}]];
var qualityWarehouseStatusDatas = [[${@dict.getType('quality_warehouse_status')}]];
var qualityPurchaseStatusDatas = [[${@dict.getType('quality_purchase_status')}]];
@ -182,12 +185,21 @@
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.refundsExchangesId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
if (row.refundsExchangesStatus != 1){
actions.push('<a class="btn btn-success btn-xs ' + closingProceduresFlag + '" href="javascript:void(0)" onclick="closingProcedures(\'' + row.refundsExchangesId + '\')"><i class="fa fa-edit"></i>结案</a> ');
}
return actions.join('');
}
}]
};
$.table.init(options);
});
/*结案*/
function closingProcedures(refundsExchangesId){
var url = ctx + 'quality/refundsExchanges/closingProcedures/' +refundsExchangesId;
$.modal.open("结案",url);
}
</script>
</body>
</html>
Loading…
Cancel
Save