-
-
+
+
@@ -102,7 +102,7 @@
var processBadClassificationDatas = [[${@dict.getType('process_bad_classification')}]];
var processBadGradeDatas = [[${@dict.getType('process_bad_grade')}]];
-
+ var $table = $("#bootstrap-unqualified-table");
var prefix = ctx + "quality/qualityOrder";
$("#form-qualityOrderReport-edit").validate({
focusCleanup: true
@@ -188,22 +188,18 @@
field: 'qualityOrderReportId',
visible: false
},
- {
- title: '不良分类',
- field: 'processBadClassification',
- formatter: function(index, row, value) {
- return dictToSelectWithEvent(processBadClassificationDatas, value, "processBadClassification", "bootstrap-unqualified-table");
+
+ {title: '不良分类',field: 'processBadClassification',
+ formatter:function (value, row, index) {
+ return processBadClassificationFormatter(value,row,index);
}
},
- {
- title: '不良等级',
- field: 'processBadGrade',
- formatter: function(index, row, value) {
- return dictToSelectWithEvent(processBadGradeDatas, value, "processBadGrade", "bootstrap-unqualified-table");
- }
+ {title: '不良等级',field: 'processBadGrade',
+ formatter:function (value, row, index) {
+ return processBadGradeFormatter(value,row,index);
+ }
},
-
{
title: '数量',
field: 'processBadNum',
@@ -228,20 +224,7 @@
]
};
$.table.init(options);
-
- // 添加全局事件处理器
- window.updateTableRow = function(tableId, element) {
- var $table = $("#" + tableId);
- var rowIndex = $($element).closest('tr[data-index]').data('index');
- var fieldName = $(element).attr('name');
- var newValue = $(element).val();
-
- // 直接更新Bootstrap Table的数据源
- var data = $table.bootstrapTable('getData');
- data[rowIndex][fieldName] = newValue;
- $table.bootstrapTable('load', data);
- };
- })
+ });
// 逻辑删除不合格数前端的一行数据
@@ -255,22 +238,60 @@
}
- // 数据字典转下拉框,并添加事件监听
- function dictToSelectWithEvent(datas, value, name, tableId) {
- var selectHtml = $("