ouyangqing
2021-01-13 d2f7c817ba202a1758e50ac5bca44594cdc8466d
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
<!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, maximum-scale=1">
    <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" style="padding: 1px">
            <div class="layui-card-body" style="padding: 1px;">
                <form class="layui-form" action="" lay-filter="component-form-group">
                    <!--<div class="layui-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs3">
                                <label class="layui-form-label" style="width:60px;padding-left:0px;">条码</label>
                            </div>
                            <div class="layui-col-xs7">
                                <input type="text" name="HBarCode" id="HBarCode" lay-verify="HBarCode" autocomplete="off"  class="layui-input">
                            </div>
                         </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs3">
                                <label class="layui-form-label" style="width:60px;padding-left:0px;">数量</label>
                            </div>
                            <div class="layui-col-xs7">
                                <input type="text" name="HQty" id="HQty" lay-verify="HQty" autocomplete="off" class="layui-input">
                            </div>
                            </div>
                    </div>-->
                    <div class="layui-tab" lay-filter="tab-POStockInBillList">
                        <ul class="layui-tab-title" lay-filter="tab-all">
                            <li lay-id="1">单据列表</li>
                            <li lay-id="2">源单生单</li>
                        </ul>
                        <div class="layui-tab-content">
                            <div class="layui-tab-item  layui-show">
                                <div class="layui-row">
                                    <div class="layui-col-xs12">
                                        <table class="layui-hide" id="dj-table" lay-filter="dj-table"></table>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-tab-item">
                                <div class="layui-row">
                                    <div class="layui-col-xs12">
                                        <table class="layui-hide" id="yd-table" lay-filter="yd-table"></table>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item" style="margin-bottom: 20px;">
                            <div class="layui-row">
                                <div class="layui-col-xs2">
                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdModify">编辑</button>
                                </div>
                                <div class="layui-col-xs2">
                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdDelete">删除</button>
                                </div>
                                <div class="layui-col-xs2">
                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdRefresh">刷新</button>
                                </div>
                                <div class="layui-col-xs2">
                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdCancel">退出</button>
                                </div>
                                <div class="layui-col-xs2">
                                    <!--<button type="button" lay-submit="" class="layui-btn" lay-filter="cmdAdd">新增</button>-->
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script>
    layui.config({
        base: '../../../layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
        var $ = layui.$
        , admin = layui.admin
        , layer = layui.layer
        , table = layui.table
        , form = layui.form
        , element = layui.element;
        //清空界面  new
 
        //动态加载源单类型列表 new
 
        //加载源单类型
 
        //读取单据列表
        //
 
        form.on('submit(Cancel)', function () {
            parent.location.href = "../../../views/index.html"
            //window.close();//关闭当前页
        })
 
        form.on('submit(cmdModify)', function () {
            var checkStatus = table.checkStatus('dj-table')
                     , data = checkStatus.data;
            //ajaxLabelData = data;
            //layer.alert(rows);
            layer.open({
                type: 2
                , area: ['100%', '100%']
                , title: '产品入库单红字'
                , shade: 0.6 //遮罩透明度
                , maxmin: false //允许全屏最小化
                , anim: 0 //0-6的动画形式,-1不开启
                , content: ['../../验收入库/产品入库/Kf_ProductInBackBill.html?linterid=' + data[0].HInterID, 'yes'] 
                , resize: false
                , cancel: function () {
                    $(".layui-btn").removeClass("layui-btn-disabled");
                }
            })
        });
 
        form.on('submit(cmdRefresh)', function () {//
            var sBillType = '1245'
            table.render({
                elem: '#dj-table'
                    , url: GetWEBURL1() + '/Web/DisBillEntryList_Mate_Webs_Json'
                    ,toolbar: '#toolbarDemo'
                    , where: { HBillType: sBillType,sWhere:''}
                    , cols: [[
                          { type: 'radio' }
                        , { field: 'HInterID', title: '单据内码', width: 80 }
                        , { field: 'HBillNo', title: '单据号', width: 80 }
                        , { field: 'HMaker', title: '制单人', width: 100 }
                        , { field: 'HMakeDate', title: '制单日期', width: 100 }
                        , { field: 'HQty', title: '数量', width: 100 }
                        , { field: 'HSourceBillNo', title: '源单单号', width: 100 }
                        , { field: 'HRedBlueFlag', title: '红蓝字', width: 100 }
                        , { field: 'HSourceBillType', title: '源单类型', width: 100 }
                    ]]
                      , height: 500
                      , done: function () {
                          layer.closeAll("loading");
                      }
            });
        });
 
 
 
        form.on('submit(cmdDelete)', function () {//删除
            var checkStatus = table.checkStatus('dj-table')
            , data = checkStatus.data;
            // console.log(data);
            // var sInterID = $('#HInterID').val()
            var sInterID = data[0].HInterID
            //var sMaterID = data[0].HMaterID   
            //var sBillType = $('#HBillType').val()
            //var sAuxPropID = data[0].HAuxPropID
            ////var sMTONo = data[0].HMTONo
            //var sMTONo = 0
            //var sSourceInterID = data[0].HSourceInterID
            //var sSourceEntryID = data[0].HSourceEntryID
            $.ajax(
               {
                   type: "Get",
                   url: GetWEBURL() + "/Web/Delete_Json",
                   async: true,
                   data: { "sHInterID": sInterID },
                   dataType: "json",
                   success: function (data) {
                       if (data.count == 1) { // 说明验证成功了,
                           //layer.msg(data.Message, { icon: 1 });
                           table.render({
                               elem: '#dj-table'
                               , url: GetWEBURL1() + '/Web/DisBillEntryList_Mate_Webs_Json'
                               , cellMinWidth: 80
                               , toolbar: '#toolbarDemo'
                               , where: { HBillType: '1245', sWhere: '' }
                               , cols: [[
                                   { type: 'radio' }
                                , { field: 'HInterID', title: '单据内码', width: 80 }
                                , { field: 'HBillNo', title: '单据号', width: 80 }
                                , { field: 'HMaker', title: '制单人', width: 100 }
                                , { field: 'HMakeDate', title: '制单日期', width: 100 }
                                , { field: 'HQty', title: '数量', width: 100 }
                                , { field: 'HSourceBillNo', title: '源单单号', width: 100 }
                                , { field: 'HRedBlueFlag', title: '红蓝字', width: 100 }
                                , { field: 'HSourceBillType', title: '源单类型', width: 100 }
                               ]]
                         , height: 500
                           })
                       }
                       else {
                           layer.msg(data.Message, { icon: 2 });
                       }
                   },
                   error: function (err) {
                       layer.msg('错误' + err, {
                           icon: 5,
                           time: 20000
                       }, function () {
                           //do something
                       });
                   }
               });
        });
        
       
        
        var sBillType = '1245'
                table.render({
                    elem: '#dj-table'
                    , url: GetWEBURL1() + '/Web/DisBillEntryList_Mate_Webs_Json'
                    ,toolbar: '#toolbarDemo'
                    , where: { HBillType: sBillType,sWhere:''}
                    , cols: [[
                          { type: 'radio' }
                        , { field: 'HInterID', title: '单据内码', width: 80 }
                        , { field: 'HBillNo', title: '单据号', width: 80 }
                        , { field: 'HMaker', title: '制单人', width: 100 }
                        , { field: 'HMakeDate', title: '制单日期', width: 100 }
                        , { field: 'HQty', title: '数量', width: 100 }
                        , { field: 'HSourceBillNo', title: '源单单号', width: 100 }
                        , { field: 'HRedBlueFlag', title: '红蓝字', width: 100 }
                        , { field: 'HSourceBillType', title: '源单类型', width: 100 }
                        ]]
                      , height: 500
                      , done: function () {
                          layer.closeAll("loading");
                      }
    })
        //刷新明细页签
        table.render({
            elem: '#mx-table'
            // , url: 'http://localhost:8083/POStockInBill/GetHBarCodeShowBillSub'
            //, toolbar: '#toolbarDemo'
            // , where: { sMsg: linterid, sMsg2: lentryid }
         , cols: [[
           , { field: 'HMaterID', title: '物料ID', width: 100, hide: true }
         ]]
         , page: true
         , height: 500
         , done: function () {
         }
        });
    });
    //清空表头
    </script>
 
</body>
</html>