| | |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> |
| | | <style> |
| | | .form-box { |
| | | padding: 15px 5px 5px 5px; |
| | | font-size: 12px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .form-item { |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .form-box span { |
| | | font-size: 12px; |
| | | display: inline-block; |
| | | text-align: right; |
| | | width: 50px; |
| | | } |
| | | .form-box input { |
| | | width: 120px; |
| | | margin-left: 10px; |
| | | padding-left: 5px; |
| | | height: 20px; |
| | | border: 1px solid #777777; |
| | | overflow:hidden; |
| | | white-space:nowrap; |
| | | text-overflow:ellipsis; |
| | | } |
| | | |
| | | .number-tool { |
| | | margin-left: 10px; |
| | | padding: 1px 0 1px 5px; |
| | | display: inline-block; |
| | | width: 120px; |
| | | } |
| | | .number-tool:after { |
| | | clear: both; |
| | | content: ""; |
| | | display: table; |
| | | } |
| | | .number-tool button { |
| | | background-color: #fff; |
| | | margin-top: 2px; |
| | | font-size: 13px; |
| | | height: 18px; |
| | | float: left; |
| | | width: 20px; |
| | | border: 1px solid #777777; |
| | | } |
| | | .number-tool input { |
| | | text-align: center; |
| | | height: 20px; |
| | | float: left; |
| | | margin: 0 5px; |
| | | width: 30px; |
| | | padding: 0; |
| | | } |
| | | |
| | | .form-button { |
| | | margin-top: 10px; |
| | | padding: 5px 20px; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | |
| | | <div class="form-box"> |
| | | <div class="form-item"> |
| | | <span>库位号</span> |
| | | <input id="locNo" type="text" disabled="disabled"> |
| | | </div> |
| | | <div class="form-item"> |
| | | <span>物料编码</span> |
| | | <input id="matnr" type="text" disabled="disabled"> |
| | | </div> |
| | | <div class="form-item"> |
| | | <span>物料名称</span> |
| | | <input id="maktx" type="text" disabled="disabled"> |
| | | </div> |
| | | <div class="form-item"> |
| | | <span style="vertical-align: middle">数量</span> |
| | | <div class="number-tool" style="vertical-align: middle"> |
| | | <button onclick="reduce()">-</button><input id="count" type="number"><button onclick="add()">+</button> |
| | | </div> |
| | | </div> |
| | | <button class="form-button" id="save" onclick="save()">保存</button> |
| | | </div> |
| | | </body> |
| | | <script> |
| | | var countDom = $('#count'); |
| | | function add() { |
| | | countDom.val(Number(countDom.val()) + 1); |
| | | } |
| | | function reduce() { |
| | | if (countDom.val() <= 1) { |
| | | return; |
| | | } |
| | | countDom.val(countDom.val() - 1); |
| | | } |
| | | </script> |
| | | </html> |
| | |
| | | area: ['90%', '90%'], |
| | | content: 'locDetlIframe.html', |
| | | success: function(layero, index){ |
| | | // 设置弹窗样式 |
| | | $('.layui-layer-title').css('height', '20px').css('line-height', '20px').css('font-size', '12px').css('padding-left', '10px') |
| | | $('.layui-layer-setwin').css("top", '2px').css('right', '3px') |
| | | $('.layui-layer-setwin').css("top", '2px').css('right', '3px'); |
| | | // 注入值 |
| | | let el = layer.getChildFrame('.form-box', index); |
| | | for (var val in data) { |
| | | var find = el.find(":input[id='" + val + "']"); |
| | | find.val(data[val]); |
| | | } |
| | | } |
| | | }); |
| | | break; |