| | |
| | | var pageCurr; |
| | | var initCountVal = 0; |
| | | var matCodeData = []; |
| | | layui.use(['table','laydate', 'form'], function() { |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | |
| | | cellMinWidth: 50, |
| | | toolbar: '#toolbar', |
| | | cols: [[ |
| | | {fixed: 'left', field: 'count', title: '数量(必填)', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'}, |
| | | {fixed: 'left', field: 'count', title: '实际数量', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'}, |
| | | {field: 'matNo', align: 'center', title: '物料编码'}, |
| | | {field: 'barcode', align: 'center', title: '条码'}, |
| | | {field: 'matName', align: 'center', title: '物料名称'}, |
| | |
| | | } |
| | | }); |
| | | |
| | | }) |
| | | // 检索事件 |
| | | form.on('submit(search)', function (data) { |
| | | http.post(baseUrl + "/locDetl/list/auth", {loc_no: data.field.loc_no,limit: 1000}, function (res) { |
| | | matCodeData = []; |
| | | let data = res.data.records; |
| | | for (var i = 0; i<data.length; i++) { |
| | | matCodeData.push({ |
| | | matNo: data[i].matnr, |
| | | matName: data[i].maktx, |
| | | count: 0, |
| | | }) |
| | | } |
| | | tableReload(); |
| | | console.log(matCodeData); |
| | | }) |
| | | }); |
| | | |
| | | // 重置事件 |
| | | form.on('submit(reset)', function (data) { |
| | | |
| | | }); |
| | | |
| | | function tableReload() { |
| | | tableIns.reload({data: matCodeData,done:function (res) { |
| | | limit(); |
| | | }}); |
| | | } |
| | | }) |
| | | |
| | | // 提取物料 |
| | | var matCodeLayerIdx; |
| | | function getMat() { |
| | | matCodeLayerIdx = layer.open({ |
| | | type: 2, |
| | | title: '提取物料', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | | content: 'matQuery.html', |
| | | success: function(layero, index){ |
| | | } |
| | | }); |
| | | } |
| | |
| | | |
| | | /* add */ |
| | | .function-area { |
| | | padding: 15px 0px 20px 40px; |
| | | padding: 15px 0 20px 40px; |
| | | } |
| | | .function-btn { |
| | | font-size: 16px; |
| | |
| | | color: #fff; |
| | | } |
| | | |
| | | |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <body style="padding-bottom: 30px"> |
| | | |
| | | <!-- 搜索栏 --> |
| | | <div id="search-box" class="layui-form layui-card-header"> |
| | |
| | | </div> |
| | | <!-- 待添加 --> |
| | | <div id="data-search-btn" class="layui-btn-container layui-form-item" style="display: inline-block"> |
| | | <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索</button> |
| | | <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">检索</button> |
| | | <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">重置</button> |
| | | </div> |
| | | </div> |