Browse Source

[feat]品质管理:

退换货
新增确认收货-入库前退货beforeConfirmDelivery.html页面
新增 确认收货-入库前退货按钮
新增 确认收货-入库前退货查询接口
新增确认收货-入库前退货修改保存接口
beforeConfirmDelivery.html新增收货状态字段
退换货新增收货状态字段
退换货详情收货状态字段
数据字典新增退换货收货状态quality_delivery_status
dev
liuxiaoxu 5 months ago
parent
commit
6e40a55cd2
  1. 27
      ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityRefundsExchangesController.java
  2. 16
      ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityRefundsExchanges.java
  3. 16
      ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityRefundsExchangesDetail.java
  4. 5
      ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityRefundsExchangesService.java
  5. 25
      ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityRefundsExchangesServiceImpl.java
  6. 6
      ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesDetailMapper.xml
  7. 6
      ruoyi-admin/src/main/resources/mapper/quality/QualityRefundsExchangesMapper.xml
  8. 275
      ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/beforeConfirmDelivery.html
  9. 13
      ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/refundsExchanges.html

27
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));
}
}

16
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())

16
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())

5
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);
}

25
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<QualityRefundsExchangesDetail> 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;
}
/**
*退换货单号:

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

@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="refundsExchangesStatus" column="refunds_exchanges_status" />
<result property="qualityWarehouseStatus" column="quality_warehouse_status" />
<result property="qualityPurchaseStatus" column="quality_purchase_status" />
<result property="qualityDeliveryStatus" column="quality_delivery_status" />
<result property="relatedOrderCode" column="related_order_code" />
<result property="inStorageCode" column="in_storage_code" />
<result property="qualityReturnNode" column="quality_return_node" />
@ -41,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectQualityRefundsExchangesDetailVo">
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
</sql>
<select id="selectQualityRefundsExchangesDetailList" parameterType="QualityRefundsExchangesDetail" resultMap="QualityRefundsExchangesDetailResult">
@ -75,6 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="refundsExchangesStatus != null">refunds_exchanges_status,</if>
<if test="qualityWarehouseStatus != null">quality_warehouse_status,</if>
<if test="qualityPurchaseStatus != null">quality_purchase_status,</if>
<if test="qualityDeliveryStatus != null">quality_delivery_status,</if>
<if test="relatedOrderCode != null">related_order_code,</if>
<if test="inStorageCode != null">in_storage_code,</if>
<if test="qualityReturnNode != null">quality_return_node,</if>
@ -109,6 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="refundsExchangesStatus != null">#{refundsExchangesStatus},</if>
<if test="qualityWarehouseStatus != null">#{qualityWarehouseStatus},</if>
<if test="qualityPurchaseStatus != null">#{qualityPurchaseStatus},</if>
<if test="qualityDeliveryStatus != null">#{qualityDeliveryStatus},</if>
<if test="relatedOrderCode != null">#{relatedOrderCode},</if>
<if test="inStorageCode != null">#{inStorageCode},</if>
<if test="qualityReturnNode != null">#{qualityReturnNode},</if>
@ -147,6 +150,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="refundsExchangesStatus != null">refunds_exchanges_status = #{refundsExchangesStatus},</if>
<if test="qualityWarehouseStatus != null">quality_warehouse_status = #{qualityWarehouseStatus},</if>
<if test="qualityPurchaseStatus != null">quality_purchase_status = #{qualityPurchaseStatus},</if>
<if test="qualityDeliveryStatus != null">quality_delivery_status = #{qualityDeliveryStatus},</if>
<if test="relatedOrderCode != null">related_order_code = #{relatedOrderCode},</if>
<if test="inStorageCode != null">in_storage_code = #{inStorageCode},</if>
<if test="qualityReturnNode != null">quality_return_node = #{qualityReturnNode},</if>

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

@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="refundsExchangesStatus" column="refunds_exchanges_status" />
<result property="qualityWarehouseStatus" column="quality_warehouse_status" />
<result property="qualityPurchaseStatus" column="quality_purchase_status" />
<result property="qualityDeliveryStatus" column="quality_delivery_status" />
<result property="relatedOrderCode" column="related_order_code" />
<result property="inStorageCode" column="in_storage_code" />
<result property="warehouseStorageType" column="warehouse_storage_type" />
@ -26,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectQualityRefundsExchangesVo">
select refunds_exchanges_id, refunds_exchanges_code, refunds_exchanges_status, quality_warehouse_status, quality_purchase_status, related_order_code, in_storage_code, warehouse_storage_type ,quality_return_node, material_total, num_total, delivery_inspection_time, quality_remark, remark, create_by, create_time, update_by, update_time from quality_refunds_exchanges
select refunds_exchanges_id, refunds_exchanges_code, refunds_exchanges_status, quality_warehouse_status, quality_purchase_status, quality_delivery_status ,related_order_code, in_storage_code, warehouse_storage_type ,quality_return_node, material_total, num_total, delivery_inspection_time, quality_remark, remark, create_by, create_time, update_by, update_time from quality_refunds_exchanges
</sql>
<select id="selectQualityRefundsExchangesList" parameterType="QualityRefundsExchanges" resultMap="QualityRefundsExchangesResult">
@ -55,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="refundsExchangesStatus != null">refunds_exchanges_status,</if>
<if test="qualityWarehouseStatus != null">quality_warehouse_status,</if>
<if test="qualityPurchaseStatus != null">quality_purchase_status,</if>
<if test="qualityDeliveryStatus != null">quality_delivery_status,</if>
<if test="relatedOrderCode != null">related_order_code,</if>
<if test="inStorageCode != null">in_storage_code,</if>
<if test="warehouseStorageType != null">warehouse_storage_type,</if>
@ -74,6 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="refundsExchangesStatus != null">#{refundsExchangesStatus},</if>
<if test="qualityWarehouseStatus != null">#{qualityWarehouseStatus},</if>
<if test="qualityPurchaseStatus != null">#{qualityPurchaseStatus},</if>
<if test="qualityDeliveryStatus != null">#{qualityDeliveryStatus},</if>
<if test="relatedOrderCode != null">#{relatedOrderCode},</if>
<if test="inStorageCode != null">#{inStorageCode},</if>
<if test="warehouseStorageType != null">#{warehouseStorageType},</if>
@ -97,6 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="refundsExchangesStatus != null">refunds_exchanges_status = #{refundsExchangesStatus},</if>
<if test="qualityWarehouseStatus != null">quality_warehouse_status = #{qualityWarehouseStatus},</if>
<if test="qualityPurchaseStatus != null">quality_purchase_status = #{qualityPurchaseStatus},</if>
<if test="qualityDeliveryStatus != null">quality_delivery_status = #{qualityDeliveryStatus},</if>
<if test="relatedOrderCode != null">related_order_code = #{relatedOrderCode},</if>
<if test="inStorageCode != null">in_storage_code = #{inStorageCode},</if>
<if test="warehouseStorageType != null">warehouse_storage_type = #{warehouseStorageType},</if>

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

@ -0,0 +1,275 @@
<!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" />
<style>
.supplier-value span {
margin-right: 10px;
}
</style>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-beforeConfirmDelivery-edit" th:object="${qualityRefundsExchanges}">
<input name="refundsExchangesId" th:field="*{refundsExchangesId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">退换货单号:</label>
<div class="col-sm-8">
<input name="refundsExchangesCode" th:field="*{refundsExchangesCode}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">关联单号:</label>
<div class="col-sm-8">
<input name="relatedOrderCode" th:field="*{relatedOrderCode}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">品质备注:</label>
<div class="col-sm-8">
<input name="qualityRemark" th:field="*{qualityRemark}" class="form-control" type="text" disabled>
</div>
</div>
<div class="container">
<!--供应商物料相关-->
<div class="row">
<div class="col-sm-12" id="tablesContainer">
<!-- 表格将在这里动态生成 -->
</div>
</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 refundsExchangesCode = [[${qualityRefundsExchanges.refundsExchangesCode}]]
var qualityDeliveryStatusDatas = [[${@dict.getType('quality_delivery_status')}]];
var prefix = ctx + "quality/refundsExchanges";
$("#form-beforeConfirmDelivery-edit").validate({
focusCleanup: true
});
//生成的不同table的id集合
var tableDatas = [];
function submitHandler() {
const storageOrderData = $("#form-beforeConfirmDelivery-edit").serializeArray().reduce((obj, item) => {
obj[item.name] = item.value;
return obj;
}, {});
// 初始化一个数组用于存放所有表格的数据
let allMaterialDataList = [];
for(let i in tableDatas){
$('#' + tableDatas[i]).each(function() {
const tableData = $(this).bootstrapTable('getData');
console.log(JSON.stringify(tableData));
// 将表数据转换成与qualityReportData格式一致的数组
var materialDataList = tableData.map(function (item) {
// 根据实际字段名调整
return {
"refundsExchangesDetailId":item.refundsExchangesDetailId,
"supplierCode": item.supplierCode,
"materialNo": item.materialNo,
"materialName": item.materialName,
"materialType": item.materialType,
"materialPhotourl": item.materialPhotourl,
"materialDescribe": item.materialDescribe,
"materialBrand": item.materialBrand,
"materialUnit": item.materialUnit,
"materialProcessMethod": item.materialProcessMethod,
"makeTotal": item.makeTotal,
"qualityHasqualifiedNum": item.qualityHasqualifiedNum,
"thisArrivedNum": item.thisArrivedNum,
"qualityUnqualifiedNum": item.qualityUnqualifiedNum,
"qualityDeliveryStatus": item.qualityDeliveryStatus,
// ...其他字段
};
});
allMaterialDataList = allMaterialDataList.concat(materialDataList);
});
}
const combinedData = Object.assign({}, storageOrderData, {
refundsExchangesDetails: allMaterialDataList
});
// 合并表单数据和表格数据
// const combinedData = Object.assign({}, ...complaintNoticeData.array(item => ({ [item.name]: item.value })), ...materialData);
console.log(combinedData)
// 使用 JSON.stringify() 序列化数据
const jsonData = JSON.stringify(combinedData);
// 发送 AJAX 请求到后端接口
$.operate.saveJson(prefix + "/beforeConfirmDelivery", jsonData);
}
$(function() {
// 假设refundsExchangesCode已经定义或者可以通过某种方式获取到
var refundsExchangesCode = [[${qualityRefundsExchanges.refundsExchangesCode}]]; // 这里需要实际赋值,比如从前端某个地方读取
$.getJSON(prefix + "/detailListGroupedBySupplier?refundsExchangesCode=" + refundsExchangesCode, function(data) {
for (var supplierCode in data) {
if (data.hasOwnProperty(supplierCode)) {
var supplierData = data[supplierCode];
createTableForSupplier(supplierCode, supplierData);
}
}
});
});
function createTableForSupplier(supplierCode, supplierData) {
var tableId = 'bootstrap-table-' + supplierCode.replace(/[^a-z0-9]/gi, '_').toLowerCase();
tableDatas.push(tableId);
var $tableWrapper = $('<div class="table-responsive mt-3"></div>');
// 确保supplierData至少有一条记录,并从中提取供应商详细信息
var supplierInfo = supplierData.length > 0 ? supplierData[0] : {}; // 默认为空对象,以防数据不存在
// 构建含有额外供应商信息的标题字符串
var headerTitle ='供应商'+'</br>'+supplierCode + ' - ' + (supplierInfo.supplierName || 'N/A') +
' </br> ' + (supplierInfo.customerContact || 'N/A') +
' - ' + (supplierInfo.contactNumber || 'N/A') +
' - ' + (supplierInfo.supplierAddress || 'N/A');
var $header = $('<h4>' + headerTitle + '</h4>');
var $table = $('<table id="' + tableId + '" class="table table-striped table-bordered"></table>');
$table.bootstrapTable({
data: supplierData,
columns: [{
checkbox: true
},
{
title: '供应商ID',
field: 'supplierCode',
visible: false
},
{
title: '退换货详情ID',
field: 'refundsExchangesDetailId',
visible: false
},
{
title: '料号',
field: 'materialNo'
}, {
title: '物料名称',
field: 'materialName'
},
{
title: '物料类型',
field: 'materialType',
},
{
title: '物料图片地址',
field: 'materialPhotourl',
},
{
title: '物料描述',
field: 'materialDescribe',
},
{
title: '物料品牌',
field: 'materialBrand',
},
{
title: '物料单位',
field: 'materialUnit',
},
{
title: '物料加工方式',
field: 'materialProcessMethod',
},
{
title: '订单数',
field: 'makeTotal',
},
{
title: '品质已合格数',
field: 'qualityHasqualifiedNum',
},
{
title: '本次到货数',
field: 'thisArrivedNum',
},
{
title: '品质报告',
align: 'center',
formatter: function(value, row, index) {
// 这里直接使用row对象获取supplierCode,假设它是存在的
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="qualityReport(\'' + row.materialNo + '\', \'' + row.supplierCode + '\')"><i class="fa fa-plus"></i>报告</a> ');
return actions.join('');
}
},
{
title: '品质不合格数',
field: 'qualityUnqualifiedNum',
},
{title: '收货状态',field: 'qualityDeliveryStatus',
formatter:function (value, row, index) {
return qualityDeliveryStatusFormatter(value,row,index);
}
},
]
});
$tableWrapper.append($header).append($table);
$('#tablesContainer').append($tableWrapper);
$table.on('change', '.form-control', onQualityDeliveryStatus);
}
/*品质报告*/
function qualityReport(materialNo, supplierCode) {
var queryParams = new URLSearchParams();
queryParams.append('materialNo', materialNo);
queryParams.append('supplierCode', encodeURIComponent(supplierCode));
var url = ctx + 'quality/qualityOrder/qualityReport?' + queryParams.toString();
$.modal.open("品质报告", url);
}
// 列中获取收货状态下拉改变数据
function onQualityDeliveryStatus(event) {
var selectElement = event.target; // 直接从事件对象获取select元素
var rowIndex = $(selectElement).closest('tr').index(); // 获取当前行索引
var table = $(selectElement).closest('.table'); // 获取最近的.table父元素,即当前表格
var tableId = table.attr('id'); // 获取当前表格的ID
var qualityDeliveryStatusValue = $(selectElement).val();
// 确保tableId在tableDatas中,然后根据tableId和rowIndex更新数据
if (tableDatas.includes(tableId)) {
var tableData = table.bootstrapTable('getData');
var newRow = tableData[rowIndex];
newRow.qualityDeliveryStatus = qualityDeliveryStatusValue;
table.bootstrapTable('updateRow', {index: rowIndex, row: newRow});
} else {
console.error("Table ID not found in tableDatas array.");
}
}
// 自定义收货状态的格式化函数
function qualityDeliveryStatusFormatter(value, row, index) {
var selectHtml = '<select class="form-control" onchange="onQualityDeliveryStatus(this, ' + index + ')">';
// 添加默认选项
selectHtml += '<option value=""' + (value === undefined || value === '' ? ' selected' : '') + '>所有</option>';
qualityDeliveryStatusDatas.forEach(function (child) {
selectHtml += '<option value="' + child.dictValue + '"' + (value === child.dictValue ? ' selected' : '') + '>' + child.dictLabel + '</option>';
});
selectHtml += '</select>';
return selectHtml;
}
</script>
</body>
</html>

