提交 | 用户 | 时间
|
036dcd
|
1 |
|
懒 |
2 |
layui.use(['table'], function () { |
|
3 |
var $ = layui.jquery; |
|
4 |
var table = layui.table; |
|
5 |
|
|
6 |
/** |
|
7 |
* 物料信息管理 |
|
8 |
*/ |
|
9 |
var MaterialInfo = { |
|
10 |
tableId: "materialInfoTable" |
|
11 |
}; |
|
12 |
|
|
13 |
var salesOrderCode = parent.salesOrderCode; |
|
14 |
console.log(salesOrderCode) |
|
15 |
|
|
16 |
$('#serch').click(function(){ |
|
17 |
var queryData = {}; |
|
18 |
queryData['salesOrderCode'] = salesOrderCode; |
|
19 |
table.reload(MaterialInfo.tableId, { |
|
20 |
where: queryData, page: {curr: 1} |
|
21 |
}); |
|
22 |
}); |
|
23 |
/** |
|
24 |
* 缺料报警初始化表格的列 |
|
25 |
*/ |
|
26 |
MaterialInfo.initColumn = function () { |
|
27 |
return [[ |
|
28 |
{field: 'id', hide: true, title: '主键id'}, |
|
29 |
{field: 'salesOrderCode', sort: true, title: '订单编号',width: 160}, |
|
30 |
{field: 'productCode', sort: true, title: '产品编号',width: 160}, |
|
31 |
{field: 'productName', sort: true, title: '产品名称',width: 160}, |
|
32 |
{field: 'lineCode', sort: true, title: '产线编码',width: 120}, |
|
33 |
{field: 'planNumber', sort: true, title: '计划数量',width: 120}, |
|
34 |
{field: 'customerNo', sort: true, title: '客户编号',width: 120}, |
|
35 |
{field: 'cargoNo', sort: true, title: '货号',width: 160}, |
|
36 |
{field: 'planStartTime', sort: true, title: '计划开始时间',width: 160}, |
|
37 |
{field: 'planEndTime', sort: true, title: '计划结束时间',width: 160}, |
|
38 |
{field: 'deliveryTime', sort: true, title: '交货时间',width: 160}, |
|
39 |
{field: 'createUser', sort: true, title: '创建用户',width: 160}, |
|
40 |
{field: 'createTime', sort: true, title: '创建时间',width: 160}, |
|
41 |
]]; |
|
42 |
}; |
|
43 |
|
|
44 |
table = $.extend(table, {config: {checkName: 'checked'}}); |
|
45 |
|
|
46 |
var queryData = {}; |
|
47 |
queryData['salesOrderCode'] = salesOrderCode; |
|
48 |
var tableResult = table.render({ |
|
49 |
elem: '#' + MaterialInfo.tableId, |
|
50 |
url: Feng.ctxPath + '/salesOrderChild/list', |
|
51 |
page: true, |
|
52 |
where:queryData, |
|
53 |
cellMinWidth: 80, |
|
54 |
cols: MaterialInfo.initColumn() |
|
55 |
}); |
|
56 |
$('#reset').click(function(){ |
|
57 |
clearType(); |
|
58 |
Msg = ""; |
|
59 |
window.localStorage.clear(); |
|
60 |
}); |
|
61 |
|
|
62 |
function clearType(){ |
|
63 |
parent.materialType=""; |
|
64 |
} |
|
65 |
|
|
66 |
}); |