Browse Source

[fix]售后管理:

售后客诉通知
修改客诉通知的相关页面的前端提示信息
dev
liuxiaoxu 5 months ago
parent
commit
931b68a26f
  1. 10
      ruoyi-admin/src/main/resources/templates/aftersales/complaintNotice/add.html
  2. 8
      ruoyi-admin/src/main/resources/templates/aftersales/complaintNotice/detail.html
  3. 16
      ruoyi-admin/src/main/resources/templates/aftersales/complaintNotice/edit.html

10
ruoyi-admin/src/main/resources/templates/aftersales/complaintNotice/add.html

@ -183,7 +183,7 @@
selectElement.append('<option value="' + item.makeNo + '">' + item.makeNo + '</option>'); selectElement.append('<option value="' + item.makeNo + '">' + item.makeNo + '</option>');
}); });
} else { } else {
console.error('数据为空.'); $.modal.errMsg("数据为空");
// 可能还需要处理UI显示,比如提示无相关生产单号 // 可能还需要处理UI显示,比如提示无相关生产单号
} }
}, },
@ -217,12 +217,12 @@
selectElement.append('<option value="' + item.customerId + '">' + item.customerId + '</option>'); selectElement.append('<option value="' + item.customerId + '">' + item.customerId + '</option>');
}); });
} else { } else {
console.error('Data is not an array or is empty.'); $.modal.errMsg("数据为空");
} }
}, },
error: function(jqXHR, textStatus, errorThrown) { // error: function(jqXHR, textStatus, errorThrown) {
console.error('Failed to fetch customer IDs: ' + textStatus + ', ' + errorThrown); // console.error('Failed to fetch customer IDs: ' + textStatus + ', ' + errorThrown);
} // }
}); });
} }

8
ruoyi-admin/src/main/resources/templates/aftersales/complaintNotice/detail.html

@ -208,12 +208,12 @@
$('#customerId').val(customerId); $('#customerId').val(customerId);
loadMakeNos(); loadMakeNos();
} else { } else {
console.error('Data is not an array or is empty.'); $.modal.errMsg("数据为空");
} }
}, },
error: function(jqXHR, textStatus, errorThrown) { // error: function(jqXHR, textStatus, errorThrown) {
console.error('Failed to fetch customer IDs: ' + textStatus + ', ' + errorThrown); // console.error('Failed to fetch customer IDs: ' + textStatus + ', ' + errorThrown);
} // }
}); });
} }

16
ruoyi-admin/src/main/resources/templates/aftersales/complaintNotice/edit.html

@ -84,7 +84,11 @@
}, {}); }, {});
// 获取bootstrap-table的数据,这里假设你使用bootstrap-table的API获取所有数据 // 获取bootstrap-table的数据,这里假设你使用bootstrap-table的API获取所有数据
var table = $('#bootstrap-table').bootstrapTable('getData'); var table = $('#bootstrap-table').bootstrapTable('getData');
// 检查表格数据是否为空
if (table.length===0){
$.modal.alertWarning("请至少保留一条物料数据后再保存!");
return;
}
// 将表数据转换成与complaintNoticeData格式一致的数组 // 将表数据转换成与complaintNoticeData格式一致的数组
var materialDataList = table.map(function(item) { var materialDataList = table.map(function(item) {
// 根据实际字段名调整 // 根据实际字段名调整
@ -135,13 +139,13 @@
// 将获取到的客户名称填充到输入框 // 将获取到的客户名称填充到输入框
if(data.data == null){ if(data.data == null){
// 如果返回的数据有问题,可以给出提示或处理 // 如果返回的数据有问题,可以给出提示或处理
alert('未能获取到客户名称!'); $.modal.alertWarning('未能获取到客户名称!');
} }
$('input[name="customerName"]').val(data.data.customerName); $('input[name="customerName"]').val(data.data.customerName);
}, },
error: function(jqXHR, textStatus, errorThrown) { error: function(jqXHR, textStatus, errorThrown) {
console.error('Error:', textStatus, errorThrown); console.error('Error:', textStatus, errorThrown);
alert('查询客户名称时发生错误!'); $.modal.alertWarning('查询客户名称时发生错误!');
} }
}); });
} else { } else {
@ -182,13 +186,13 @@
}); });
$("#makeNo").val(makeNo); $("#makeNo").val(makeNo);
} else { } else {
console.error('数据为空.'); $.modal.errMsg("数据为空");
// 可能还需要处理UI显示,比如提示无相关生产单号 // 可能还需要处理UI显示,比如提示无相关生产单号
} }
}, },
error: function(jqXHR, textStatus, errorThrown) { error: function(jqXHR, textStatus, errorThrown) {
console.error('Failed to fetch make numbers: ' + textStatus + ', ' + errorThrown); console.error('Failed to fetch make numbers: ' + textStatus + ', ' + errorThrown);
// 同样考虑UI反馈,如提示加载失败 // 同样,如提示加载失败
} }
}); });
} }
@ -216,7 +220,7 @@
$('#customerId').val(customerId); $('#customerId').val(customerId);
loadMakeNos(); loadMakeNos();
} else { } else {
console.error('Data is not an array or is empty.'); $.modal.errMsg("数据为空");
} }
}, },
error: function(jqXHR, textStatus, errorThrown) { error: function(jqXHR, textStatus, errorThrown) {

Loading…
Cancel
Save