zgq
2021-06-28 81cfaa7ad257d3fef92bb704e504d2fda75afcfb
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>生产任务单列表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
</head>
<body>
    <div class="layui-fluid">
        <div class="layui-card">
            <!--<div class="layui-card-header"></div>-->
            <div class="layui-card-body" style="padding: 15px;">
                <form class="layui-form" action="" lay-filter="component-form-group">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">过滤列</label>
                            <div class="layui-input-inline">
                                <input type="text" name="Value" id="Value" lay-verify="Value" autocomplete="off" placeholder="请输入过滤列" class="layui-input">
                            </div>
                            <button type="button" lay-submit="" class="layui-btn" lay-filter="HQuery">快速查询</button>
                            <button type="button" lay-submit="" class="layui-btn" lay-filter="FH">返回</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <table class="layui-hide" id="ck-table"></table>
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js" type="text/javascript"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script>
        layui.use(['table', 'form', 'layer'], function () {
            var table = layui.table
            , form = layui.form
            , layer = layui.layer;
 
            form.on('submit(HQuery)', function () {//选择单位
                //var sMainStr = JSON.stringify(table.cache['ck-table']);
                RoadQuery($('#Value').val());
            });
            form.on('submit(FH)', function () {//选择单位
                //var sMainStr = JSON.stringify(table.cache['ck-table']);
                var checkStatus = table.checkStatus('ck-table')
                 , data = checkStatus.data;
                parent.GetICMOBillValue(data);
                var index = parent.layer.getFrameIndex(window.name);
                parent.layer.close(index);
            });
            RoadQuery($('#Value').val());
            table.render({
                elem: '#ck-table'
                // , url: '/demo/table/user/'
               , data: []
              , cellMinWidth: 80 //全局定义常规单元格的最小宽度,layui 2.2.1 新增
              , cols: [[
                  { type: 'radio' }
                  , { field: 'hmainid', width: 150, title: 'hmainid', hide: true, sort: true }
                  , { field: '订单跟踪号', width: 150, title: '订单跟踪号' }
                  , { field: '生产订单号', width: 150, title: '生产订单号' }
                  , { field: 'hdeptid', width: 150, title: 'hdeptid', hide: true }
                  , { field: '生产车间代码', width: 150, title: '生产车间代码' }
                  , { field: '生产车间名称', width: 150, title: '生产车间名称' }
                  , { field: 'hmaterid', width: 150, title: 'hmaterid', hide: true }
                  , { field: '物料代码', width: 150, title: '物料代码' }
                  , { field: '物料名称', width: 150, title: '物料名称' }
                  , { field: '规格型号', width: 150, title: '规格型号' }
                  , { field: '批号', width: 150, title: '批号' }
                  , { field: '流转卡数量', width: 150, title: '流转卡数量' }
                  , { field: 'hunitid', width: 150, title: 'hunitid', hide: true }
                  , { field: '计量单位代码', width: 150, title: '计量单位代码' }
                  , { field: '计量单位名称', width: 150, title: '计量单位名称' }
                  , { field: '计划生产数量', width: 150, title: '计划生产数量' }
                  , { field: 'hbomid', width: 150, title: 'hbomid' }
                  , { field: 'BOM单代码', width: 150, title: 'BOM单代码' }
                  , { field: 'HRoutingID', width: 150, title: 'HRoutingID' }
                  , { field: '计划开工日期', width: 150, title: '计划开工日期' }
                  , { field: '计划完工日期', width: 150, title: '计划完工日期' }
                  , { field: 'hsubid', width: 150, title: 'hsubid' }
                  , { field: '工序号', width: 150, title: '工序号' }
                  , { field: 'hprocid', width: 150, title: 'hprocid' }
                  , { field: '工序代码', width: 150, title: '工序代码' }
                  , { field: '工序', width: 150, title: '工序' }
                  , { field: '加工说明', width: 150, title: '加工说明' }
                  , { field: 'HWorkCenterID', width: 150, title: 'HWorkCenterID' }
                  , { field: '工作中心代码', width: 150, title: '工作中心代码' }
                  , { field: '工作中心', width: 150, title: '工作中心' }
                  , { field: 'HSourceID', width: 150, title: 'HSourceID' }
                  , { field: '生产资源代码', width: 150, title: '生产资源代码' }
                  , { field: '生产资源', width: 150, title: '生产资源' }
                  , { field: 'HGroupID', width: 150, title: 'HGroupID' }
                  , { field: '班组代码', width: 150, title: '班组代码' }
                  , { field: '班组', width: 150, title: '班组' }
                  , { field: 'HWorkerID', width: 150, title: 'HWorkerID' }
                  , { field: '操作工代码', width: 150, title: '操作工代码' }
                  , { field: 'HSupID', width: 150, title: 'HSupID' }
                  , { field: '供应商', width: 150, title: '供应商' }
                  , { field: '供应商代码', width: 150, title: '供应商代码' }
                  , { field: '委外标记', width: 150, title: '委外标记' }
                  , { field: '工艺参数', width: 150, title: '工艺参数' }
                  , { field: '图纸编号', width: 150, title: '图纸编号' }
                  , { field: '本工序确认记录', width: 150, title: '本工序确认记录' }
                  , { field: '操作工', width: 150, title: '操作工' }
                  , { field: '加工单价', width: 150, title: '加工单价' }
                  , { field: '良率', width: 150, title: '良率' }
                  , { field: '累计良率', width: 150, title: '累计良率' }
                  , { field: '超额比例', width: 150, title: '超额比例' }
                  , { field: '最高上限', width: 150, title: '最高上限' }
                  , { field: 'HBillType', width: 150, title: 'HBillType' }
                  , { field: '关联数量', width: 150, title: '关联数量' }
                  , { field: 'HEntryID', width: 150, title: 'HEntryID' }
                  , { field: '下道流转工序', width: 150, title: '下道流转工序' }
                  , { field: '产品CODE', width: 150, title: '产品CODE' }
                  , { field: '销售订单号', width: 150, title: '销售订单号' }
                  , { field: '客户简称', width: 150, title: '客户简称' }
                  , { field: '客户要求材料成分', width: 150, title: '客户要求材料成分' }
                  , { field: '预计出货日期', width: 150, title: '预计出货日期' }
                  , { field: '产品名称', width: 150, title: '产品名称' }
                  , { field: '客户名称', width: 150, title: '客户名称' }
                  , { field: '生产备注', width: 150, title: '生产备注' }
                  , { field: '重要提示', width: 150, title: '重要提示' }
              ]]
              , page: true
            });
            ///加载显示数据
            function RoadQuery(Where) {
                var index = layer.load();
                var Value = Where;
                if (Value == null) {
                    Value = '';
                }
                $.ajax({
                    type: "get",
                    url: GetWEBURL() + "/Web/GetSc_ICMOBillListView",
                    async: true,
                    data: { "ICMOBill": Value, "OrganizationID": sessionStorage["OrganizationID"] },
                    //data: { "Value": Value },
                    success: function (result) {
                        if (result.count == 1) {
                            ajaxReturnData = JSON.parse(JSON.stringify(result)).data;
                            table.reload('ck-table', {
                                data: ajaxReturnData
                                , height: 'full-10'
                                , loading: false
                                , done: function (index, res) {
 
                                }
                            });
                            layer.close(index);
                        }
                        else {
                            layer.close(index);
                            layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        }
                    },
                    error: function (result) {
                        layer.close(index);
                        console.log(result);
                        //layer.msg('获取采购订单出现异常', { icon: 2, time: 2000 });
                    }
                });
            };
        });
    </script>
 
</body>
</html>