| | |
| | | |
| | | </div> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">物料</label> |
| | | <label class="layui-form-label">产品</label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" type="text" id="matNo" onkeyup="findByMatNo(this)" autocomplete="off"> |
| | | </div> |
| | |
| | | } |
| | | |
| | | /** |
| | | * 根据物料号查找库存明细 |
| | | * 根据产品号查找库存明细 |
| | | */ |
| | | function findByMatNo(el){ |
| | | if (isEmpty(el.value)) { |
| | |
| | | cols: [[ |
| | | {type: 'checkbox', fixed: 'left', width:30}, |
| | | {field: 'count', align: 'center', title: '数量', event: 'detail', style:'color: blue', width:50}, |
| | | {field: 'matnr', align: 'center', title: '编码', event: 'detail'}, |
| | | {field: 'maktx', align: 'center', title: '名称', event: 'detail'}, |
| | | {field: 'matNo', align: 'center', title: '编码', event: 'detail'}, |
| | | {field: 'matName', align: 'center', title: '名称', event: 'detail'}, |
| | | {field: 'locNo', align: 'center', title: '库位', event: 'detail'} |
| | | ]], |
| | | done: function (res, curr, count) { |
| | |
| | | function pakOut() { |
| | | var tableData = layui.table.checkStatus('tableIdx').data; |
| | | if (tableData.length === 0) { |
| | | tips("请选择物料", true); |
| | | tips("请选择产品", true); |
| | | return; |
| | | } |
| | | var site = $('#staNoSelect').val(); |
| | |
| | | // 修改表格数据 |
| | | function updateTableData(data) { |
| | | for (var i=0;i<locDetlData.length;i++) { |
| | | if (data.matnr === locDetlData[i].matnr && data.locNo === locDetlData[i].locNo) { |
| | | if (data.matNo === locDetlData[i].matNo && data.locNo === locDetlData[i].locNo) { |
| | | locDetlData[i].count = data.count; |
| | | break |
| | | } |
| | |
| | | // 删除表格行 |
| | | function removeTableData(data) { |
| | | for (var i = locDetlData.length - 1; i >= 0; i--) { |
| | | if (locDetlData[i].locNo === data.locNo && locDetlData[i].matnr === data.matnr) { |
| | | if (locDetlData[i].locNo === data.locNo && locDetlData[i].matNo === data.matNo) { |
| | | locDetlData.splice(i, 1); |
| | | } |
| | | } |
| | |
| | | </script> |
| | | <script type="text/template" id="takeSiteSelectTemplate"> |
| | | {{#each data}} |
| | | <option value="{{this}}">{{this}}</option> |
| | | <option value="{{siteId}}">{{desc}}</option> |
| | | {{/each}} |
| | | </script> |
| | | </html> |