合并企业版代码(未测试,先提交到测试分支)
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
'category': 'sf',
|
||||
'author': 'jikimo',
|
||||
'website': 'https://sf.cs.jikimo.com',
|
||||
'depends': ['sf_base', 'sf_manufacturing', 'barcodes', ],
|
||||
'depends': ['sf_manufacturing', 'barcodes', ],
|
||||
'data': [
|
||||
# 定义权限组放在最上面
|
||||
# 权限组
|
||||
@@ -33,6 +33,9 @@
|
||||
],
|
||||
|
||||
'assets': {
|
||||
'web.assets_backend': [
|
||||
'sf_machine_connect/static/src/js/*'
|
||||
],
|
||||
},
|
||||
|
||||
'installable': True,
|
||||
|
||||
@@ -18,14 +18,23 @@ export class CodeField extends Component {
|
||||
setup() {
|
||||
super.setup();
|
||||
}
|
||||
async onBarcodeBtnClick() {
|
||||
async onBarcodeBtnClick() {
|
||||
// console.log(BarcodeScanner)
|
||||
const barcode = await BarcodeScanner.scanBarcode();
|
||||
// console.log(typeof barcode)
|
||||
// alert(barcode)
|
||||
|
||||
if (barcode) {
|
||||
await this.onBarcodeScanned(barcode);
|
||||
// console.log("存在")
|
||||
// alert('存在')
|
||||
|
||||
await this.onBarcodeScanned(barcode);
|
||||
if ("vibrate" in browser.navigator) {
|
||||
browser.navigator.vibrate(100);
|
||||
}
|
||||
} else {
|
||||
// console.log("不存在")
|
||||
// alert('不存在')
|
||||
this.notification.add(this.env._t("Please, scan again !"), {
|
||||
type: "warning",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user