| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"/> |
| | |
| | | } |
| | | </style> |
| | | </head> |
| | | |
| | | <body> |
| | | <!-- 头部 --> |
| | | <header class="layui-form"> |
| | |
| | | <span style="width: 35px; margin-right: 5px">名称</span> |
| | | </td> |
| | | <td style="text-align: left"> |
| | | <textarea rows="2" style="resize: none; width: 165px" id="matName" type="text" disabled="disabled" |
| | | readonly="readonly"></textarea> |
| | | <textarea rows="2" style="resize: none; width: 165px" id="matName" type="text" |
| | | disabled="disabled" readonly="readonly"></textarea> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | |
| | | tableIns.reload({data: matData}); |
| | | } |
| | | |
| | | // 组托 - 防抖锁 |
| | | var isCombLocked = false; |
| | | |
| | | // 组托 |
| | | function comb() { |
| | | // 防抖检查 |
| | | if (isCombLocked) { |
| | | tips("操作中,请稍候...", true); |
| | | return; |
| | | } |
| | | isCombLocked = true; |
| | | |
| | | let barcode = $('#uuid').val(); |
| | | console.log('barcode', barcode); |
| | | if (isEmpty(barcode)) { |
| | | tips("请选择库区", true); |
| | | document.getElementById("uuid").focus(); |
| | | isCombLocked = false; |
| | | return; |
| | | } |
| | | if (matData.length === 0) { |
| | | tips("请提取物料", true); |
| | | isCombLocked = false; |
| | | return; |
| | | } |
| | | |
| | |
| | | } else { |
| | | tips(res.msg, true) |
| | | } |
| | | // 延迟解锁防抖 |
| | | setTimeout(function () { isCombLocked = false; }, 500); |
| | | }, |
| | | error: function () { |
| | | tips("请求失败", true); |
| | | isCombLocked = false; |
| | | } |
| | | }); |
| | | } else { |
| | | $.ajax({ |
| | |
| | | } else { |
| | | tips(res.msg, true) |
| | | } |
| | | // 延迟解锁防抖 |
| | | setTimeout(function () { isCombLocked = false; }, 500); |
| | | }, |
| | | error: function () { |
| | | tips("请求失败", true); |
| | | isCombLocked = false; |
| | | } |
| | | }); |
| | | } |
| | | } |
| | |
| | | layui.form.render('select'); |
| | | } |
| | | </script> |
| | | |
| | | </html> |