Browse Source

[feat]

品质管理 退换货单
修改入库后退货选择供应商页面,修改表单模块显示字段,新增隐藏字段退换货ID、入库单号;
修改表格列表结构,修改供应商列表下拉框监听函数,动态更新表格信息;
修改页面提交方法,获取表单数据前移除元素disabled属性;
修改入库后退货报告详情页面,调整表格结构,添加报告按钮;
修改入库后退货确认收货页面,调整表格结构,品质报告添加按钮及跳转方法;
dev
王晓迪 4 weeks ago
parent
commit
6c114ce5c2
  1. 40
      ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/afterConfirmDelivery.html
  2. 97
      ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/afterNoConfirmSupplier.html
  3. 13
      ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/afterQualityReportDetail.html

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

@ -51,6 +51,9 @@
var refundsExchangesCode = [[${qualityRefundsExchanges.refundsExchangesCode}]] var refundsExchangesCode = [[${qualityRefundsExchanges.refundsExchangesCode}]]
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var qualityDeliveryStatusDatas = [[${@dict.getType('quality_delivery_status')}]]; var qualityDeliveryStatusDatas = [[${@dict.getType('quality_delivery_status')}]];
var prefix = ctx + "quality/refundsExchanges"; var prefix = ctx + "quality/refundsExchanges";
$("#form-afterConfirmDelivery-edit").validate({ $("#form-afterConfirmDelivery-edit").validate({
@ -156,17 +159,24 @@
{ {
title: '料号', title: '料号',
field: 'materialNo' field: 'materialNo'
}, { },
{
title: '物料名称', title: '物料名称',
field: 'materialName' field: 'materialName'
}, },
{ {
title: '物料类型', title: '物料类型',
field: 'materialType', field: 'materialType',
formatter: function(value, row, index) {
return $.table.selectCategoryLabel(materialTypeDatas, value);
}
}, },
{ {
title: '物料图片地址', title: '物料图片',
field: 'materialPhotourl', field: 'materialPhotourl',
formatter: function(value, row, index) {
return $.table.imageView(value);
}
}, },
{ {
title: '物料描述', title: '物料描述',
@ -183,26 +193,16 @@
{ {
title: '物料加工方式', title: '物料加工方式',
field: 'materialProcessMethod', field: 'materialProcessMethod',
}, formatter: function(value, row, index) {
{ return $.table.selectDictLabel(processMethodDatas, value);
title: '订单数', }
field: 'makeTotal',
},
{
title: '品质已合格数',
field: 'qualityHasqualifiedNum',
},
{
title: '本次到货数',
field: 'thisArrivedNum',
}, },
{ {
title: '品质报告', title: '品质报告',
align: 'center', align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
// 这里直接使用row对象获取supplierCode,假设它是存在的
var actions = []; 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> '); actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="qualityReport(\'' + row.materialNo + '\', \'' + row.refundsExchangesCode + '\')">报告</a> ');
return actions.join(''); return actions.join('');
} }
}, },
@ -227,13 +227,13 @@
/*品质报告*/ /*品质报告*/
function qualityReport(materialNo, supplierCode) { function qualityReport(materialNo, refundsExchangesCode) {
var queryParams = new URLSearchParams(); var queryParams = new URLSearchParams();
queryParams.append('materialNo', materialNo); queryParams.append('materialNo', materialNo);
queryParams.append('supplierCode', encodeURIComponent(supplierCode)); queryParams.append('refundsExchangesCode', encodeURIComponent(refundsExchangesCode));
var url = ctx + 'quality/qualityOrder/qualityReport?' + queryParams.toString(); var url = ctx + 'quality/refundsExchanges/afterQualityReportDetail?' + queryParams.toString();
$.modal.open("品质报告", url); $.modal.open("品质报告详情", url);
} }
// 列中获取收货状态下拉改变数据 // 列中获取收货状态下拉改变数据

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

@ -6,6 +6,8 @@
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-afterNoConfirmSupplier-edit" th:object="${qualityRefundsExchanges}"> <form class="form-horizontal m" id="form-afterNoConfirmSupplier-edit" th:object="${qualityRefundsExchanges}">
<input name="refundsExchangesId" th:field="*{refundsExchangesId}" type="hidden">
<input name="inStorageCode" th:field="*{inStorageCode}" type="hidden">
<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">
@ -13,17 +15,17 @@
</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">
<input name="relatedOrderCode" th:field="*{relatedOrderCode}" class="form-control" type="text" disabled> <select name="warehouseStorageType" class="form-control m-b" th:with="type=${@dict.getType('warehouse_storage_type')}" disabled>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{warehouseStorageType}"></option>
</select>
</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">
<select name="warehouseStorageType" class="form-control m-b" th:with="type=${@dict.getType('warehouse_storage_type')}" disabled> <input name="qualityRemark" th:field="*{qualityRemark}" class="form-control" type="text" disabled>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{warehouseStorageType}"></option>
</select>
</div> </div>
</div> </div>
</form> </form>
@ -42,7 +44,10 @@
var refundsExchangesCode = [[${qualityRefundsExchanges.refundsExchangesCode}]] var refundsExchangesCode = [[${qualityRefundsExchanges.refundsExchangesCode}]]
var qualityRefundsExchanges = [[${qualityRefundsExchanges}]]; var qualityRefundsExchanges = [[${qualityRefundsExchanges}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var supplier = [];
var $table = $("#bootstrap-table"); var $table = $("#bootstrap-table");
var prefix = ctx + "quality/refundsExchanges"; var prefix = ctx + "quality/refundsExchanges";
@ -50,18 +55,12 @@
focusCleanup: true focusCleanup: true
}); });
// function submitHandler() {
// if ($.validate.form()) {
// $.operate.save(prefix + "/returnBeforeStorageDetail", $('#form-qualityRefundsExchanges-edit').serialize());
// }
// }
// 新增提交 // 新增提交
function submitHandler() { function submitHandler() {
// 获取表单数据
// const afterNoConfirmSupplierData = $("#form-afterNoConfirmSupplier-edit").serializeArray(); $("input[name='refundsExchangesCode']").removeAttr("disabled");
// 获取表单数据 $("input[name='qualityRemark']").removeAttr("disabled");
const afterNoConfirmSupplierData = $("#form-afterNoConfirmSupplier-edit").serializeArray().reduce((obj, item) => { const afterNoConfirmSupplierData = $("#form-afterNoConfirmSupplier-edit").serializeArray().reduce((obj, item) => {
obj[item.name] = item.value; obj[item.name] = item.value;
return obj; return obj;
@ -121,65 +120,77 @@
checkbox: true checkbox: true
}, },
{ {
title: '供应商ID', title: '退换货详情Id',
field: 'supplierCode', field: 'refundsExchangesDetailId',
visible: false visible: false
}, },
{ {
title: '退换货详情Id', title: '退换货单号',
field: 'refundsExchangesDetailId', field: 'refundsExchangesCode',
visible: false visible: false
}, },
{ {
title: '料号', title: '料号',
field: 'materialNo' field: 'materialNo'
}, { },
{
title: '图片',
field: 'materialPhotourl',
formatter: function(value, row, index) {
return $.table.imageView(value);
}
},
{
title: '物料名称', title: '物料名称',
field: 'materialName' field: 'materialName'
}, },
{ {
title: '物料类型', title: '物料类型',
field: 'materialType', field: 'materialType',
}, formatter: function(value, row, index) {
{ return $.table.selectCategoryLabel(materialTypeDatas, value);
title: '物料图片地址', }
field: 'materialPhotourl',
}, },
{ {
title: '物料描述', title: '物料描述',
field: 'materialDescribe', field: 'materialDescribe',
}, },
{ {
title: '物料品牌', title: '品牌',
field: 'materialBrand', field: 'materialBrand',
}, },
{ {
title: '物料单位', title: '单位',
field: 'materialUnit', field: 'materialUnit',
}, },
{ {
title: '物料加工方式', title: '加工方式',
field: 'materialProcessMethod', field: 'materialProcessMethod',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
}, },
{ {
title: '订单数', title: '订单数',
field: 'makeTotal', field: 'makeTotal',
visible: false
}, },
{ {
title: '品质已合格数', title: '品质已合格数',
field: 'qualityHasqualifiedNum', field: 'qualityHasqualifiedNum',
visible: false
}, },
{ {
title: '本次到货数', title: '本次到货数',
field: 'thisArrivedNum', field: 'thisArrivedNum',
visible: false
}, },
{ {
title: '品质报告', title: '品质报告',
align: 'center', align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
// 这里直接使用row对象获取supplierCode,假设它是存在的
var actions = []; 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> '); actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="qualityReport(\'' + row.materialNo + '\', \'' + row.refundsExchangesCode + '\')">报告</a> ');
return actions.join(''); return actions.join('');
} }
}, },
@ -244,6 +255,7 @@
codes.forEach(function (code) { codes.forEach(function (code) {
selectElement.append('<option value="' + code.supplierCode + '">' + code.supplierCode + '</option>'); selectElement.append('<option value="' + code.supplierCode + '">' + code.supplierCode + '</option>');
}); });
supplier = codes;
// 设置默认值(如果存在) // 设置默认值(如果存在)
var rowData = $table.bootstrapTable('getData')[index]; var rowData = $table.bootstrapTable('getData')[index];
if (rowData && rowData.supplierCode) { if (rowData && rowData.supplierCode) {
@ -259,6 +271,14 @@
var tableData = $table.bootstrapTable('getData'); var tableData = $table.bootstrapTable('getData');
var newRow = tableData[rowIndex]; var newRow = tableData[rowIndex];
newRow.supplierCode = newSupplierCode; newRow.supplierCode = newSupplierCode;
supplier.forEach(function (index){
if(index.supplierCode === newSupplierCode){
newRow.supplierName = index.supplierName;
newRow.customerContact = index.customerContact;
newRow.contactNumber = index.contactNumber;
newRow.supplierAddress = index.customerAddress;
}
});
// getSupplierNameType(newRow.supplierCode,newRow,rowIndex); // getSupplierNameType(newRow.supplierCode,newRow,rowIndex);
$table.bootstrapTable('updateRow', {index: rowIndex, row: newRow}); $table.bootstrapTable('updateRow', {index: rowIndex, row: newRow});
@ -293,9 +313,26 @@
var tableData = $table.bootstrapTable('getData'); var tableData = $table.bootstrapTable('getData');
var newRow = tableData[rowIndex]; // 获取当前行数据 var newRow = tableData[rowIndex]; // 获取当前行数据
newRow.supplierName = newSupplierName; newRow.supplierName = newSupplierName;
supplier.forEach(function (index){
if(index.supplierName === newSupplierName){
newRow.customerContact = index.customerContact;
newRow.contactNumber = index.contactNumber;
newRow.supplierAddress = index.customerAddress;
}
});
// 更新行数据 // 更新行数据
$table.bootstrapTable('updateRow', {index: rowIndex, row: newRow}); $table.bootstrapTable('updateRow', {index: rowIndex, row: newRow});
} }
function qualityReport(materialNo, refundsExchangesCode) {
var queryParams = new URLSearchParams();
queryParams.append('materialNo', materialNo);
queryParams.append('refundsExchangesCode', encodeURIComponent(refundsExchangesCode));
console.log("materialNo:"+materialNo);
console.log("refundsExchangesCode:"+refundsExchangesCode);
var url = ctx + 'quality/refundsExchanges/afterQualityReportDetail?' + queryParams.toString();
$.modal.open("品质报告详情", url);
}
</script> </script>
</body> </body>
</html> </html>

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

@ -89,9 +89,7 @@
showSearch:false, showSearch:false,
singleSelect:true, singleSelect:true,
queryParams:queryParams, queryParams:queryParams,
columns: [{ columns: [
checkbox: false
},
{ {
title: '品质报告单id', title: '品质报告单id',
field: 'qualityOrderReportId', field: 'qualityOrderReportId',
@ -100,6 +98,7 @@
{ {
title: '不良分类', title: '不良分类',
field: 'processBadClassification', field: 'processBadClassification',
align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
return $.table.selectDictLabel(processBadClassificationDatas, value); return $.table.selectDictLabel(processBadClassificationDatas, value);
} }
@ -108,6 +107,7 @@
{ {
title: '不良等级', title: '不良等级',
field: 'processBadGrade', field: 'processBadGrade',
align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
return $.table.selectDictLabel(processBadGradeDatas, value); return $.table.selectDictLabel(processBadGradeDatas, value);
} }
@ -115,10 +115,17 @@
{ {
title: '数量', title: '数量',
field: 'processBadNum', field: 'processBadNum',
align: 'center',
}, },
{ {
title: '报告', title: '报告',
field: 'unqualifiedReportUrl', field: 'unqualifiedReportUrl',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" >报告</a> ');
return actions.join('');
}
}, },
] ]
}; };

Loading…
Cancel
Save