13
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('<a class="btn btn-success btn-xs ' + beforeHasConfirmSupplierFlag + '" href="javascript:void(0)" onclick="beforeHasConfirmSupplier(\'' + row.refundsExchangesId + '\')"><i class="fa fa-edit"></i>确认供应商</a> ');
actions.push('<a class="btn btn-success btn-xs ' + beforeConfirmDeliveryFlag + '" href="javascript:void(0)" onclick="beforeConfirmDelivery(\'' + row.refundsExchangesId + '\')"><i class="fa fa-edit"></i>确认收货</a> ');
}
/*入库后退货-确认供应商-没有供应商*/
@ -211,6 +216,7 @@
actions.push('<a class="btn btn-success btn-xs ' + afterNoConfirmSupplierFlag + '" href="javascript:void(0)" onclick="afterNoConfirmSupplier(\'' + row.refundsExchangesId + '\')"><i class="fa fa-edit"></i>确认供应商</a> ');
}
return actions.join('');
}
}]
@ -270,6 +276,13 @@
$.modal.open("确认供应商",url);
}
/*入库前退货-确认收货*/
function beforeConfirmDelivery(refundsExchangesId){
var url = ctx + 'quality/refundsExchanges/beforeConfirmDelivery/' + refundsExchangesId;
$.modal.open("确认收货",url);
}
</script>
</body>
</html>
Loading…
Cancel
Save