From 8d211f430259d0ce8001819b08c7d7c8a05fc5c4 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期四, 31 七月 2025 12:39:56 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into merchbak
---
pages/qitarukujiaoyan/form.vue | 60
pages/shouliaotongzhi/table.vue | 19
pages/tiaomachaima/tiaomachaima.vue | 67
pages/qitaruku/form.vue | 26
pages/baoyangjilu/form.vue | 60
pages/shebeiweixiu/form.vue | 60
.hbuilderx/launch.json | 1
pages/xiaoshouchuku/form.vue | 28
plugins/BluetoothTool.js | 7
pages/shengchanlingliao/form.vue | 28
pages/xiaoshoutuihuo/form.vue | 46
pages/caigourukujiaoyan/form.vue | 60
pages/xiaoshouchukujiaoyan/form.vue | 58
pages/baoyangjihua/form.vue | 60
pages/shebeiguanli/form.vue | 62
pages/weiwaigxIn/form.vue | 110 +
pages/weiwailingliao/form.vue | 26
pages/shengchandiaobo/form.vue | 18
pages/index/login.vue | 428 ++++------
pages/qitachuku/form.vue | 26
pages/guzhangdengji/form.vue | 60
pages/tiaomadaying/tiaomadaying.vue | 95 +
pages/caigouruku/form.vue | 29
pages/shengchanbuliao/form.vue | 26
pages/shengchanlingliaoshengdan/form.vue | 26
pages/shebeidangan/form.vue | 62
pages/weiwaigxOut/form.vue | 106 ++
pages/shengchanrukushengdan/form.vue | 26
pages.json | 2
pages/wuliaosaoma/wuliaosaoma.vue | 87 +-
pages/MJGL/shangmudan/form.vue | 18
pages/qitaruku_v2/form.vue | 26
pages/caigoutuiliao/form.vue | 28
pages/gongxuIn/form.vue | 56
pages/shengchanruku/form.vue | 18
pages/qitachuku_v2/form.vue | 26
pages/qitachukujiaoyan/detail.vue | 60
pages/weiwailingliaojiaoyan/form.vue | 60
manifest.json | 42
pages/shengchanbuliaojiaoyan/form.vue | 56
pages/weiwaigxOut/firstCheck.vue | 62
pages/gongxuOut/form.vue | 129 ++
pages/weiwaibuliaojiaoyan/form.vue | 60
pages/caigoudingdan/caigoudingdan.vue | 19
44 files changed, 1,336 insertions(+), 1,093 deletions(-)
diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json
index b4d909b..91f5ad9 100644
--- a/.hbuilderx/launch.json
+++ b/.hbuilderx/launch.json
@@ -22,6 +22,7 @@
},
{
"openVueDevtools" : true,
+ "playground" : "custom",
"type" : "uni-app:app-android"
}
]
diff --git a/manifest.json b/manifest.json
index a38818c..89816a9 100644
--- a/manifest.json
+++ b/manifest.json
@@ -2,8 +2,8 @@
"name" : "鏅轰簯LMES",
"appid" : "__UNI__B002F49",
"description" : "",
- "versionName" : "1.0.30",
- "versionCode" : 130,
+ "versionName" : "1.0.28",
+ "versionCode" : 128,
"transformPx" : false,
/* 5+App鐗规湁鐩稿叧 */
"app-plus" : {
@@ -46,7 +46,8 @@
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
- "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
+ "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
+ "minSdkVersion" : 23
},
/* ios鎵撳寘閰嶇疆 */
"ios" : {
@@ -88,6 +89,41 @@
}
}
}
+ },
+ "nativePlugins" : {
+ "Mpaas-Scan" : {
+ "AppId" : "ALIPUB2087527291109",
+ "License" : "uqSDoPf8ArVz0mKgs62fihEiELxaNc/fCwZU2eRwDvfdN3uhWCRRtXgszPkWmqjSUPYSFgOdMh0dv4UkQe0twC8fZt8+71FB3K6A83NaLtwi5gu+hVJ8MZnOTUe/ipmCCVmRGapmwfKfyHbV2oSAOLbq4/fgBszewOVtdjx7ogzyIltcCHOESsdejnFxmg/7+HuX5/0qmLxGIUUwGhwQazot0bQeGBP8sJ4ONZLd7n4WQFe8bQCrRcB3CPAFClwA/VldpIjOwrTYTd0LHyrhPJN5xHdpeoKmGIyJYsoxm94DDUFZyGHB+Qs+3euCJHOlCqpa7/A+ciAdUSeKHa0tkw==",
+ "WorkspaceId" : "default",
+ "__plugin_info__" : {
+ "name" : "鏀粯瀹濆師鐢熸壂鐮佹彃浠�",
+ "description" : "鏀粯瀹濆師鐢熸壂鐮佺粍浠讹紝鍖呬綋绉粎0.7MB锛�15鍒嗛挓鍗冲彲瀹屾垚鎺ュ叆銆傚悓鏃讹紝mPaaS鎻愪緵銆屾壂鐮佸垎鏋愩�嶅ぇ鐩�",
+ "platforms" : "Android,iOS",
+ "url" : "https://ext.dcloud.net.cn/plugin?id=2636",
+ "android_package_name" : "com.shebeiguanli.www",
+ "ios_bundle_id" : "",
+ "isCloud" : true,
+ "bought" : 1,
+ "pid" : "2636",
+ "parameters" : {
+ "AppId" : {
+ "des" : "Android骞冲彴鐨凙ppId锛岃濉啓Android鐨刢onfig鏂囦欢涓殑appId瀵瑰簲鐨勫��",
+ "key" : "mobilegw.appid",
+ "value" : ""
+ },
+ "License" : {
+ "des" : "Android骞冲彴鐨凩icense,锛岃濉啓Android鐨刢onfig鏂囦欢涓殑mpaasConfigLicense瀵瑰簲鐨勫��",
+ "key" : "mpaasConfigLicense",
+ "value" : ""
+ },
+ "WorkspaceId" : {
+ "des" : "Android骞冲彴鐨刉orkspaceId锛岃濉啓Android鐨刢onfig鏂囦欢涓殑workspaceId瀵瑰簲鐨勫��",
+ "key" : "workspaceId",
+ "value" : ""
+ }
+ }
+ }
+ }
}
},
/* 蹇簲鐢ㄧ壒鏈夌浉鍏� */
diff --git a/pages.json b/pages.json
index 637aa16..8fdb010 100644
--- a/pages.json
+++ b/pages.json
@@ -502,7 +502,7 @@
{
"path": "pages/tiaomadaying/tiaomadaying",
"style": {
- "navigationBarTitleText": "閲囪喘鏉$爜鎵撳嵃"
+ "navigationBarTitleText": "鏉ユ枡鏉$爜鎵撳嵃"
}
},
{
diff --git a/pages/MJGL/shangmudan/form.vue b/pages/MJGL/shangmudan/form.vue
index 8ae3262..8a02218 100644
--- a/pages/MJGL/shangmudan/form.vue
+++ b/pages/MJGL/shangmudan/form.vue
@@ -248,14 +248,16 @@
methods: {
//鎵爜
toScanCode(){
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- this.hform.HBarCode = res.result
- this.getHBarCodeData(res.result)
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ this.hform.HBarCode = ret.resp_result
+ this.getHBarCodeData(ret.resp_result)
+ })
},
//鏃ユ湡
HDateChange(e){
diff --git a/pages/baoyangjihua/form.vue b/pages/baoyangjihua/form.vue
index 21971cc..7a8fe97 100644
--- a/pages/baoyangjihua/form.vue
+++ b/pages/baoyangjihua/form.vue
@@ -244,35 +244,37 @@
},
//鎵爜閫夋嫨璁惧
toScanCode(){
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- uni.request({
- url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo',
- data: { HBarCode: res.result },
- success: (res) => {
- console.log(res.data);
- if(res.data.count == 1){
- var data = res.data.list[0][0]
- this.hform.HEquipID = data.hmainid
- this.hform.HEquipName = data.璁惧鍚嶇О
- }
- uni.showToast({
- title:res.data.Message,
- icon:'none'
- })
- },
- fail: (res) => {
- console.log(res);
- uni.showToast({
- title:'鎺ュ彛璇锋眰澶辫触',
- icon:'none'
- })
- },
- });
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ uni.request({
+ url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo',
+ data: { HBarCode: ret.resp_result },
+ success: (res) => {
+ console.log(res.data);
+ if(res.data.count == 1){
+ var data = res.data.list[0][0]
+ this.hform.HEquipID = data.hmainid
+ this.hform.HEquipName = data.璁惧鍚嶇О
+ }
+ uni.showToast({
+ title:res.data.Message,
+ icon:'none'
+ })
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title:'鎺ュ彛璇锋眰澶辫触',
+ icon:'none'
+ })
+ },
+ });
+ })
},
//鑾峰彇璁惧淇濆吇瑙勭▼鏁版嵁
diff --git a/pages/baoyangjilu/form.vue b/pages/baoyangjilu/form.vue
index 4cf6882..e7ce9e0 100644
--- a/pages/baoyangjilu/form.vue
+++ b/pages/baoyangjilu/form.vue
@@ -156,35 +156,37 @@
methods: {
//鎵爜
toScanCode(){
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- uni.request({
- url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo',
- data: { HBarCode: res.result },
- success: (res) => {
- console.log(res.data);
- if(res.data.count == 1){
- var data = res.data.list[0][0]
- this.hform.HEquipID = data.hmainid
- this.hform.HEquipName = data.璁惧鍚嶇О
- }
- uni.showToast({
- title:res.data.Message,
- icon:'none'
- })
- },
- fail: (res) => {
- console.log(res);
- uni.showToast({
- title:'鎺ュ彛璇锋眰澶辫触',
- icon:'none'
- })
- },
- });
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ uni.request({
+ url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo',
+ data: { HBarCode: ret.resp_result },
+ success: (res) => {
+ console.log(res.data);
+ if(res.data.count == 1){
+ var data = res.data.list[0][0]
+ this.hform.HEquipID = data.hmainid
+ this.hform.HEquipName = data.璁惧鍚嶇О
+ }
+ uni.showToast({
+ title:res.data.Message,
+ icon:'none'
+ })
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title:'鎺ュ彛璇锋眰澶辫触',
+ icon:'none'
+ })
+ },
+ });
+ })
},
upCode(){
uni.request({
diff --git a/pages/caigoudingdan/caigoudingdan.vue b/pages/caigoudingdan/caigoudingdan.vue
index 7cf3c02..b75cc51 100644
--- a/pages/caigoudingdan/caigoudingdan.vue
+++ b/pages/caigoudingdan/caigoudingdan.vue
@@ -84,15 +84,16 @@
methods: {
//鎵爜
toScanCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- this.HBarCode = res.result
-
- this.getCode(this.HBarCode)
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ this.HBarCode = ret.resp_result
+ this.getCode(this.HBarCode)
+ })
},
//鎵潯鐮佸鐞�
getCode(HBarCode) {
diff --git a/pages/caigouruku/form.vue b/pages/caigouruku/form.vue
index 933fb70..03660c6 100644
--- a/pages/caigouruku/form.vue
+++ b/pages/caigouruku/form.vue
@@ -346,21 +346,24 @@
innerAudioContext.play(); // 鎾斁闊抽
},
//鎵爜
- toScanCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- if (this.hform.HBarCode == '*') {
- this.hform.HBarCode = this.hform.HBarCode + res.result
- } else {
- this.hform.HBarCode = res.result
- }
-
- this.getCode(this.hform.HBarCode)
+ toScanCode(){
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ if(this.hform.HBarCode == '*'){
+ this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ }else{
+ this.hform.HBarCode = ret.resp_result
}
- });
+
+ this.getCode(this.hform.HBarCode)
+ })
},
+},
//鎵叾浠�(浠撳簱锛屼粨浣�)
// toScanData(e){
// uni.scanCode({
diff --git a/pages/caigourukujiaoyan/form.vue b/pages/caigourukujiaoyan/form.vue
index 198def9..2f961a4 100644
--- a/pages/caigourukujiaoyan/form.vue
+++ b/pages/caigourukujiaoyan/form.vue
@@ -253,36 +253,40 @@
methods: {
//鎵爜
toScanCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- // if(this.hform.HBarCode == '*'){
- // this.hform.HBarCode = this.hform.HBarCode + res.result
- // }else{
- // this.hform.HBarCode = res.result
- // }
- this.hform.HBarCode = res.result
- // this.GetMeesageByBillNo(this.hform.HBarCode)
- this.getCode(this.hform.HBarCode)
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ // if(this.hform.HBarCode == '*'){
+ // this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ // }else{
+ // this.hform.HBarCode = ret.resp_result
+ // }
+ this.hform.HBarCode = ret.resp_result
+ // this.GetMeesageByBillNo(this.hform.HBarCode)
+ this.getCode(this.hform.HBarCode)
+ })
+
},
toScanBillCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- // if(this.hform.HBarCode == '*'){
- // this.hform.HBarCode = this.hform.HBarCode + res.result
- // }else{
- // this.hform.HBarCode = res.result
- // }
-
- this.hform.HBillNo = res.result
- this.GetMeesageByBillNo(this.hform.HBillNo)
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ // if(this.hform.HBarCode == '*'){
+ // this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ // }else{
+ // this.hform.HBarCode = ret.resp_result
+ // }
+ this.hform.HBillNo = ret.resp_result
+ this.GetMeesageByBillNo(this.hform.HBillNo)
+ })
},
//鎵弿鍗曟嵁鍙锋潯鐮�
GetMeesageByBillNo(e) {
diff --git a/pages/caigoutuiliao/form.vue b/pages/caigoutuiliao/form.vue
index 6d3a7d2..96eb614 100644
--- a/pages/caigoutuiliao/form.vue
+++ b/pages/caigoutuiliao/form.vue
@@ -354,20 +354,22 @@
this.getHBarCodeData(inputVal)
},
//鎵爜
- toScanCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- if (this.hform.HBarCode == '*') {
- this.hform.HBarCode = this.hform.HBarCode + res.result
- } else {
- this.hform.HBarCode = res.result
- }
-
- this.getCode(this.hform.HBarCode)
+ toScanCode(){
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ if(this.hform.HBarCode == '*'){
+ this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ }else{
+ this.hform.HBarCode = ret.resp_result
}
- });
+
+ this.getCode(this.hform.HBarCode)
+ })
},
//鎵叾浠�(浠撳簱锛屼粨浣�)
// toScanData(e){
diff --git a/pages/gongxuIn/form.vue b/pages/gongxuIn/form.vue
index 2ba6c79..05ff13b 100644
--- a/pages/gongxuIn/form.vue
+++ b/pages/gongxuIn/form.vue
@@ -347,34 +347,35 @@
methods: {
//鎵爜
toScanCode(e){
- // this.hform.HBarCode = 'GXLX250603001-01'
- // this.getHBarCodeData('GXLX250603001-01')
-
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- if(e==0){
- this.hform.HBarCode = res.result
- this.getHBarCodeData(res.result)
- }else{
- this.hform.HBarCode_Mater = res.result
- this.getHBarCodeMater(res.result)
- }
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ if(e==0){
+ this.hform.HBarCode = ret.resp_result
+ this.getHBarCodeData(ret.resp_result)
+ }else{
+ this.hform.HBarCode_Mater = ret.resp_result
+ this.getHBarCodeMater(ret.resp_result)
+ }
+ })
},
//鎵祦姘村彿
toScanProcNo(){
if(this.hform.HProcExchHinteID){
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- this.hform.HProcNo = res.result
- this.getHProcNoData(this.hform.HBarCode,res.result)
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ this.hform.HProcNo = resp_result
+ this.getHProcNoData(this.hform.HBarCode,resp_result)
+ })
}else{
uni.showToast({
title:'璇锋壂瀹屾祦杞崱鍚庡啀鎵厤浠剁爜',
@@ -952,7 +953,12 @@
}
});
}
- }
+ }else{
+ uni.showToast({
+ title:res.data.Message,
+ icon:'none'
+ })
+ }
},
fail: (res) => {
diff --git a/pages/gongxuOut/form.vue b/pages/gongxuOut/form.vue
index 4808f56..d234022 100644
--- a/pages/gongxuOut/form.vue
+++ b/pages/gongxuOut/form.vue
@@ -560,29 +560,87 @@
this.getHGroupList()
this.getHEmpList()
this.getHCenterList()
+
+ this.getDefValByUser()
},
methods: {
+ //閫氳繃鐧诲綍鐢ㄦ埛鑾峰彇榛樿鍊�
+ getDefValByUser(){
+ uni.request({
+ url: this.serverUrl + '/Cj_StationInBill/GetDefValByUser',
+ type: "GET",
+ async: false,
+ data: { "Czybm": this.userInfo.Czybm, "Czymc": this.userInfo.Czymc },
+ success: (res) => {
+ // console.log(res.data)
+ if(res.data.count == 1){
+ var data = res.data.data[0]
+ this.hform.HGroupID = data.HGroupID
+ this.hform.HGroupName = data.鐢熶骇鐝粍鍚嶇О
+ this.hform.HEmpID = data.HEmpID
+ this.hform.HEmpName = data.鎿嶄綔鍛樺悕绉�
+ this.hform.HEmpNumber = data.鎿嶄綔鍛樹唬鐮�
+ this.hform.HSourceID = data.HSourceID
+ this.hform.HSourceName = data.鐢熶骇璧勬簮鍚嶇О
+ this.hform.HCenterID = data.HWorkCenterID
+ this.hform.HCenterName = data.宸ヤ綔涓績鍚嶇О
+ this.hform.HEmpName_second = data.鎿嶄綔鍛樺悕绉�
+ }else{
+ uni.showToast({
+ title:'鑾峰彇鐢熶骇鐝粍淇℃伅澶辫触',
+ icon:'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title:'鑾峰彇鐢熶骇鐝粍淇℃伅澶辫触',
+ icon:'none'
+ })
+ },
+ });
+ },
//鎵爜
toScanCode(){
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ var str = ret.resp_result
+ if(str.includes('@')) {
+ const parts = str.split('@');
+ this.hform.HBarCode = parts[0]
+ this.hform.HProcNo = parts[1]
+ this.getHBarCodeData(parts[0],1)
+ // this.getHProcNoData(parts[0],parts[1])
+ }else{
+ this.hform.HBarCode = ret.resp_result
+ this.getHBarCodeData(ret.resp_result)
+ }
+ })
// const str = "GXLX250603001-01@10";
- uni.scanCode({
- onlyFromCamera: true,
- // autoZoom:false,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- var str = res.result
- if(str.includes('@')) {
- const parts = str.split('@');
- this.hform.HBarCode = parts[0]
- this.hform.HProcNo = parts[1]
- this.getHBarCodeData(parts[0])
- // this.getHProcNoData(parts[0],parts[1])
- }else{
- this.hform.HBarCode = res.result
- this.getHBarCodeData(res.result)
- }
- }
- });
+ // uni.scanCode({
+ // onlyFromCamera: true,
+ // // autoZoom:false,
+ // success: (res) => {
+ // console.log('鏉$爜鍐呭锛�' + res.result);
+ // var str = res.result
+ // if(str.includes('@')) {
+ // const parts = str.split('@');
+ // this.hform.HBarCode = parts[0]
+ // this.hform.HProcNo = parts[1]
+ // this.getHBarCodeData(parts[0],1)
+ // // this.getHProcNoData(parts[0],parts[1])
+ // }else{
+ // this.hform.HBarCode = res.result
+ // this.getHBarCodeData(res.result)
+ // }
+ // }
+ // });
},
toInCode(e){
var str = this.hform.HBarCode
@@ -590,7 +648,7 @@
const parts = str.split('@');
this.hform.HBarCode = parts[0]
this.hform.HProcNo = parts[1]
- this.getHBarCodeData(parts[0])
+ this.getHBarCodeData(parts[0],1)
// this.getHProcNoData(parts[0],parts[1])
}else{
this.getHBarCodeData(this.hform.HBarCode)
@@ -598,14 +656,16 @@
},
//鎵祦姘村彿
toScanProcNo(){
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- this.hform.HProcNo = res.result
- this.getHProcNoData(this.hform.HBarCode,res.result)
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ this.hform.HProcNo = ret.resp_result
+ this.getHProcNoData(this.hform.HBarCode,ret.resp_result)
+ })
},
//鏃ユ湡
HDateChange(e){
@@ -1054,7 +1114,7 @@
if(res.data.code == 1){
var data = res.data.data[0]
this.getHBarCodeData(data.HBarCode)
- // this.getHProcNoData(data.HBarCode,data.HProcNo)
+ this.getHProcNoData(data.HBarCode,data.HProcNo)
this.hform.HInterID= data.HInterID
this.hform.HBillNo= data.HBillNo
@@ -1117,7 +1177,7 @@
},
});
},
- getHBarCodeData(HBarCode){
+ getHBarCodeData(HBarCode,e){
var barNo = HBarCode.substr(0, 2);
var barNo1 = HBarCode.substr(0, 4);
uni.request({
@@ -1155,7 +1215,9 @@
this.hform.HCenterID= data.HCenterID
this.hform.NoOutboundHqty= (data.娴佽浆鍗℃暟閲� - data.鍑虹珯鎶ュ簾鍏宠仈鏁伴噺 - data.鍑虹珯鍏宠仈鏁伴噺)
- this.getHProcNoData(this.hform.HBarCode,this.hform.HProcNo)
+ if(e){
+ this.getHProcNoData(this.hform.HBarCode,this.hform.HProcNo)
+ }
}else{
uni.showToast({
title:res.data.Message,
@@ -1312,7 +1374,12 @@
}
});
}
- }
+ }else{
+ uni.showToast({
+ title:res.data.Message,
+ icon:'none'
+ })
+ }
},
fail: (res) => {
console.log(res);
diff --git a/pages/guzhangdengji/form.vue b/pages/guzhangdengji/form.vue
index 5d20128..4dd4ac3 100644
--- a/pages/guzhangdengji/form.vue
+++ b/pages/guzhangdengji/form.vue
@@ -161,35 +161,37 @@
methods: {
//鎵爜
toScanCode(){
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- uni.request({
- url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo',
- data: { HBarCode: res.result },
- success: (res) => {
- console.log(res.data);
- if(res.data.count == 1){
- var data = res.data.list[0][0]
- this.hform.HEquipID = data.hmainid
- this.hform.HEquipName = data.璁惧鍚嶇О
- }
- uni.showToast({
- title:res.data.Message,
- icon:'none'
- })
- },
- fail: (res) => {
- console.log(res);
- uni.showToast({
- title:'鎺ュ彛璇锋眰澶辫触',
- icon:'none'
- })
- },
- });
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ uni.request({
+ url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo',
+ data: { HBarCode: ret.resp_result },
+ success: (res) => {
+ console.log(res.data);
+ if(res.data.count == 1){
+ var data = res.data.list[0][0]
+ this.hform.HEquipID = data.hmainid
+ this.hform.HEquipName = data.璁惧鍚嶇О
+ }
+ uni.showToast({
+ title:res.data.Message,
+ icon:'none'
+ })
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title:'鎺ュ彛璇锋眰澶辫触',
+ icon:'none'
+ })
+ },
+ });
+ })
},
// upCode(){
// uni.request({
diff --git a/pages/index/login.vue b/pages/index/login.vue
index 91cc1a7..2797c06 100644
--- a/pages/index/login.vue
+++ b/pages/index/login.vue
@@ -8,7 +8,7 @@
<image src="../../static/logo.png" mode=""></image>
</view>
<view class="login">
- <!-- <view class="item">
+<!-- <view class="item">
<view class="left">褰撳墠甯愬锛�</view>
<picker :range="arrayDataBases" :value="DataBases" @change="DataBasesChange">
<view class="right" style="display: flex;align-items: center;">
@@ -22,8 +22,7 @@
<picker :range="arrayOrganization" :value="Organization" @change="OrganizationChange">
<view class="right" style="display: flex;align-items: center;">
<input type="text" disabled v-model="Organization" placeholder="璇烽�夋嫨褰撳墠缁勭粐">
- <uni-icons type="forward" color="#808080"
- style="border-left: 1px solid #aaaaaa;padding: 0 8rpx;" size="18"></uni-icons>
+ <uni-icons type="forward" color="#808080" style="border-left: 1px solid #aaaaaa;padding: 0 8rpx;" size="18"></uni-icons>
</view>
</picker>
</view>
@@ -34,98 +33,60 @@
</view>
</view>
<view class="item">
- <view class="left">瀵� 鐮侊細</view>
+ <view class="left">瀵� 鐮侊細</view>
<view class="right">
<input type="password" v-model="PassWord">
</view>
</view>
- <!-- <view class="api">
+<!-- <view class="api">
褰撳墠鏈嶅姟鍣ㄥ湴鍧�锛歿{serverUrl}}
</view>
<view class="apibtn" @tap="changeApi=true">淇敼鏈嶅姟鍣ㄥ湴鍧�</view> -->
</view>
</view>
- <!-- <hFormAlert v-if="changeApi" placeholder="璇疯緭鍏ユ湇鍔″櫒鍦板潃" @confirm="confirm" @cancel="cancel"></hFormAlert> -->
- <uni-popup ref="popup" type="center">
- <uni-popup-dialog title="鏈嶅姟鍣ㄨ缃�" mode="input" @confirm="confirmHandler">
- <view class="popup-content">
- <picker class="pop-item" :range="arrayServerOrganization" :value="serverOrganization"
- @change="serverOrganizationChange">
- <view class="right" style="display: flex;align-items: center;">
- <input type="text" disabled v-model="serverOrganization" placeholder="璇烽�夋嫨褰撳墠缁勭粐">
- <uni-icons type="forward" color="#808080"
- style="border-left: 1px solid #aaaaaa;padding: 0 8rpx;" size="18"></uni-icons>
- </view>
- </picker>
- <view class="pop-item">
- <input type="text" :value="serverUrlCache" placeholder="璇疯緭鍏ユ湇鍔″櫒鍦板潃" />
- </view>
- </view>
- </uni-popup-dialog>
- </uni-popup>
-
+ <hFormAlert v-if="changeApi" placeholder="璇疯緭鍏ユ湇鍔″櫒鍦板潃" @confirm="confirm" @cancel="cancel"></hFormAlert>
+
<view class="btn" @tap="submit">鐧� 褰�</view>
- <!-- <view class="btn apibtn" @tap="changeApi=true">鏈嶅姟鍣ㄨ缃�</view> -->
- <view class="btn apibtn" @click="openServerSettingHandler">鏈嶅姟鍣ㄨ缃�</view>
+ <view class="btn apibtn" @tap="changeApi=true">鏈嶅姟鍣ㄨ缃�</view>
</view>
</view>
</template>
<script>
- import {
- setLoginData,
- setUserInfo
- } from "@/utils/auth.js";
+ import { setLoginData,setUserInfo} from "@/utils/auth.js";
import hFormAlert from '@/components/h-form-alert/h-form-alert.vue';
export default {
components: {
hFormAlert
},
- data() {
- return {
- arrayDataBases: [],
- DataBases: '',
-
- arrayServerOrganization: ["娴欐睙鏅轰簯杩堟��", "娓╁窞娴疯瘹"],
- arrayServerOrganizationValues: [
- 'http://47.96.97.237/API/',
- 'http://122.228.39.234:7177/API/'
- ],
- serverOrganization: '',
- arrayOrganization: [],
- Organization: '',
- HOrgNameList: [],
-
- HOrgName: '',
- UserName: '', //admin 001
- PassWord: '', //123456
- changeApi: false,
- serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
- serverUrlCache: '',
- }
- },
+ data() {
+ return {
+ arrayDataBases:[],
+ DataBases:'',
+
+ arrayOrganization:[],
+ Organization:'',
+ HOrgNameList:[],
+
+ HOrgName:'',
+ UserName:'',//admin 001
+ PassWord:'',//123456
+ changeApi:false,
+ serverUrl: uni.getStorageSync('serverUrl')||'http://47.96.97.237/API',
+ }
+ },
onLoad() {
- var logindata = uni.getStorageSync('loginData') || ''
+ var logindata = uni.getStorageSync('loginData')||''
// console.log(logindata)
- if (logindata) {
+ if(logindata){
logindata = JSON.parse(logindata)
this.HOrgName = logindata.HOrgName
this.Organization = logindata.Organization
this.UserName = logindata.UserName
this.PassWord = logindata.PassWord
}
-
- this.serverUrlCache = this.serverUrl
- console.log('this.serverUrlCache: ',this.serverUrlCache);
- let index = this.arrayServerOrganizationValues.findIndex((e) => {
- return e == this.serverUrlCache
- })
- if (index == -1) {
- index = 0
- }
- this.serverOrganization = this.arrayServerOrganization[index]
this.getOrganization()
- this.getDataBases()
+ // this.getDataBases()
},
methods: {
async InitOrgination() {
@@ -145,53 +106,44 @@
},
confirm(e) {
console.log(e)
- uni.setStorageSync('serverUrl', e)
+ uni.setStorageSync('serverUrl',e)
this.serverUrl = e
this.changeApi = false
this.getOrganization()
},
- confirmHandler() {
- uni.setStorageSync('serverUrl', this.serverUrlCache)
- this.serverUrl = this.serverUrlCache
- // this.changeApi = false
- this.getOrganization()
- },
- cancel() {
+ cancel(){
this.changeApi = false
},
- openServerSettingHandler() {
- this.$refs.popup.open()
- },
- getDataBases() {
+ getDataBases(){
uni.request({
- url: this.serverUrl + '/Web/GetDataBases',
- success: (result) => {
+ url: this.serverUrl + '/Web/GetDataBases',
+ success: (result) => {
console.log(result);
if (result.count == 1) {
- for (var i = 0; i < res.data.data.length; i++) {
+ for(var i=0;i<res.data.data.length;i++){
this.arrayDataBases[i] = result.data.data[i].name;
}
}
console.log(this.arrayDataBases);
this.$forceUpdate();
- },
+ },
fail: (res) => {
- console.log(res);
+ console.log(res);
},
});
},
- DataBasesChange(e) {
+ DataBasesChange(e){
console.log(e.detail.value)
this.DataBases = this.arrayDataBases[e.detail.value]
uni.setStorageSync('DataBases', this.DataBases);
},
-
- getOrganization() {
+
+ getOrganization(){
uni.request({
- url: this.serverUrl + '/Web/GetOrganizations',
- success: (res) => {
- console.log(res.data.data);
- for (var i = 0; i < res.data.data.length; i++) {
+ url: this.serverUrl + '/Web/GetOrganizations',
+ success: (res) => {
+ console.log(res.data.data);
+ for(var i=0;i<res.data.data.length;i++){
this.arrayOrganization[i] = res.data.data[i].Name
this.HOrgNameList[i] = res.data.data[i].ID
}
@@ -201,65 +153,59 @@
this.InitOrgination()
},
fail: (res) => {
- console.log(res);
+ console.log(res);
uni.showToast({
- title: '鑾峰彇缁勭粐澶辫触,璇锋鏌ユ湇鍔″櫒鍦板潃',
- icon: 'none'
+ title:'鑾峰彇缁勭粐澶辫触,璇锋鏌ユ湇鍔″櫒鍦板潃',
+ icon:'none'
})
},
});
},
- OrganizationChange(e) {
+ OrganizationChange(e){
// console.log(e.detail.value)
this.Organization = this.arrayOrganization[e.detail.value]
this.HOrgName = this.HOrgNameList[e.detail.value]
},
- serverOrganizationChange(e) {
- // console.log(e.detail.value)
- let index = e.detail.value
- this.serverOrganization = this.arrayServerOrganization[index]
- this.serverUrlCache = this.arrayServerOrganizationValues[index]
- },
- submit() {
- if (!this.Organization) {
+ submit(){
+ if(!this.Organization){
uni.showToast({
- title: '璇烽�夋嫨缁勭粐',
- icon: 'none'
+ title:'璇烽�夋嫨缁勭粐',
+ icon:'none'
})
- } else if (!this.UserName) {
+ }else if(!this.UserName){
uni.showToast({
- title: '璇疯緭鍏ョ敤鎴峰悕',
- icon: 'none'
+ title:'璇疯緭鍏ョ敤鎴峰悕',
+ icon:'none'
})
- } else if (!this.PassWord) {
+ }else if(!this.PassWord){
uni.showToast({
- title: '璇疯緭鍏ュ瘑鐮�',
- icon: 'none'
+ title:'璇疯緭鍏ュ瘑鐮�',
+ icon:'none'
})
- } else {
+ }else{
uni.showLoading({
- title: '鐧诲綍涓�...',
- mask: true
+ title:'鐧诲綍涓�...',
+ mask:true
})
var data = {
UserName: this.UserName,
- PassWord: this.PassWord,
+ PassWord: this.PassWord,
HOrgName: this.HOrgName,
Organization: this.Organization
}
uni.setStorageSync('loginData', JSON.stringify(data));
uni.request({
- url: this.serverUrl + '/Web/GetUser',
- method: 'GET',
- data: data,
+ url: this.serverUrl + '/Web/GetUser',
+ method:'GET',
+ data:data,
success: (res) => {
console.log(res)
uni.hideLoading()
uni.showToast({
- title: res.data.Message,
- icon: 'none'
+ title:res.data.Message,
+ icon:'none'
})
- if (res.data.count == 1) {
+ if(res.data.count == 1){
setLoginData(data)
setUserInfo(res.data.data[0])
uni.setStorageSync('HUserName', res.data.data[0].Czymc);
@@ -268,9 +214,9 @@
uni.setStorageSync('login', "login");
uni.setStorageSync('Organization', this.Organization);
uni.setStorageSync('OrganizationID', this.HOrgName);
-
+
uni.reLaunch({
- url: '/pages/index/index'
+ url:'/pages/index/index'
})
}
},
@@ -278,155 +224,125 @@
console.log(res);
uni.hideLoading()
uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
- icon: 'none'
+ title:'鎺ュ彛璇锋眰澶辫触',
+ icon:'none'
})
},
});
}
}
- }
+ }
}
</script>
<style lang="scss" scoped>
- .bg-img {
- position: fixed;
- width: 100%;
- height: 100%;
- top: 0;
- left: 0;
- z-index: -1;
+.bg-img{
+ position: fixed;
+ width: 100%;
+ height: 100%;
+ top: 0;
+ left: 0;
+ z-index: -1;
+}
+.container{
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ .title{
+ margin-top: 174rpx;
+ font-size: 47rpx;
+ font-weight: bold;
+ color: #FFFFFF;
}
-
- .container {
- width: 100%;
- height: 100%;
+ .box{
+ width: 682rpx;
+ position: relative;
+ top: 120rpx;
display: flex;
- flex-direction: column;
- align-items: center;
justify-content: center;
-
- .title {
- margin-top: 174rpx;
- font-size: 47rpx;
- font-weight: bold;
- color: #FFFFFF;
- }
-
- .box {
- width: 682rpx;
- position: relative;
- top: 120rpx;
- display: flex;
- justify-content: center;
-
- .logo {
- width: 155rpx;
- height: 155rpx;
- padding: 10rpx;
- position: absolute;
- z-index: 9;
- background-color: rgba(255, 255, 255, 0.5);
- border-radius: 100%;
-
- image {
- width: 100%;
- height: 100%;
- border-radius: 100%;
- background-color: #f0f3f7;
- }
- }
-
- .login {
+ .logo{
+ width: 155rpx;
+ height: 155rpx;
+ padding: 10rpx;
+ position: absolute;
+ z-index: 9;
+ background-color: rgba(255, 255, 255, 0.5);
+ border-radius: 100%;
+ image{
width: 100%;
- height: 480rpx;
- position: absolute;
- top: 90rpx;
- z-index: 0;
- background: #FFFFFF;
- border-radius: 25rpx 0 25rpx 0;
- box-shadow: 0 6rpx 24rpx 8rpx rgba(21, 99, 210, 0.14);
- padding-top: 160rpx;
-
- .item {
- display: flex;
- align-items: center;
- justify-content: flex-end;
- margin-right: 38rpx;
- margin-bottom: 70rpx;
-
- .left {
- font-size: 34rpx;
- font-weight: 400;
- color: #3C3C3C;
- }
-
- .right {
- width: 441rpx;
- height: 68rpx;
- background: #EBEBEB;
- border-radius: 10rpx;
-
- input {
- height: 100%;
- padding: 0 30rpx;
- font-size: 30rpx;
- }
- }
- }
-
- // .api{
- // margin-left: 30rpx;
- // font-size: 27rpx;
- // color: #888;
- // }
- // .apibtn{
- // text-align: center;
- // font-size: 27rpx;
- // margin-top: 14rpx;
- // color: #066fb8;
- // text-decoration: underline; /* 娣诲姞涓嬪垝绾� */
- // font-style: italic; /* 灏嗗瓧浣撳彉涓烘枩浣� */
- // }
+ height: 100%;
+ border-radius: 100%;
+ background-color: #f0f3f7;
}
}
-
- .btn {
- width: 540rpx;
- height: 92rpx;
- line-height: 92rpx;
- margin-top: 940rpx;
- background: #78CEFD;
- box-shadow: 0rpx 0rpx 44rpx 7rpx rgba(120, 206, 253, 0.3);
- border-radius: 10rpx;
- font-weight: 400;
- color: #FEFEFE;
- text-align: center;
- font-size: 36rpx;
- }
-
- .apibtn {
- margin-top: 50rpx;
- background: #eec18e;
- box-shadow: 0rpx 0rpx 44rpx 7rpx rgba(253, 186, 118, 0.3);
+ .login{
+ width: 100%;
+ height: 480rpx;
+ position: absolute;
+ top: 90rpx;
+ z-index: 0;
+ background: #FFFFFF;
+ border-radius: 25rpx 0 25rpx 0;
+ box-shadow: 0 6rpx 24rpx 8rpx rgba(21, 99, 210, 0.14);
+ padding-top: 160rpx;
+ .item{
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+ margin-right: 38rpx;
+ margin-bottom: 70rpx;
+ .left{
+ font-size: 34rpx;
+ font-weight: 400;
+ color: #3C3C3C;
+ }
+ .right{
+ width: 441rpx;
+ height: 68rpx;
+ background: #EBEBEB;
+ border-radius: 10rpx;
+ input{
+ height: 100%;
+ padding: 0 30rpx;
+ font-size: 30rpx;
+ }
+ }
+ }
+ // .api{
+ // margin-left: 30rpx;
+ // font-size: 27rpx;
+ // color: #888;
+ // }
+ // .apibtn{
+ // text-align: center;
+ // font-size: 27rpx;
+ // margin-top: 14rpx;
+ // color: #066fb8;
+ // text-decoration: underline; /* 娣诲姞涓嬪垝绾� */
+ // font-style: italic; /* 灏嗗瓧浣撳彉涓烘枩浣� */
+ // }
}
}
-
- .popup-content {
- box-sizing: border-box;
- display: flex;
- flex-direction: column;
- gap: 30rpx;
-
- .pop-item {
- border: #EBEBEB 2rpx solid;
- border-radius: 10rpx;
- padding: 14rpx 8rpx;
- }
-
- >picker {
- background-color: #EBEBEB;
- }
+ .btn{
+ width: 540rpx;
+ height: 92rpx;
+ line-height: 92rpx;
+ margin-top: 940rpx;
+ background: #78CEFD;
+ box-shadow: 0rpx 0rpx 44rpx 7rpx rgba(120,206,253,0.3);
+ border-radius: 10rpx;
+ font-weight: 400;
+ color: #FEFEFE;
+ text-align: center;
+ font-size: 36rpx;
}
-</style>
\ No newline at end of file
+ .apibtn{
+ margin-top: 50rpx;
+ background: #eec18e;
+ box-shadow: 0rpx 0rpx 44rpx 7rpx rgba(253, 186, 118, 0.3);
+ }
+}
+</style>
diff --git a/pages/qitachuku/form.vue b/pages/qitachuku/form.vue
index 1e5a499..ceaac06 100644
--- a/pages/qitachuku/form.vue
+++ b/pages/qitachuku/form.vue
@@ -388,19 +388,21 @@
methods: {
//鎵爜
toScanCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- if (this.hform.HBarCode == '*') {
- this.hform.HBarCode = this.hform.HBarCode + res.result
- } else {
- this.hform.HBarCode = res.result
- }
-
- this.getCode(this.hform.HBarCode)
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ if (this.hform.HBarCode == '*') {
+ this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ } else {
+ this.hform.HBarCode = ret.resp_result
}
- });
+
+ this.getCode(this.hform.HBarCode)
+ })
},
//閫夋嫨浠撳簱
HWHNameChange(e) {
diff --git a/pages/qitachuku_v2/form.vue b/pages/qitachuku_v2/form.vue
index 8a00934..2abf239 100644
--- a/pages/qitachuku_v2/form.vue
+++ b/pages/qitachuku_v2/form.vue
@@ -441,19 +441,21 @@
},
//鎵爜
toScanCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- if (this.hform.HBarCode == '*') {
- this.hform.HBarCode = this.hform.HBarCode + res.result
- } else {
- this.hform.HBarCode = res.result
- }
-
- this.getCode(this.hform.HBarCode)
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ if (this.hform.HBarCode == '*') {
+ this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ } else {
+ this.hform.HBarCode = ret.resp_result
}
- });
+
+ this.getCode(this.hform.HBarCode)
+ })
},
showBillList() {
this.$refs.billList.showPopup()
diff --git a/pages/qitachukujiaoyan/detail.vue b/pages/qitachukujiaoyan/detail.vue
index bcf0c36..a337a83 100644
--- a/pages/qitachukujiaoyan/detail.vue
+++ b/pages/qitachukujiaoyan/detail.vue
@@ -254,36 +254,40 @@
methods: {
//鎵爜
toScanCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- // if(this.hform.HBarCode == '*'){
- // this.hform.HBarCode = this.hform.HBarCode + res.result
- // }else{
- // this.hform.HBarCode = res.result
- // }
- this.hform.HBarCode = res.result
- // this.GetMeesageByBillNo(this.hform.HBarCode)
- this.getCode(this.hform.HBarCode)
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ // if(this.hform.HBarCode == '*'){
+ // this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ // }else{
+ // this.hform.HBarCode = ret.resp_result
+ // }
+ this.hform.HBarCode = ret.resp_result
+ // this.GetMeesageByBillNo(this.hform.HBarCode)
+ this.getCode(this.hform.HBarCode)
+ })
},
toScanBillCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- // if(this.hform.HBarCode == '*'){
- // this.hform.HBarCode = this.hform.HBarCode + res.result
- // }else{
- // this.hform.HBarCode = res.result
- // }
-
- this.hform.HBillNo = res.result
- this.GetMeesageByBillNo(this.hform.HBillNo)
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ // if(this.hform.HBarCode == '*'){
+ // this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ // }else{
+ // this.hform.HBarCode = ret.resp_result
+ // }
+
+ this.hform.HBillNo = ret.resp_result
+ this.GetMeesageByBillNo(this.hform.HBillNo)
+ })
},
//鎵弿鍗曟嵁鍙锋潯鐮�
GetMeesageByBillNo(e) {
diff --git a/pages/qitaruku/form.vue b/pages/qitaruku/form.vue
index 39599d3..3afa7fa 100644
--- a/pages/qitaruku/form.vue
+++ b/pages/qitaruku/form.vue
@@ -359,19 +359,21 @@
methods: {
//鎵爜
toScanCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- if (this.hform.HBarCode == '*') {
- this.hform.HBarCode = this.hform.HBarCode + res.result
- } else {
- this.hform.HBarCode = res.result
- }
-
- this.getCode(this.hform.HBarCode)
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ if (this.hform.HBarCode == '*') {
+ this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ } else {
+ this.hform.HBarCode = ret.resp_result
}
- });
+
+ this.getCode(this.hform.HBarCode)
+ })
},
//鎵叾浠�(浠撳簱锛屼粨浣�)
// toScanData(e){
diff --git a/pages/qitaruku_v2/form.vue b/pages/qitaruku_v2/form.vue
index cdc2176..fcd4d48 100644
--- a/pages/qitaruku_v2/form.vue
+++ b/pages/qitaruku_v2/form.vue
@@ -468,19 +468,21 @@
},
//鎵爜
toScanCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- if (this.hform.HBarCode == '*') {
- this.hform.HBarCode = this.hform.HBarCode + res.result
- } else {
- this.hform.HBarCode = res.result
- }
-
- this.getCode(this.hform.HBarCode)
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ if (this.hform.HBarCode == '*') {
+ this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ } else {
+ this.hform.HBarCode = ret.resp_result
}
- });
+
+ this.getCode(this.hform.HBarCode)
+ })
},
showBillList() {
this.$refs.billList.showPopup()
diff --git a/pages/qitarukujiaoyan/form.vue b/pages/qitarukujiaoyan/form.vue
index 817a621..5640703 100644
--- a/pages/qitarukujiaoyan/form.vue
+++ b/pages/qitarukujiaoyan/form.vue
@@ -253,36 +253,40 @@
methods: {
//鎵爜
toScanCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- // if(this.hform.HBarCode == '*'){
- // this.hform.HBarCode = this.hform.HBarCode + res.result
- // }else{
- // this.hform.HBarCode = res.result
- // }
- this.hform.HBarCode = res.result
- // this.GetMeesageByBillNo(this.hform.HBarCode)
- this.getCode(this.hform.HBarCode)
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ // if(this.hform.HBarCode == '*'){
+ // this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ // }else{
+ // this.hform.HBarCode = ret.resp_result
+ // }
+ this.hform.HBarCode = ret.resp_result
+ // this.GetMeesageByBillNo(this.hform.HBarCode)
+ this.getCode(this.hform.HBarCode)
+ })
},
toScanBillCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- // if(this.hform.HBarCode == '*'){
- // this.hform.HBarCode = this.hform.HBarCode + res.result
- // }else{
- // this.hform.HBarCode = res.result
- // }
-
- this.hform.HBillNo = res.result
- this.GetMeesageByBillNo(this.hform.HBillNo)
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ // if(this.hform.HBarCode == '*'){
+ // this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ // }else{
+ // this.hform.HBarCode = ret.resp_result
+ // }
+
+ this.hform.HBillNo = ret.resp_result
+ this.GetMeesageByBillNo(this.hform.HBillNo)
+ })
},
//鎵弿鍗曟嵁鍙锋潯鐮�
GetMeesageByBillNo(e) {
diff --git a/pages/shebeidangan/form.vue b/pages/shebeidangan/form.vue
index 6c7c55b..ca12485 100644
--- a/pages/shebeidangan/form.vue
+++ b/pages/shebeidangan/form.vue
@@ -364,36 +364,38 @@
methods: {
//鎵爜
toScanCode(){
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- this.hform.HBarCode = res.result
- // uni.request({
- // url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo',
- // data: { HBarCode: res.result },
- // success: (res) => {
- // console.log(res.data);
- // var data = res.data.list[0][0]
- // if(res.data.count == 1){
- // this.hform.HEquipID = data.hmainid
- // this.hform.HEquipName = data.璁惧鍚嶇О
- // }
- // uni.showToast({
- // title:res.data.Message,
- // icon:'none'
- // })
- // },
- // fail: (res) => {
- // console.log(res);
- // uni.showToast({
- // title:'鎺ュ彛璇锋眰澶辫触',
- // icon:'none'
- // })
- // },
- // });
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ this.hform.HBarCode = ret.resp_result
+ // uni.request({
+ // url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo',
+ // data: { HBarCode: ret.resp_result },
+ // success: (res) => {
+ // console.log(res.data);
+ // var data = res.data.list[0][0]
+ // if(res.data.count == 1){
+ // this.hform.HEquipID = data.hmainid
+ // this.hform.HEquipName = data.璁惧鍚嶇О
+ // }
+ // uni.showToast({
+ // title:res.data.Message,
+ // icon:'none'
+ // })
+ // },
+ // fail: (res) => {
+ // console.log(res);
+ // uni.showToast({
+ // title:'鎺ュ彛璇锋眰澶辫触',
+ // icon:'none'
+ // })
+ // },
+ // });
+ })
},
// upCode(){
// uni.request({
diff --git a/pages/shebeiguanli/form.vue b/pages/shebeiguanli/form.vue
index aafd004..be263e9 100644
--- a/pages/shebeiguanli/form.vue
+++ b/pages/shebeiguanli/form.vue
@@ -367,36 +367,38 @@
methods: {
//鎵爜
toScanCode(){
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- this.hform.HBarCode = res.result
- // uni.request({
- // url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo',
- // data: { HBarCode: res.result },
- // success: (res) => {
- // console.log(res.data);
- // var data = res.data.list[0][0]
- // if(res.data.count == 1){
- // this.hform.HEquipID = data.hmainid
- // this.hform.HEquipName = data.璁惧鍚嶇О
- // }
- // uni.showToast({
- // title:res.data.Message,
- // icon:'none'
- // })
- // },
- // fail: (res) => {
- // console.log(res);
- // uni.showToast({
- // title:'鎺ュ彛璇锋眰澶辫触',
- // icon:'none'
- // })
- // },
- // });
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ this.hform.HBarCode = ret.resp_result
+ // uni.request({
+ // url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo',
+ // data: { HBarCode: ret.resp_result },
+ // success: (res) => {
+ // console.log(res.data);
+ // var data = res.data.list[0][0]
+ // if(res.data.count == 1){
+ // this.hform.HEquipID = data.hmainid
+ // this.hform.HEquipName = data.璁惧鍚嶇О
+ // }
+ // uni.showToast({
+ // title:res.data.Message,
+ // icon:'none'
+ // })
+ // },
+ // fail: (res) => {
+ // console.log(res);
+ // uni.showToast({
+ // title:'鎺ュ彛璇锋眰澶辫触',
+ // icon:'none'
+ // })
+ // },
+ // });
+ })
},
// upCode(){
// uni.request({
diff --git a/pages/shebeiweixiu/form.vue b/pages/shebeiweixiu/form.vue
index 52125ee..d412ac5 100644
--- a/pages/shebeiweixiu/form.vue
+++ b/pages/shebeiweixiu/form.vue
@@ -219,35 +219,37 @@
methods: {
//鎵爜
toScanCode(){
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- uni.request({
- url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo',
- data: { HBarCode: res.result },
- success: (res) => {
- console.log(res.data);
- if(res.data.count == 1){
- var data = res.data.list[0][0]
- this.hform.HEquipID = data.hmainid
- this.hform.HEquipName = data.璁惧鍚嶇О
- }
- uni.showToast({
- title:res.data.Message,
- icon:'none'
- })
- },
- fail: (res) => {
- console.log(res);
- uni.showToast({
- title:'鎺ュ彛璇锋眰澶辫触',
- icon:'none'
- })
- },
- });
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ uni.request({
+ url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo',
+ data: { HBarCode: ret.resp_result },
+ success: (res) => {
+ console.log(res.data);
+ if(res.data.count == 1){
+ var data = res.data.list[0][0]
+ this.hform.HEquipID = data.hmainid
+ this.hform.HEquipName = data.璁惧鍚嶇О
+ }
+ uni.showToast({
+ title:res.data.Message,
+ icon:'none'
+ })
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title:'鎺ュ彛璇锋眰澶辫触',
+ icon:'none'
+ })
+ },
+ });
+ })
},
//缁翠慨寮�濮嬮�夋嫨
HBeginDateChange(e){
diff --git a/pages/shengchanbuliao/form.vue b/pages/shengchanbuliao/form.vue
index e37a9c0..ca73e47 100644
--- a/pages/shengchanbuliao/form.vue
+++ b/pages/shengchanbuliao/form.vue
@@ -413,19 +413,21 @@
},
//鎵爜
toScanCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- if (this.hform.HBarCode == '*') {
- this.hform.HBarCode = this.hform.HBarCode + res.result
- } else {
- this.hform.HBarCode = res.result
- }
-
- this.getCode(this.hform.HBarCode)
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ if (this.hform.HBarCode == '*') {
+ this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ } else {
+ this.hform.HBarCode = ret.resp_result
}
- });
+
+ this.getCode(this.hform.HBarCode)
+ })
},
showBillList() {
this.$refs.billList.showPopup()
diff --git a/pages/shengchanbuliaojiaoyan/form.vue b/pages/shengchanbuliaojiaoyan/form.vue
index 626488b..9e81dc5 100644
--- a/pages/shengchanbuliaojiaoyan/form.vue
+++ b/pages/shengchanbuliaojiaoyan/form.vue
@@ -268,35 +268,39 @@
methods: {
//鏉$爜鍙锋壂鐮�
toScanCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- // if(this.hform.HBarCode == '*'){
- // this.hform.HBarCode = this.hform.HBarCode + res.result
- // }else{
- // this.hform.HBarCode = res.result
- // }
- this.hform.HBarCode = res.result
- this.getCode(this.hform.HBarCode)
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ // if(this.hform.HBarCode == '*'){
+ // this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ // }else{
+ // this.hform.HBarCode = ret.resp_result
+ // }
+ this.hform.HBarCode = ret.resp_result
+ this.getCode(this.hform.HBarCode)
+ })
},
//鎵弿鍗曟嵁鍙锋潯鐮�
toScanBillCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- // if(this.hform.HBarCode == '*'){
- // this.hform.HBarCode = this.hform.HBarCode + res.result
- // }else{
- // this.hform.HBarCode = res.result
- // }
- this.hform.HBillNo = res.result
- this.GetMeesageByBillNo(this.hform.HBillNo)
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ // if(this.hform.HBarCode == '*'){
+ // this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ // }else{
+ // this.hform.HBarCode = ret.resp_result
+ // }
+ this.hform.HBillNo = ret.resp_result
+ this.GetMeesageByBillNo(this.hform.HBillNo)
+ })
},
//鎵弿鍗曟嵁鍙锋潯鐮�
GetMeesageByBillNo(e) {
diff --git a/pages/shengchandiaobo/form.vue b/pages/shengchandiaobo/form.vue
index cb99e15..7537e8e 100644
--- a/pages/shengchandiaobo/form.vue
+++ b/pages/shengchandiaobo/form.vue
@@ -250,14 +250,16 @@
},
//鎵爜
toScanCode(){
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- this.hform.HBillNo = res.result
- this.GetMeesageByBillNo(this.hform.HBillNo)
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ this.hform.HBillNo = ret.resp_result
+ this.GetMeesageByBillNo(this.hform.HBillNo)
+ })
},
//鎵弿鍗曟嵁鍙锋潯鐮�
GetMeesageByBillNo(e){
diff --git a/pages/shengchanlingliao/form.vue b/pages/shengchanlingliao/form.vue
index b183a61..fc7e038 100644
--- a/pages/shengchanlingliao/form.vue
+++ b/pages/shengchanlingliao/form.vue
@@ -236,19 +236,21 @@
},
//鎵爜
toScanCode(){
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- // if(this.hform.HBarCode == '*'){
- // this.hform.HBarCode = this.hform.HBarCode + res.result
- // }else{
- // this.hform.HBarCode = res.result
- // }
- this.hform.HBillNo = res.result
- this.GetMeesageByBillNo(res.result)
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ // if(this.hform.HBarCode == '*'){
+ // this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ // }else{
+ // this.hform.HBarCode = ret.resp_result
+ // }
+ this.hform.HBillNo = ret.resp_result
+ this.GetMeesageByBillNo(ret.resp_result)
+ })
},
//鎵弿鍗曟嵁鍙锋潯鐮�
GetMeesageByBillNo(e){
diff --git a/pages/shengchanlingliaoshengdan/form.vue b/pages/shengchanlingliaoshengdan/form.vue
index 38a4833..311be6c 100644
--- a/pages/shengchanlingliaoshengdan/form.vue
+++ b/pages/shengchanlingliaoshengdan/form.vue
@@ -422,19 +422,21 @@
},
//鎵爜
toScanCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- if (this.hform.HBarCode == '*') {
- this.hform.HBarCode = this.hform.HBarCode + res.result
- } else {
- this.hform.HBarCode = res.result
- }
-
- this.getCode(this.hform.HBarCode)
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ if (this.hform.HBarCode == '*') {
+ this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ } else {
+ this.hform.HBarCode = ret.resp_result
}
- });
+
+ this.getCode(this.hform.HBarCode)
+ })
},
showBillList() {
this.$refs.billList.showPopup()
diff --git a/pages/shengchanruku/form.vue b/pages/shengchanruku/form.vue
index 89fbf3b..fade64e 100644
--- a/pages/shengchanruku/form.vue
+++ b/pages/shengchanruku/form.vue
@@ -221,14 +221,16 @@
},
//鎵爜
toScanCode(){
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- this.hform.HBillNo = res.result
- this.GetMeesageByBillNo(this.hform.HBillNo)
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ this.hform.HBillNo = ret.resp_result
+ this.GetMeesageByBillNo(this.hform.HBillNo)
+ })
},
//鎵弿鍗曟嵁鍙锋潯鐮�
GetMeesageByBillNo(e){
diff --git a/pages/shengchanrukushengdan/form.vue b/pages/shengchanrukushengdan/form.vue
index 06dc15a..026afef 100644
--- a/pages/shengchanrukushengdan/form.vue
+++ b/pages/shengchanrukushengdan/form.vue
@@ -414,19 +414,21 @@
},
//鎵爜
toScanCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- if (this.hform.HBarCode == '*') {
- this.hform.HBarCode = this.hform.HBarCode + res.result
- } else {
- this.hform.HBarCode = res.result
- }
-
- this.getCode(this.hform.HBarCode)
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ if (this.hform.HBarCode == '*') {
+ this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ } else {
+ this.hform.HBarCode = ret.resp_result
}
- });
+
+ this.getCode(this.hform.HBarCode)
+ })
},
showBillList() {
this.$refs.billList.showPopup()
diff --git a/pages/shouliaotongzhi/table.vue b/pages/shouliaotongzhi/table.vue
index 41adb4b..51701d3 100644
--- a/pages/shouliaotongzhi/table.vue
+++ b/pages/shouliaotongzhi/table.vue
@@ -94,15 +94,16 @@
},
//鎵爜
toScanCode(){
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- this.HBarCode = res.result
-
- this.getCode(this.HBarCode)
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ this.HBarCode = ret.resp_result
+ this.getCode(this.HBarCode)
+ })
},
//鎵潯鐮佸鐞�
getCode(HBarCode){
diff --git a/pages/tiaomachaima/tiaomachaima.vue b/pages/tiaomachaima/tiaomachaima.vue
index d816ac8..26007ba 100644
--- a/pages/tiaomachaima/tiaomachaima.vue
+++ b/pages/tiaomachaima/tiaomachaima.vue
@@ -314,39 +314,42 @@
},
toScanCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- if (this.CommonUtils.isEmpty(res.result) === false) {
- console.log('鏉$爜鍐呭锛�' + res.result);
- this.barCodeInfoMeta.barCodeNo = res.result
-
- this.searchbarCodeInfo()
- // this.doRequest(
- // "/Gy_SplitBarCode/Info", {
- // HBarCodeNo: res.result,
- // HSplitBarNum: 1
- // },
- // function(res) {
- // console.log(res)
- // this.barCodeSplitInfo = []
- // let res1 = res.data
- // let {
- // data,
- // count
- // } = res1
- // if (count > 0) {
- // console.log(data[0])
- // this.barCodeInfo = data[0]
- // }
- // },
- // function(err) {
- // console.error(err)
- // }
- // )
- }
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ if (this.CommonUtils.isEmpty(ret.resp_result) === false) {
+ console.log('鏉$爜鍐呭锛�' + ret.resp_result);
+ this.barCodeInfoMeta.barCodeNo = ret.resp_result
+
+ this.searchbarCodeInfo()
+ // this.doRequest(
+ // "/Gy_SplitBarCode/Info", {
+ // HBarCodeNo: ret.resp_result,
+ // HSplitBarNum: 1
+ // },
+ // function(res) {
+ // console.log(res)
+ // this.barCodeSplitInfo = []
+ // let res1 = res.data
+ // let {
+ // data,
+ // count
+ // } = res1
+ // if (count > 0) {
+ // console.log(data[0])
+ // this.barCodeInfo = data[0]
+ // }
+ // },
+ // function(err) {
+ // console.error(err)
+ // }
+ // )
}
- });
+ })
}
},
onLoad() {
diff --git a/pages/tiaomadaying/tiaomadaying.vue b/pages/tiaomadaying/tiaomadaying.vue
index db9a6f2..6f8598e 100644
--- a/pages/tiaomadaying/tiaomadaying.vue
+++ b/pages/tiaomadaying/tiaomadaying.vue
@@ -300,36 +300,25 @@
SETQRVER 3
B QR 440 30 M 4 U 6
LA,${this.lailiaoInfo.barCodeNo}
+B QR 500 30 M 2 U 3
+LA,${this.generatedBarCode}
ENDQR
-T 24 0 10 30 渚涘簲鍟�: ${this.lailiaoInfo.HSupName}
-T 24 0 10 55 (eng)
-T 24 0 10 80 渚涘簲鍟嗘枡鍙�: ${this.lailiaoInfo.HMaterNumber}
-T 24 0 10 105 (eng)
-T 24 0 10 130 鐗╂枡鍚嶇О: ${this.lailiaoInfo.HMaterName}
-T 24 0 5 155 (eng)
-T 24 0 5 180 鍒嗙粍: ${this.lailiaoInfo.HBatchNo}
-T 24 0 5 205 (eng)
-T 24 0 300 180 瑙勬牸: ${this.lailiaoInfo.HMaterModel}
-T 24 0 300 205 (eng)
-T 24 0 10 230 鏁伴噺: ${this.lailiaoInfo.HQty} (${this.lailiaoInfo.HPcsName})
-T 24 0 5 255 (eng)
-T 24 0 300 230 鏃ユ湡: ${this.lailiaoInfo.HDate}
-T 24 0 300 255 (eng)
-T 24 0 5 280 妫�楠屽憳:
-T 24 0 5 305 (eng)
-T 24 0 300 280 閲囪喘鍗曞彿: ${this.lailiaoInfo.HBillNo || ''}
-T 24 0 300 305 (eng)
-T 24 0 5 330 妫�楠岀粨鏋�:
-T 24 0 5 355 (eng)
+T 24 0 30 30 渚涘簲鍟�: ${this.lailiaoInfo.HSupName}
+T 24 0 30 80 渚涘簲鍟嗘枡鍙�:
+T 24 0 30 130 鐗╂枡缂栫爜: ${this.lailiaoInfo.HMaterName}
+T 24 0 30 180 鐗╂枡鍒嗙粍:
+T 24 0 300 180 瑙勬牸鍨嬪彿: ${this.lailiaoInfo.HMaterModel}
+T 24 0 30 230 鏁伴噺: ${this.lailiaoInfo.HQty}
+T 24 0 300 230 鏃ユ湡:
+T 24 0 30 280 妫�楠屽憳:
+T 24 0 300 280 璁″垝璺熻釜鍙�: ${this.lailiaoInfo.HMTONo || ''}
+T 24 0 30 330 妫�楠岀粨鏋�:
BOX 260 330 280 350 4
T 24 0 290 330 鍚堟牸
-T 24 0 290 355 (eng)
BOX 360 330 380 350 4
T 24 0 390 330 涓嶅悎鏍�
-T 24 0 390 355 (eng)
BOX 480 330 500 350 4
T 24 0 510 330 鐗归噰
-T 24 0 510 355 (eng)
FORM
PRINT`
@@ -350,7 +339,6 @@
}
let d = data[row - 1]
- console.log('鏉$爜鎺ユ敹鏁版嵁: ', d)
this.lailiaoInfo = Object.assign(this.lailiaoInfo, {
HMaterNumber: d['鐗╂枡缂栫爜'],
HMaterName: d['鐗╂枡鍚嶇О'],
@@ -359,16 +347,14 @@
HQty: d['鏁伴噺'],
HMinQty: d['鏁伴噺'],
HBQty: d['鏁伴噺'],
- HDate: d['鏃ユ湡'],
HSupID: d['HSupID'],
HSupName: d['渚涘簲鍟�'],
HUnitID: d['HUnitID'],
HSupNameShort: d['渚涘簲鍟�'],
- HMTONo: d['璁″垝璺熻釜鍙�'],
+ HMTONo: d['璁㈠崟璺熻釜鍙�'],
HMainID: d['linterid'],
HSubID: d['HEntryID'],
HMaterID: d['HMaterID'],
- HPcsName: d['璁¢噺鍗曚綅']
})
CommonUtils.playSound(1)
this.buttonStatus.btn2 = true
@@ -450,12 +436,53 @@
}
},
toScanCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- this.barCodeEntryHandler(res.result)
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ if (CommonUtils.isEmpty(ret.resp_result) === false) {
+ console.log('鏉$爜鍐呭锛�' + ret.resp_result);
+ this.lailiaoInfo.barCodeNo = ret.resp_result;
+ if (ret.resp_result.includes("@") === false) {
+ return uni.showToast({
+ icon: 'none',
+ title: '鏉$爜鏍煎紡閿欒锛岃閲嶆柊鎵弿...'
+ })
+ }
+ let barCodeInfo = ret.resp_result.split("@")
+ let [PurchaseBillNo, Row] = barCodeInfo
+ this.lailiaoInfo.HBillNo = PurchaseBillNo,
+ this.lailiaoInfo.HBillLineNo = Row
+ console.log({
+ sWhere: ` and 鍗曟嵁鍙� = '${PurchaseBillNo}'`,
+ user: this.userInfo.Czymc,
+ })
+ CommonUtils.doRequest(
+ "/Cg_POOrderBill/list", {
+ sWhere: ` and 鍗曟嵁鍙� = '${PurchaseBillNo}'`,
+ user: this.userInfo.Czymc,
+ },
+ (res) => {
+ console.log('閲囪喘璁㈠崟: ', res)
+ let {
+ data,
+ count
+ } = res.data
+ if (count > 0) {
+ this.setLailiaoInfo(data, Row)
+ }
+ },
+ (error) => {
+
+ }
+ )
+
}
- });
+
+ })
},
GenereateBarCode() {
let HBarCodeNoStr =
@@ -468,9 +495,9 @@
//鑾峰彇閫夋嫨鐨勫伐鍘備唬鐮�
let CampanyName = "xxx";
//鑾峰彇閫夋嫨鐨勬簮鍗曠被鍨�
- let HSourceBillType = "閲囪喘璁㈠崟";
+ let HSourceBillType = "鏉ユ枡閫氱煡鍗�";
//鑾峰彇閫夋嫨鐨勬潯鐮佺被鍨�
- let HSelectBarCodeType = "鍝佺鏉$爜";
+ let HSelectBarCodeType = "鍞竴鏉$爜";
//鑾峰彇褰撳墠鐧诲綍浜哄憳
let UserName = uni.getStorageSync('HUserName');
let sMainSub = sMainStr + ';' + HOrgType + ';' + HSourceBillType + ';' + HSelectBarCodeType + ';' +
diff --git a/pages/weiwaibuliaojiaoyan/form.vue b/pages/weiwaibuliaojiaoyan/form.vue
index 0e31ece..9859f10 100644
--- a/pages/weiwaibuliaojiaoyan/form.vue
+++ b/pages/weiwaibuliaojiaoyan/form.vue
@@ -247,36 +247,40 @@
methods: {
//鎵爜
toScanCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- // if(this.hform.HBarCode == '*'){
- // this.hform.HBarCode = this.hform.HBarCode + res.result
- // }else{
- // this.hform.HBarCode = res.result
- // }
- this.hform.HBarCode = res.result
- // this.GetMeesageByBillNo(this.hform.HBarCode)
- this.getCode(this.hform.HBarCode)
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ // if(this.hform.HBarCode == '*'){
+ // this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ // }else{
+ // this.hform.HBarCode = ret.resp_result
+ // }
+ this.hform.HBarCode = ret.resp_result
+ // this.GetMeesageByBillNo(this.hform.HBarCode)
+ this.getCode(this.hform.HBarCode)
+ })
},
toScanBillCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- // if(this.hform.HBarCode == '*'){
- // this.hform.HBarCode = this.hform.HBarCode + res.result
- // }else{
- // this.hform.HBarCode = res.result
- // }
-
- this.hform.HBillNo = res.result
- this.GetMeesageByBillNo(this.hform.HBillNo)
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ // if(this.hform.HBarCode == '*'){
+ // this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ // }else{
+ // this.hform.HBarCode = ret.resp_result
+ // }
+
+ this.hform.HBillNo = ret.resp_result
+ this.GetMeesageByBillNo(this.hform.HBillNo)
+ })
},
//鎵弿鍗曟嵁鍙锋潯鐮�
GetMeesageByBillNo(e) {
diff --git a/pages/weiwaigxIn/form.vue b/pages/weiwaigxIn/form.vue
index 79d87d0..f3ea476 100644
--- a/pages/weiwaigxIn/form.vue
+++ b/pages/weiwaigxIn/form.vue
@@ -398,40 +398,81 @@
this.getHProcList()
this.getHSupList()
this.getHEmpList()
+
+ this.getDefValByUser()
},
methods: {
+ //閫氳繃鐧诲綍鐢ㄦ埛鑾峰彇榛樿鍊�
+ getDefValByUser(){
+ uni.request({
+ url: this.serverUrl + '/Cj_StationInBill/GetDefValByUser',
+ type: "GET",
+ async: false,
+ data: { "Czybm": this.userInfo.Czybm, "Czymc": this.userInfo.Czymc },
+ success: (res) => {
+ console.log(res.data)
+ if(res.data.count == 1){
+ var data = res.data.data[0]
+ this.hform.HGroupID = data.HGroupID
+ this.hform.HGroupName = data.鐢熶骇鐝粍鍚嶇О
+ this.hform.HEmpID = data.HEmpID
+ this.hform.HEmpName = data.鎿嶄綔鍛樺悕绉�
+ this.hform.HEmpNumber = data.鎿嶄綔鍛樹唬鐮�
+ this.hform.HSourceID = data.HSourceID
+ this.hform.HSourceName = data.鐢熶骇璧勬簮鍚嶇О
+ this.hform.HCenterID = data.HWorkCenterID
+ this.hform.HCenterName = data.宸ヤ綔涓績鍚嶇О
+ this.hform.HEmpName_second = data.鎿嶄綔鍛樺悕绉�
+ }else{
+ uni.showToast({
+ title:'鑾峰彇鐢熶骇鐝粍淇℃伅澶辫触',
+ icon:'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title:'鑾峰彇鐢熶骇鐝粍淇℃伅澶辫触',
+ icon:'none'
+ })
+ },
+ });
+ },
//鎵爜
toScanCode(){
- // this.hform.HBarCode = 'OP000021_01'
- // this.getHBarCodeData('OP000021_01')
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- var str = res.result
- if(str.includes('@')) {
- const parts = str.split('@');
- this.hform.HBarCode = parts[0]
- this.hform.HProcNo = parts[1]
- this.getHBarCodeData(parts[0])
- // this.getHProcNoData(parts[0],parts[1])
- }else{
- this.hform.HBarCode = res.result
- this.getHBarCodeData(res.result)
- }
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ var str = ret.resp_result
+ if(str.includes('@')) {
+ const parts = str.split('@');
+ this.hform.HBarCode = parts[0]
+ this.hform.HProcNo = parts[1]
+ this.getHBarCodeData(parts[0],1)
+ // this.getHProcNoData(parts[0],parts[1])
+ }else{
+ this.hform.HBarCode = ret.resp_result
+ this.getHBarCodeData(ret.resp_result)
+ }
+ })
},
//鎵祦姘村彿
toScanProcNo(){
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- this.hform.HProcNo = res.result
- this.getHProcNoData(this.hform.HBarCode,res.result)
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ this.hform.HProcNo = ret.resp_result
+ this.getHProcNoData(this.hform.HBarCode,ret.resp_result)
+ })
},
//鏃ユ湡
HDateChange(e){
@@ -632,7 +673,7 @@
if(res.data.code == 1){
var data = res.data.data[0]
this.getHBarCodeData(data.HBarCode)
- // this.getHProcNoData(data.HBarCode,data.HProcNo)
+ this.getHProcNoData(data.HBarCode,data.HProcNo)
this.hform.HInterID= data.HInterID
this.hform.HBillNo= data.HBillNo
@@ -694,7 +735,7 @@
},
});
},
- getHBarCodeData(HBarCode){
+ getHBarCodeData(HBarCode,e){
uni.request({
url: this.serverUrl + '/Cj_StationEntrustInBill/txtHBarCode_KeyDown',
data: {HBarCode: HBarCode},
@@ -729,6 +770,10 @@
this.hform.HDept= this.userInfo.HDept
this.hform.HProcExchHinteID= data.hmainid
this.hform.HPRDOrg= data.缁勭粐
+
+ if(e){
+ this.getHProcNoData(this.hform.HBarCode,this.hform.HProcNo)
+ }
}else{
uni.showToast({
title:res.data.Message,
@@ -875,7 +920,12 @@
}
});
}
- }
+ }else{
+ uni.showToast({
+ title:res.data.Message,
+ icon:'none'
+ })
+ }
},
fail: (res) => {
console.log(res);
diff --git a/pages/weiwaigxOut/firstCheck.vue b/pages/weiwaigxOut/firstCheck.vue
index aa227e4..38fcc57 100644
--- a/pages/weiwaigxOut/firstCheck.vue
+++ b/pages/weiwaigxOut/firstCheck.vue
@@ -364,36 +364,38 @@
methods: {
//鎵爜
toScanCode(){
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- this.hform.HBarCode = res.result
- // uni.request({
- // url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo',
- // data: { HBarCode: res.result },
- // success: (res) => {
- // console.log(res.data);
- // var data = res.data.list[0][0]
- // if(res.data.count == 1){
- // this.hform.HEquipID = data.hmainid
- // this.hform.HEquipName = data.璁惧鍚嶇О
- // }
- // uni.showToast({
- // title:res.data.Message,
- // icon:'none'
- // })
- // },
- // fail: (res) => {
- // console.log(res);
- // uni.showToast({
- // title:'鎺ュ彛璇锋眰澶辫触',
- // icon:'none'
- // })
- // },
- // });
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ this.hform.HBarCode = ret.resp_result
+ // uni.request({
+ // url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo',
+ // data: { HBarCode: ret.resp_result },
+ // success: (res) => {
+ // console.log(res.data);
+ // var data = res.data.list[0][0]
+ // if(res.data.count == 1){
+ // this.hform.HEquipID = data.hmainid
+ // this.hform.HEquipName = data.璁惧鍚嶇О
+ // }
+ // uni.showToast({
+ // title:res.data.Message,
+ // icon:'none'
+ // })
+ // },
+ // fail: (res) => {
+ // console.log(res);
+ // uni.showToast({
+ // title:'鎺ュ彛璇锋眰澶辫触',
+ // icon:'none'
+ // })
+ // },
+ // });
+ })
},
// upCode(){
// uni.request({
diff --git a/pages/weiwaigxOut/form.vue b/pages/weiwaigxOut/form.vue
index 96a808d..d507b24 100644
--- a/pages/weiwaigxOut/form.vue
+++ b/pages/weiwaigxOut/form.vue
@@ -359,10 +359,10 @@
HBillNo:'',
HBarCode:'',
HQty:'',
- HPieceQty:'',
- HWasterQty:'',
+ HPieceQty:0,
+ HWasterQty:0,
HEmpName:'',
- HEmpID:'',
+ HEmpID:0,
HInnerBillNo:'',
HWWWorkOrderBillNo:'',
HRemark:'',
@@ -372,7 +372,7 @@
HProcExchBillNo:'',
HMaterNumber:'',
HMaterName:'',
- HMaterID:'',
+ HMaterID:0,
HMaterModel:'',
HSupName:'',
HSupID:'',
@@ -447,31 +447,81 @@
this.getHProcList()
this.getHSupList()
this.getHEmpList()
+
+ this.getDefValByUser()
},
methods: {
+ //閫氳繃鐧诲綍鐢ㄦ埛鑾峰彇榛樿鍊�
+ getDefValByUser(){
+ uni.request({
+ url: this.serverUrl + '/Cj_StationInBill/GetDefValByUser',
+ type: "GET",
+ async: false,
+ data: { "Czybm": this.userInfo.Czybm, "Czymc": this.userInfo.Czymc },
+ success: (res) => {
+ console.log(res.data)
+ if(res.data.count == 1){
+ var data = res.data.data[0]
+ this.hform.HGroupID = data.HGroupID
+ this.hform.HGroupName = data.鐢熶骇鐝粍鍚嶇О
+ this.hform.HEmpID = data.HEmpID
+ this.hform.HEmpName = data.鎿嶄綔鍛樺悕绉�
+ this.hform.HEmpNumber = data.鎿嶄綔鍛樹唬鐮�
+ this.hform.HSourceID = data.HSourceID
+ this.hform.HSourceName = data.鐢熶骇璧勬簮鍚嶇О
+ this.hform.HCenterID = data.HWorkCenterID
+ this.hform.HCenterName = data.宸ヤ綔涓績鍚嶇О
+ this.hform.HEmpName_second = data.鎿嶄綔鍛樺悕绉�
+ }else{
+ uni.showToast({
+ title:'鑾峰彇鐢熶骇鐝粍淇℃伅澶辫触',
+ icon:'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title:'鑾峰彇鐢熶骇鐝粍淇℃伅澶辫触',
+ icon:'none'
+ })
+ },
+ });
+ },
//鎵爜
toScanCode(){
- this.hform.HBarCode = 'OP000021_01'
- this.getHBarCodeData('OP000021_01')
- // uni.scanCode({
- // onlyFromCamera: true,
- // success: (res) => {
- // console.log('鏉$爜鍐呭锛�' + res.result);
- // this.hform.HBarCode = res.result
- // this.getHBarCodeData(res.result)
- // }
- // });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ var str = ret.resp_result
+ if(str.includes('@')) {
+ const parts = str.split('@');
+ this.hform.HBarCode = parts[0]
+ this.hform.HProcNo = parts[1]
+ this.getHBarCodeData(parts[0],1)
+ // this.getHProcNoData(parts[0],parts[1])
+ }else{
+ this.hform.HBarCode = ret.resp_result
+ this.getHBarCodeData(ret.resp_result)
+ }
+ })
},
//鎵祦姘村彿
toScanProcNo(){
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- this.hform.HProcNo = res.result
- this.getHProcNoData(this.hform.HBarCode,res.result)
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ this.hform.HProcNo = ret.resp_result
+ this.getHProcNoData(this.hform.HBarCode,ret.resp_result)
+ })
},
//鏃ユ湡
HDateChange(e){
@@ -771,7 +821,7 @@
},
});
},
- getHBarCodeData(HBarCode){
+ getHBarCodeData(HBarCode,e){
uni.request({
url: this.serverUrl + '/Cj_StationEntrustInBill/txtHBarCode_KeyDown',
data: {HBarCode: HBarCode},
@@ -807,6 +857,9 @@
this.hform.HProcExchHinteID= data.hmainid
this.hform.HPRDOrg= data.缁勭粐
+ if(e){
+ this.getHProcNoData(this.hform.HBarCode,this.hform.HProcNo)
+ }
}else{
uni.showToast({
title:res.data.Message,
@@ -947,7 +1000,12 @@
}
});
}
- }
+ }else{
+ uni.showToast({
+ title:res.data.Message,
+ icon:'none'
+ })
+ }
},
fail: (res) => {
console.log(res);
diff --git a/pages/weiwailingliao/form.vue b/pages/weiwailingliao/form.vue
index 8db924e..ffa1ad2 100644
--- a/pages/weiwailingliao/form.vue
+++ b/pages/weiwailingliao/form.vue
@@ -408,19 +408,21 @@
},
//鎵爜
toScanCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- if (this.hform.HBarCode == '*') {
- this.hform.HBarCode = this.hform.HBarCode + res.result
- } else {
- this.hform.HBarCode = res.result
- }
-
- this.getCode(this.hform.HBarCode)
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ if (this.hform.HBarCode == '*') {
+ this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ } else {
+ this.hform.HBarCode = ret.resp_result
}
- });
+
+ this.getCode(this.hform.HBarCode)
+ })
},
showBillList() {
this.$refs.billList.showPopup()
diff --git a/pages/weiwailingliaojiaoyan/form.vue b/pages/weiwailingliaojiaoyan/form.vue
index 4e813d1..359b5a1 100644
--- a/pages/weiwailingliaojiaoyan/form.vue
+++ b/pages/weiwailingliaojiaoyan/form.vue
@@ -258,36 +258,40 @@
methods: {
//鎵爜
toScanCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- // if(this.hform.HBarCode == '*'){
- // this.hform.HBarCode = this.hform.HBarCode + res.result
- // }else{
- // this.hform.HBarCode = res.result
- // }
- this.hform.HBarCode = res.result
- // this.GetMeesageByBillNo(this.hform.HBarCode)
- this.getCode(this.hform.HBarCode)
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ // if(this.hform.HBarCode == '*'){
+ // this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ // }else{
+ // this.hform.HBarCode = ret.resp_result
+ // }
+ this.hform.HBarCode = ret.resp_result
+ // this.GetMeesageByBillNo(this.hform.HBarCode)
+ this.getCode(this.hform.HBarCode)
+ })
},
toScanBillCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- // if(this.hform.HBarCode == '*'){
- // this.hform.HBarCode = this.hform.HBarCode + res.result
- // }else{
- // this.hform.HBarCode = res.result
- // }
-
- this.hform.HBillNo = res.result
- this.GetMeesageByBillNo(this.hform.HBillNo)
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ // if(this.hform.HBarCode == '*'){
+ // this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ // }else{
+ // this.hform.HBarCode = ret.resp_result
+ // }
+
+ this.hform.HBillNo = ret.resp_result
+ this.GetMeesageByBillNo(this.hform.HBillNo)
+ })
},
//鎵弿鍗曟嵁鍙锋潯鐮�
GetMeesageByBillNo(e) {
diff --git a/pages/wuliaosaoma/wuliaosaoma.vue b/pages/wuliaosaoma/wuliaosaoma.vue
index 60c6b6f..3cb1e8f 100644
--- a/pages/wuliaosaoma/wuliaosaoma.vue
+++ b/pages/wuliaosaoma/wuliaosaoma.vue
@@ -54,50 +54,53 @@
},
methods: {
toScanCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- if (this.CommonUtils.isEmpty(res.result) === false) {
- console.log('鏉$爜鍐呭锛�' + res.result);
- this.HBillNo = res.result
- CommonUtils.doRequest(
- "/Cg_POInStockBill/page", {
- sWhere: ` and 鍗曟嵁鍙�='${res.result}'`,
- user: this.userInfo.HEmpName,
- page: this.pageInfo.page,
- size: this.pageInfo.size
- },
- function(res) {
- console.log(res)
- let res1 = res.data
-
- let {
- count,
- data
- } = res1;
- if (count > 0) {
- console.log(data)
- // this.HMaterList = data.reduce((acc, obj) => {
- // acc.push({
- // "HMaterID": obj['HMaterID'],
- // "HMaterNo": obj['鐗╂枡浠g爜'],
- // "HMaterName": obj['鐗╂枡鍚嶇О'],
- // "HMaterType": obj['瑙勬牸鍨嬪彿'],
- // "HQty": obj['鏁伴噺'],
- // "HBarCode": "",
- // "HBillNo": obj['鍗曟嵁鍙�']
- // })
- // }, [])
-
- }
- },
- function(err) {
- console.error(err)
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ if (this.CommonUtils.isEmpty(ret.resp_result) === false) {
+ console.log('鏉$爜鍐呭锛�' + ret.resp_result);
+ this.HBillNo = ret.resp_result
+ CommonUtils.doRequest(
+ "/Cg_POInStockBill/page", {
+ sWhere: ` and 鍗曟嵁鍙�='${ret.resp_result}'`,
+ user: this.userInfo.HEmpName,
+ page: this.pageInfo.page,
+ size: this.pageInfo.size
+ },
+ function(res) {
+ console.log(res)
+ let res1 = res.data
+
+ let {
+ count,
+ data
+ } = res1;
+ if (count > 0) {
+ console.log(data)
+ // this.HMaterList = data.reduce((acc, obj) => {
+ // acc.push({
+ // "HMaterID": obj['HMaterID'],
+ // "HMaterNo": obj['鐗╂枡浠g爜'],
+ // "HMaterName": obj['鐗╂枡鍚嶇О'],
+ // "HMaterType": obj['瑙勬牸鍨嬪彿'],
+ // "HQty": obj['鏁伴噺'],
+ // "HBarCode": "",
+ // "HBillNo": obj['鍗曟嵁鍙�']
+ // })
+ // }, [])
+
}
- )
- }
+ },
+ function(err) {
+ console.error(err)
+ }
+ )
}
- });
+ })
},
},
onload() {
diff --git a/pages/xiaoshouchuku/form.vue b/pages/xiaoshouchuku/form.vue
index ac95dca..ba69c21 100644
--- a/pages/xiaoshouchuku/form.vue
+++ b/pages/xiaoshouchuku/form.vue
@@ -385,19 +385,21 @@
},
//鎵爜
toScanCode(){
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- if(this.hform.HBarCode == '*'){
- this.hform.HBarCode = this.hform.HBarCode + res.result
- }else{
- this.hform.HBarCode = res.result
- }
-
- this.getCode(this.hform.HBarCode)
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ if(this.hform.HBarCode == '*'){
+ this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ }else{
+ this.hform.HBarCode = ret.resp_result
+ }
+
+ this.getCode(this.hform.HBarCode)
+ })
},
//鎵叾浠�(浠撳簱锛屼粨浣�)
// toScanData(e){
diff --git a/pages/xiaoshouchukujiaoyan/form.vue b/pages/xiaoshouchukujiaoyan/form.vue
index 85b0f57..65d6ccf 100644
--- a/pages/xiaoshouchukujiaoyan/form.vue
+++ b/pages/xiaoshouchukujiaoyan/form.vue
@@ -257,36 +257,40 @@
methods: {
//鎵爜
toScanCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- // if(this.hform.HBarCode == '*'){
- // this.hform.HBarCode = this.hform.HBarCode + res.result
- // }else{
- // this.hform.HBarCode = res.result
- // }
- this.hform.HBarCode = res.result
- // this.GetMeesageByBillNo(this.hform.HBarCode)
- this.getCode(this.hform.HBarCode)
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ // if(this.hform.HBarCode == '*'){
+ // this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ // }else{
+ // this.hform.HBarCode = ret.resp_result
+ // }
+ this.hform.HBarCode = ret.resp_result
+ // this.GetMeesageByBillNo(this.hform.HBarCode)
+ this.getCode(this.hform.HBarCode)
+ })
},
toScanBillCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- // if(this.hform.HBarCode == '*'){
- // this.hform.HBarCode = this.hform.HBarCode + res.result
- // }else{
- // this.hform.HBarCode = res.result
- // }
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ // if(this.hform.HBarCode == '*'){
+ // this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ // }else{
+ // this.hform.HBarCode = ret.resp_result
+ // }
- this.hform.HBillNo = res.result
- this.GetMeesageByBillNo(this.hform.HBillNo)
- }
- });
+ this.hform.HBillNo = ret.resp_result
+ this.GetMeesageByBillNo(this.hform.HBillNo)
+ })
},
//鎵弿鍗曟嵁鍙锋潯鐮�
GetMeesageByBillNo(e) {
diff --git a/pages/xiaoshoutuihuo/form.vue b/pages/xiaoshoutuihuo/form.vue
index e212a84..eb9bbcb 100644
--- a/pages/xiaoshoutuihuo/form.vue
+++ b/pages/xiaoshoutuihuo/form.vue
@@ -336,29 +336,33 @@
},
//鎵爜
toScanCode(){
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- if(this.hform.HBarCode == '*'){
- this.hform.HBarCode = this.hform.HBarCode + res.result
- }else{
- this.hform.HBarCode = res.result
- }
-
- this.getCode(this.hform.HBarCode)
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ if(this.hform.HBarCode == '*'){
+ this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ }else{
+ this.hform.HBarCode = ret.resp_result
+ }
+
+ this.getCode(this.hform.HBarCode)
+ })
},
toScanCodeA(){
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- this.hform.HSourceBillNo = res.result
- this.getHBarCodeData(res.result)
- }
- });
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ this.hform.HSourceBillNo = ret.resp_result
+ this.getHBarCodeData(ret.resp_result)
+ })
},
//鏃ユ湡
HDateChange(e){
diff --git a/plugins/BluetoothTool.js b/plugins/BluetoothTool.js
index 6ba8f37..d376add 100644
--- a/plugins/BluetoothTool.js
+++ b/plugins/BluetoothTool.js
@@ -181,17 +181,15 @@
//6.0浠ュ悗鐨勫鏋滈渶瑕佸埄鐢ㄦ湰鏈烘煡鎵惧懆鍥寸殑wifi鍜岃摑鐗欒澶�, 鐢宠鏉冮檺
if(Build.VERSION.SDK_INT >= 6.0){
- console.log('Build.VERSION.SDK_INT: ',Build.VERSION.SDK_INT);
+
}
let options = this.options
-
btFindReceiver = plus.android.implements("io.dcloud.android.content.BroadcastReceiver", {
"onReceive": function(context, intent) {
plus.android.importClass(context);
plus.android.importClass(intent);
let action = intent.getAction();
-
- console.log(BluetoothDevice)
+
if(BluetoothDevice.ACTION_FOUND == action) { // 鎵惧埌璁惧
let device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
let newDevice = {
@@ -206,7 +204,6 @@
}
}
});
-
let filter = new IntentFilter();
filter.addAction(BluetoothDevice.ACTION_FOUND);
filter.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);
--
Gitblit v1.9.1