|
|
@ -16,12 +16,25 @@ |
|
|
|
var prefix = ctx + "warehouse/inventoryCheck"; |
|
|
|
// 从后端拿到传入的makeNo |
|
|
|
// var makeNo = /*[[${makeNo}]]*/ ''; |
|
|
|
var processMethodDatas = [[${@dict.getType('processMethod')}]]; |
|
|
|
|
|
|
|
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; |
|
|
|
|
|
|
|
$(function() { |
|
|
|
var materialList = [[${materialList}]]; |
|
|
|
var formattedData = { |
|
|
|
total: materialList.length, // 总记录数 |
|
|
|
rows: materialList // 数据行 |
|
|
|
}; |
|
|
|
var options = { |
|
|
|
id: 'bootstrap-materialSelect-table', |
|
|
|
clickToSelect: true, // 点击选中行 |
|
|
|
singleSelect: true, // 单选 |
|
|
|
url: prefix + "/getAllMaterialInfo", |
|
|
|
// url: prefix + "/getAllMaterialInfo", |
|
|
|
data: formattedData, |
|
|
|
pagination: true, |
|
|
|
pageList: [10, 25, 50], |
|
|
|
pageSize: 10, |
|
|
|
modalName: "物料信息", |
|
|
|
columns: [{ |
|
|
|
checkbox: true |
|
|
@ -30,18 +43,43 @@ |
|
|
|
title: '料号', |
|
|
|
field: 'materialNo', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '图片', |
|
|
|
field: 'materialPhotourl', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.imageView(value); |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '物料名称', |
|
|
|
field: 'materialName', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '类型', |
|
|
|
field: 'materialType', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.selectCategoryLabel(materialTypeDatas, value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '描述', |
|
|
|
field: 'materialDescribe', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '品牌', |
|
|
|
field: 'materialBrand', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '单位', |
|
|
|
field: 'materialUnit', |
|
|
|
}, |
|
|
|
{ title: '加工方式', |
|
|
|
field: 'processMethod', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.selectDictLabel(processMethodDatas, value); |
|
|
|
} |
|
|
|
}, |
|
|
|
] |
|
|
|
}; |
|
|
|
$.table.init(options); |
|
|
|