Browse Source

[feat]

品质管理 制程检验
新增制程检验列表页面导出按钮绑定方法;
修改制程检验物料选择页面,字典类型数据添加标签查询语句;
修改检验报告页面,添加上传按钮显示;
dev
王晓迪 3 months ago
parent
commit
1f0a470ff4
  1. 40
      ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/checkoutReport.html
  2. 58
      ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/manufacturingCheckout.html
  3. 11
      ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/materialSelect.html

40
ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/checkoutReport.html

@ -109,11 +109,15 @@
'<form id="form-manfa-'+ uniqueId +'"> ' +
"<div class='form-group'> "+
"<label for='okAcceptedNum'>OK允收数:</label>" +
"<input type='text' class='form-control' id='okAcceptedNum' name='okAcceptedNum'>"+
"<div class='btn-group-sm'>" +
"<input type='text' class='form-control' id='okAcceptedNum' name='okAcceptedNum'>"+
"<a class= 'btn btn-success btn-xs' href='javascript:void(0)' ><i class='fa fa-plus'></i>上传</a>" +
"</div>"+
"</div>"+
" <div class='form-group'> "+
"<label for='qualifiedNum'>特采/让步数:</label>" +
"<input type='text' class='form-control' id='specialConcessionsNum' name='specialConcessionsNum'>"+
"<a class= 'btn btn-success btn-xs' href='javascript:void(0)' ><i class='fa fa-plus'></i>上传</a>" +
"</div>"+
"</form>"+
"</div>" +
@ -233,12 +237,21 @@
field: 'processBadNum',
editable:true
},
{
title: '报告',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" ><i class="fa fa-plus"></i>上传</a> ');
return actions.join('');
}
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeUnqualifiedClassRow(\'' + row.manufacturingUnqualifiedClassId + '\')"><i class="fa fa-remove"></i>删除</a> ');
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeUnqualifiedClassRow(' + row.manufacturingUnqualifiedClassId + '", "' + options2.id + ')"><i class="fa fa-remove"></i>删除</a> ');
return actions.join('');
}
},
@ -311,19 +324,6 @@
}
}
// 新增一个处理制程工序编号下拉改变的函数
// function handleManufacturingProcessChange(selectElement, tableId,selectId,row) {
//
// var manufacturingProcessCode = $(selectElement).val();
// // 根据selectedValue进行相应处理
// console.log("Selected manufacturing process code:", manufacturingProcessCode);
// console.log("tableId:", tableId);
// console.log("selectId:", selectId);
// console.log("selectId:", JSON.stringify(row));
// $("#" + tableId).bootstrapTable("updateRow",row);
// // 这里可以调用你的业务逻辑,如selectProcess,但需注意参数应有效
// }
function handleManufacturingProcessChange(selectElement, tableId, selectId, index) {
var selectedValue = $(selectElement).val();
@ -377,9 +377,13 @@
// return td;
// }
function removeUnqualifiedClassRow(id) {
alert("实施删除不合格分类行操作,id: " + id); // 实现删除逻辑
function removeUnqualifiedClassRow(manufacturingUnqualifiedClassId,tableId) {
console.log(manufacturingUnqualifiedClassId);
console.log(tableId);
$("#"+tableId).bootstrapTable('remove', {
field: 'manufacturingUnqualifiedClassId',
values: manufacturingUnqualifiedClassId
})
}
function selectProcess(tableId,selectId){
console.log(tableId);

58
ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/manufacturingCheckout.html

@ -51,7 +51,7 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="quality:manufacturingCheckout:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="quality:manufacturingCheckout:export">
<a class="btn btn-warning" onclick="exportExcel()" shiro:hasPermission="quality:manufacturingCheckout:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
@ -141,6 +141,62 @@
$.table.init(options);
});
// 导出
function exportExcel(formId) {
// $.table.set();
var checkoutData = [];
var selections = $("#bootstrap-table").bootstrapTable("getSelections");
if(selections.length === 0){
// $.modal.alertWarning("请至少选择一条bom信息");
// return;
$.modal.confirm("确定导出所有制程检验吗?", function() {
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
var params = $("#bootstrap-table").bootstrapTable('getOptions');
var dataParam = $("#" + currentId).serializeArray();
dataParam.push({ "name": "orderByColumn", "value": params.sortName });
dataParam.push({ "name": "isAsc", "value": params.sortOrder });
$.modal.loading("正在导出数据,请稍后...");
$.post(prefix + '/exportAll', dataParam, function(result) {
if (result.code == web_status.SUCCESS) {
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
} else if (result.code == web_status.WARNING) {
$.modal.alertWarning(result.msg)
} else {
$.modal.alertError(result.msg);
}
$.modal.closeLoading();
});
});
}else {
//·拼接单号
for(let i=0;i<selections.length;i++){
checkoutData.push(selections[i].manufacturingCheckoutCode);
}
$.modal.confirm("确定导出" + checkoutData + "吗?", function () {
var checkouts = JSON.stringify(checkoutData);
// console.log(bomNos);
$.modal.loading("正在导出数据,请稍后...");
var config = {
url: prefix + '/export',
type: "post",
dataType: "json",
contentType: "application/json;charset=utf-8",
data: checkouts,
success: function(result) {
console.log(result);
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
$.modal.alertSuccess("导出成功!")
$.modal.closeLoading();
},
error: function (result){
$.modal.alertError(result.msg);
}
};
$.ajax(config)
// $.operate.saveJson(prefix + "/export", bomNos);
});
}
};
function detail(manufacturingCheckoutCode){
var url = ctx +'quality/manufacturingCheckout/detail/'+manufacturingCheckoutCode;
$.modal.open("制程检验详情",url);

11
ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/materialSelect.html

@ -16,6 +16,11 @@
var prefix = ctx + "quality/manufacturingCheckout";
// 从后端拿到传入的makeNo
var makeNo = /*[[${makeNo}]]*/ '';
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var sysUnitClassDatas = [[${@dict.getType('sysUnitClassDatas')}]];
var warehouseDeptDatas = [[${@dict.getType('warehouseDept')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
$(function() {
var options = {
id: 'bootstrap-materialSelect-table',
@ -47,6 +52,9 @@
{
title: '类型',
field: 'materialType',
formatter: function(value, row, index) {
return $.table.selectCategoryLabel(materialTypeDatas, value);
}
},
{
title: '描述',
@ -63,6 +71,9 @@
{
title: '半成品类型',
field: 'materialProcessMethod',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{
title: '订单数',

Loading…
Cancel
Save