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