Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/优化检测文件
This commit is contained in:
17
sf_manufacturing/static/src/js/customRFID.js
Normal file
17
sf_manufacturing/static/src/js/customRFID.js
Normal file
@@ -0,0 +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
|
||||
setTimeout(() => {
|
||||
RFID = ''
|
||||
}, 200)
|
||||
if(e.key == 'Enter' && e.keyCode == 13){
|
||||
if(!RFID || RFID.length <= 3) return;
|
||||
dom.children('span').text(RFID)
|
||||
RFID = ''
|
||||
return;
|
||||
}
|
||||
RFID += e.key
|
||||
})
|
||||
@@ -179,7 +179,8 @@
|
||||
attrs='{"invisible": [("routing_type","!=","装夹预调")]}'/>
|
||||
<field name="functional_fixture_type_id"
|
||||
attrs='{"invisible": [("routing_type","!=","装夹预调")]}'/>
|
||||
<field name="rfid_code" force_save="1" readonly="1"/>
|
||||
<field name="rfid_code" force_save="1" readonly="1" class="customRFID"/>
|
||||
<script src="/sf_manufacturing/static/src/js/customRFID.js"></script>
|
||||
</group>
|
||||
<!-- <group>-->
|
||||
<!-- <div>-->
|
||||
|
||||
Reference in New Issue
Block a user