增加装夹预调工单扫码开启

This commit is contained in:
mgw
2024-08-20 10:42:36 +08:00
parent 813e424ec9
commit 1d399527e0
2 changed files with 13 additions and 6 deletions

View File

@@ -1,15 +1,17 @@
var RFID = ''
$(document).off('keydown')
console.log(2222)
$(document).on('keydown', '.modal.d-block.o_technical_modal,body.o_web_client', function (e) {
const dom = $('.customRFID')
if(!dom.length) return
$(document).on('keydown', 'body.o_web_client', function (e) {
setTimeout(() => {
RFID = ''
}, 200)
if(e.key == 'Enter' && e.keyCode == 13 || e.key == 'Tab' && e.keyCode == 9){
console.log(RFID)
if(!RFID || RFID.length <= 3) return;
dom.children('span').text(RFID)
$('[name="button_start"]').trigger('click')
setTimeout(() => {
$('.o_dialog .modal-footer .btn-primary').trigger('click')
}, 50)
RFID = ''
return;
}