Browse Source

[feat]

品质管理 退换货单
修改入库后退货选择供应商页面,修改表单模块显示字段,新增隐藏字段退换货ID、入库单号;
修改表格列表结构,修改供应商列表下拉框监听函数,动态更新表格信息;
修改页面提交方法,获取表单数据前移除元素disabled属性;
修改入库后退货报告详情页面,调整表格结构,添加报告按钮;
修改入库后退货确认收货页面,调整表格结构,品质报告添加按钮及跳转方法;
dev
王晓迪 3 months 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 processMethodDatas = [[${@dict.getType('processMethod')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var qualityDeliveryStatusDatas = [[${@dict.getType('quality_delivery_status')}]];
var prefix = ctx + "quality/refundsExchanges";
$("#form-afterConfirmDelivery-edit").validate({
@ -156,17 +159,24 @@
{
title: '料号',
field: 'materialNo'
}, {
},
{
title: '物料名称',
field: 'materialName'
},
{
title: '物料类型',
field: 'materialType',
formatter: function(value, row, index) {
return $.table.selectCategoryLabel(materialTypeDatas, value);
}
},
{
title: '物料图片地址',
title: '物料图片',
field: 'materialPhotourl',
formatter: function(value, row, index) {
return $.table.imageView(value);
}
},
{
title: '物料描述',
@ -183,26 +193,16 @@
{
title: '物料加工方式',
field: 'materialProcessMethod',
},
{
title: '订单数',
field: 'makeTotal',
},
{
title: '品质已合格数',
field: 'qualityHasqualifiedNum',
},
{
title: '本次到货数',
field: 'thisArrivedNum',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{
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> ');
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="qualityReport(\'' + row.materialNo + '\', \'' + row.refundsExchangesCode + '\')">报告</a> ');
return actions.join('');
}
},
@ -227,13 +227,13 @@
/*品质报告*/
function qualityReport(materialNo, supplierCode) {
function qualityReport(materialNo, refundsExchangesCode) {
var queryParams = new URLSearchParams();
queryParams.append('materialNo', materialNo);
queryParams.append('supplierCode', encodeURIComponent(supplierCode));
queryParams.append('refundsExchangesCode', encodeURIComponent(refundsExchangesCode));
var url = ctx + 'quality/qualityOrder/qualityReport?' + queryParams.toString();
$.modal.open("品质报告", url);
var url = ctx + 'quality/refundsExchanges/afterQualityReportDetail?' + queryParams.toString();
$.modal.open("品质报告详情", url);
}
// 列中获取收货状态下拉改变数据

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

@ -6,6 +6,8 @@
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<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">
<label class="col-sm-3 control-label">退换货单号:</label>
<div class="col-sm-8">
@ -13,17 +15,17 @@
</div>
</div>
<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">
<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 class="form-group">
<label class="col-sm-3 control-label">品质单入库类型</label>
<label class="col-sm-3 control-label">品质备注</label>
<div class="col-sm-8">
<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>
<input name="qualityRemark" th:field="*{qualityRemark}" class="form-control" type="text" disabled>
</div>
</div>
</form>
@ -42,7 +44,10 @@
var refundsExchangesCode = [[${qualityRefundsExchanges.refundsExchangesCode}]]
var qualityRefundsExchanges = [[${qualityRefundsExchanges}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var supplier = [];
var $table = $("#bootstrap-table");
var prefix = ctx + "quality/refundsExchanges";
@ -50,18 +55,12 @@
focusCleanup: true
});
// function submitHandler() {
// if ($.validate.form()) {
// $.operate.save(prefix + "/returnBeforeStorageDetail", $('#form-qualityRefundsExchanges-edit').serialize());
// }
// }
// 新增提交
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) => {
obj[item.name] = item.value;
return obj;
@ -121,65 +120,77 @@
checkbox: true
},
{
title: '供应商ID',
field: 'supplierCode',
title: '退换货详情Id',
field: 'refundsExchangesDetailId',
visible: false
},
{
title: '退换货详情Id',
field: 'refundsExchangesDetailId',
title: '退换货单号',
field: 'refundsExchangesCode',
visible: false
},
{
title: '料号',
field: 'materialNo'
}, {
},
{
title: '图片',
field: 'materialPhotourl',
formatter: function(value, row, index) {
return $.table.imageView(value);
}
},
{
title: '物料名称',
field: 'materialName'
},
{
title: '物料类型',
field: 'materialType',
},
{
title: '物料图片地址',
field: 'materialPhotourl',
formatter: function(value, row, index) {
return $.table.selectCategoryLabel(materialTypeDatas, value);
}
},
{
title: '物料描述',
field: 'materialDescribe',
},
{
title: '物料品牌',
title: '品牌',
field: 'materialBrand',
},
{
title: '物料单位',
title: '单位',
field: 'materialUnit',
},
{
title: '物料加工方式',
title: '加工方式',
field: 'materialProcessMethod',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{
title: '订单数',
field: 'makeTotal',
visible: false
},
{
title: '品质已合格数',
field: 'qualityHasqualifiedNum',
visible: false
},
{
title: '本次到货数',
field: 'thisArrivedNum',
visible: false
},
{
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> ');
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="qualityReport(\'' + row.materialNo + '\', \'' + row.refundsExchangesCode + '\')">报告</a> ');
return actions.join('');
}
},
@ -244,6 +255,7 @@
codes.forEach(function (code) {
selectElement.append('<option value="' + code.supplierCode + '">' + code.supplierCode + '</option>');
});
supplier = codes;
// 设置默认值(如果存在)
var rowData = $table.bootstrapTable('getData')[index];
if (rowData && rowData.supplierCode) {
@ -259,6 +271,14 @@
var tableData = $table.bootstrapTable('getData');
var newRow = tableData[rowIndex];
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);
$table.bootstrapTable('updateRow', {index: rowIndex, row: newRow});
@ -293,9 +313,26 @@
var tableData = $table.bootstrapTable('getData');
var newRow = tableData[rowIndex]; // 获取当前行数据
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});
}
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>
</body>
</html>

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

@ -89,9 +89,7 @@
showSearch:false,
singleSelect:true,
queryParams:queryParams,
columns: [{
checkbox: false
},
columns: [
{
title: '品质报告单id',
field: 'qualityOrderReportId',
@ -100,6 +98,7 @@
{
title: '不良分类',
field: 'processBadClassification',
align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processBadClassificationDatas, value);
}
@ -108,6 +107,7 @@
{
title: '不良等级',
field: 'processBadGrade',
align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processBadGradeDatas, value);
}
@ -115,10 +115,17 @@
{
title: '数量',
field: 'processBadNum',
align: 'center',
},
{
title: '报告',
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