From 07925905f1a596e20e980de6d42db217abb753b0 Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期五, 12 十二月 2025 18:06:11 +0800
Subject: [PATCH] plugin
---
nativeplugins/rfid2/android/honeywell_rfid_sdk.aar | 0
nativeplugins/rfid2/package.json | 36 +++
nativeplugins/honrfid/android/HonRFID-release.aar | 0
pages/modal/5601.vue | 30 +-
nativeplugins/honrfid/package.json | 24 ++
pages/modal/3037_2.vue | 13
pages/modal/3202.vue | 9
nativeplugins/honrfid/android/DataCollection.aar | 0
.hbuilderx/launch.json | 2
pages/login/index.vue | 34 +-
nativeplugins/rfid/package.json | 3
pages/modal/3018_2.vue | 38 ++-
pages/modal/3200_view.vue | 9
pages/modal/5602.vue | 8
App.vue | 101 ++++++---
pages/modal/3202_view.vue | 157 +++++++-------
pages/modal/form/index.vue | 14
js/Page.js | 2
pages/modal/3201.vue | 9
pages/modal/3018.vue | 11
nativeplugins/honrfid/android/honeywell_rfid_sdk.aar | 0
pages/modal/3037.vue | 11
pages/modal/3200.vue | 15
manifest.json | 27 -
nativeplugins/rfid2/android/rfid-release.aar | 0
pages/modal/5600.vue | 10
26 files changed, 340 insertions(+), 223 deletions(-)
diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json
index e804133..48192b1 100644
--- a/.hbuilderx/launch.json
+++ b/.hbuilderx/launch.json
@@ -16,7 +16,7 @@
"type" : "uniCloud"
},
{
- "playground" : "standard",
+ "playground" : "custom",
"type" : "uni-app:app-android"
},
{
diff --git a/App.vue b/App.vue
index 2e4a818..7b95096 100644
--- a/App.vue
+++ b/App.vue
@@ -5,6 +5,7 @@
showError
} from "@/js/Page.js"
const rfidModule = uni.requireNativePlugin('RFIDModule');
+ // const honrfidModule = uni.requireNativePlugin('HonRFIDModule');
var main;
export default {
globalData: {
@@ -39,11 +40,20 @@
this.init();
},
onUnload() {
-
- if (this.deviceInfo?.brand.includes('alps')) { // 姹夊痉闇嶅皵璁惧鐗瑰緛
- // 姹夊痉闇嶅皵 PDA rfid鎵爜椤甸潰鍗歌浇鏃堕噴鏀捐祫婧�- if (rfidModule) {
- rfidModule.closeModule();
+ if (this.deviceInfo) {
+ if (this.deviceInfo?.brand.includes('alps')) { // 姹夊痉闇嶅皵璁惧鐗瑰緛
+ // 姹夊痉闇嶅皵 PDA rfid鎵爜椤甸潰鍗歌浇鏃堕噴鏀捐祫婧�+ if (rfidModule) {
+ rfidModule.closeModule();
+ }
+ } else if (this.deviceInfo?.brand.includes('honeywell') || this.deviceInfo?.deviceBrand.includes(
+ 'honeywell')) {
+ // 闇嶅凹闊﹀皵 PDA rfid鎵爜椤甸潰鍗歌浇鏃堕噴鏀捐祫婧�+ if (rfidModule) {
+ rfidModule.closeModule();
+ }
+ } else {
+ main.unregisterReceiver(receiver); // 鍋滄鐩戝惉骞挎挱
}
} else {
main.unregisterReceiver(receiver); // 鍋滄鐩戝惉骞挎挱
@@ -65,24 +75,42 @@
init() {
let that = this;
+ console.log(this.deviceInfo);
+ if (this.deviceInfo) {
+ if (this.deviceInfo.brand.includes('alps')) { // 姹夊痉闇嶅皵璁惧鐗瑰緛
- if (this.deviceInfo?.brand.includes('alps')) { // 姹夊痉闇嶅皵璁惧鐗瑰緛
+ rfidModule.initModule((res) => {
+ console.log("alps rfid initModule", res)
+ if (res.code < 0) {
+ showInfo(res.msg);
+ }
- rfidModule.initModule((res) => {
- console.log("rfid initModule", res)
- if (res.code < 0) {
- showInfo(res.msg);
- }
+ })
+ } else if (this.deviceInfo.brand.includes('honeywell') || this.deviceInfo.deviceBrand.includes(
+ 'honeywell')) { // 闇嶅凹闊﹀皵
+ console.log("honeywell rfid initModule")
+ rfidModule.initModule("honeywell",(res) => {
+ console.log("rfid initModule", res)
+ if (res.code < 0) {
+ showInfo(res.msg);
+ }
+
+ })
- })
- } else if (this.deviceInfo?.brand.includes('mobiwire') || this.deviceInfo?.deviceBrand.includes(
- 'mobiwire')) { // 闇嶅凹闊﹀皵
+ } else if (this.deviceInfo.brand.includes('mobiwire') || this.deviceInfo.deviceBrand.includes(
+ 'mobiwire')) { // 闇嶅凹闊﹀皵
- this.initMobiwireScan()
+ this.initMobiwireScan()
+ } else {
+
+ console.log(this.initScan);
+ this.initScan()
+ }
} else {
this.initScan()
}
+
},
initMobiwireScan() {
main = plus.android.runtimeMainActivity(); // 鑾峰彇涓�activity
@@ -127,32 +155,39 @@
main.registerReceiver(receiver, filter); //娉ㄥ唽鐩戝惉
},
onScan(callback) {
- if (this.deviceInfo?.brand.includes('alps')) { // 姹夊痉闇嶅皵璁惧鐗瑰緛
- if (!rfidModule)
- return
- rfidModule.startScan((ret) => {
- console.log("startScan", ret)
- let text = ""
- if (ret.code < 0) {
- showInfo(ret.msg);
- } else {
- const data = ret.data || []
- if (Array.isArray(data)) {
- if (data.length > 0)
- text = data[0].epc
+ if (this.deviceInfo) {
+ if (this.deviceInfo?.brand.includes('alps') ||(this.deviceInfo?.brand.includes('honeywell') || this.deviceInfo?.deviceBrand.includes(
+ 'honeywell'))) { // 姹夊痉闇嶅皵璁惧鐗瑰緛
+ if (!rfidModule)
+ return
+ rfidModule.startScan((ret) => {
+ console.log("startScan", ret)
+ let text = ""
+ if (ret.code < 0) {
+ showInfo(ret.msg);
} else {
- text = data.epc || ""
+ const data = ret.data || []
+ if (Array.isArray(data)) {
+ if (data.length > 0)
+ text = data[0].epc
+ } else {
+ text = data.epc || ""
+ }
+ callback(text);
}
- callback(text);
- }
- })
+ })
+ } else {
+ uni.$off("scanresult");
+ uni.$on("scanresult", (result) => {
+ callback(result);
+ });
+ }
} else {
uni.$off("scanresult");
uni.$on("scanresult", (result) => {
callback(result);
});
}
-
},
}
diff --git a/js/Page.js b/js/Page.js
index 04db2e7..11e11d3 100644
--- a/js/Page.js
+++ b/js/Page.js
@@ -95,7 +95,7 @@
exStr = ex
tip = typeof ex.errMsg == "string" ? ex.errMsg :typeof ex.message == "string" ? ex.message: exStr
}
- plus.nativeUI.toast(tip , {verticalAlign:"center",duration:"short"});
+ plus.nativeUI.toast(`<div>${tip}</div>` , {verticalAlign:"center",type:"richtext",duration:"short"});
}
export function showError(ex,title=""){
diff --git a/manifest.json b/manifest.json
index 18df910..00c4f89 100644
--- a/manifest.json
+++ b/manifest.json
@@ -2,8 +2,8 @@
"name" : "MoboxPDA",
"appid" : "__UNI__56D451E",
"description" : "",
- "versionName" : "1.1.75",
- "versionCode" : 1175,
+ "versionName" : "1.1.77",
+ "versionCode" : 1177,
"transformPx" : false,
/* 5+App鐗规湁鐩稿叧 */
"app-plus" : {
@@ -41,7 +41,11 @@
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
- "<uses-permission android:name=\"android.permission.ACCESS_NOTIFICATION_POLICY\"/>"
+ "<uses-permission android:name=\"android.permission.ACCESS_NOTIFICATION_POLICY\"/>",
+ "<uses-permission android:name=\"android.permission.BLUETOOTH\" />",
+ "<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\" />",
+ "<uses-permission android:name=\"android.permission.BLUETOOTH_SCAN\" />",
+ "<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" />"
],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a" ],
"schemes" : "wmspda"
@@ -63,22 +67,7 @@
}
}
},
- "nativePlugins" : {
- "rfid" : {
- "__plugin_info__" : {
- "name" : "rfid",
- "description" : "My rfid Plugin",
- "platforms" : "Android",
- "url" : "",
- "android_package_name" : "",
- "ios_bundle_id" : "",
- "isCloud" : false,
- "bought" : -1,
- "pid" : "",
- "parameters" : {}
- }
- }
- }
+ "nativePlugins" : {}
},
/* 蹇簲鐢ㄧ壒鏈夌浉鍏�*/
"quickapp" : {},
diff --git a/nativeplugins/honrfid/android/DataCollection.aar b/nativeplugins/honrfid/android/DataCollection.aar
new file mode 100644
index 0000000..0cf02d5
--- /dev/null
+++ b/nativeplugins/honrfid/android/DataCollection.aar
Binary files differ
diff --git a/nativeplugins/honrfid/android/HonRFID-release.aar b/nativeplugins/honrfid/android/HonRFID-release.aar
new file mode 100644
index 0000000..4b7e071
--- /dev/null
+++ b/nativeplugins/honrfid/android/HonRFID-release.aar
Binary files differ
diff --git a/nativeplugins/honrfid/android/honeywell_rfid_sdk.aar b/nativeplugins/honrfid/android/honeywell_rfid_sdk.aar
new file mode 100644
index 0000000..60af08d
--- /dev/null
+++ b/nativeplugins/honrfid/android/honeywell_rfid_sdk.aar
Binary files differ
diff --git a/nativeplugins/honrfid/package.json b/nativeplugins/honrfid/package.json
new file mode 100644
index 0000000..dcb93ef
--- /dev/null
+++ b/nativeplugins/honrfid/package.json
@@ -0,0 +1,24 @@
+{
+ "name": "honrfid",
+ "id": "honrfid",
+ "version": "1.0.0",
+ "description": "honeywell rfid Plugin",
+ "_dp_type": "nativeplugin",
+ "_dp_nativeplugin": {
+ "android": {
+ "plugins": [{
+ "type": "module",
+ "name": "RFIDModule",
+ "class": "com.handheld.honrfid.RFIDModule"
+ }],
+ "resources": [
+ "res/raw/barcodebeep",
+ "res/raw/beeps",
+ "res/raw/beeps"
+ ],
+ "integrateType": "aar",
+ "minSdkVersion": 26
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/nativeplugins/rfid/package.json b/nativeplugins/rfid/package.json
index 29f991b..1070a84 100644
--- a/nativeplugins/rfid/package.json
+++ b/nativeplugins/rfid/package.json
@@ -21,4 +21,7 @@
}
}
+}
+
+}
}
\ No newline at end of file
diff --git a/nativeplugins/rfid2/android/honeywell_rfid_sdk.aar b/nativeplugins/rfid2/android/honeywell_rfid_sdk.aar
new file mode 100644
index 0000000..60af08d
--- /dev/null
+++ b/nativeplugins/rfid2/android/honeywell_rfid_sdk.aar
Binary files differ
diff --git a/nativeplugins/rfid2/android/rfid-release.aar b/nativeplugins/rfid2/android/rfid-release.aar
new file mode 100644
index 0000000..7c1c163
--- /dev/null
+++ b/nativeplugins/rfid2/android/rfid-release.aar
Binary files differ
diff --git a/nativeplugins/rfid2/package.json b/nativeplugins/rfid2/package.json
new file mode 100644
index 0000000..a6502a5
--- /dev/null
+++ b/nativeplugins/rfid2/package.json
@@ -0,0 +1,36 @@
+{
+ "name": "rfid",
+ "id": "rfid",
+ "version": "1.0.0",
+ "description": "My rfid Plugin",
+ "_dp_type": "nativeplugin",
+ "_dp_nativeplugin": {
+ "android": {
+ "plugins": [{
+ "type": "module",
+ "name": "RFIDModule",
+ "class": "com.handheld.rfid.RFIDModule"
+ }],
+ "resources": [
+ "res/raw/barcodebeep",
+ "res/raw/beeps",
+ "res/raw/beeps"
+ ],
+ "integrateType": "aar",
+ "minSdkVersion": 26,
+ "gradleOptions": {
+ // 姝g‘璇硶
+ "packagingOptions": "pickFirst 'lib/**/libModuleAPIJni.so'",
+
+ // 鎺掗櫎閲嶅渚濊禆
+ "dependencies": {
+ "exclude": ["com.uhf.api.cls:ModuleAPI_J"]
+ }
+ }
+ }
+
+ }
+}
+
+}
+}
\ No newline at end of file
diff --git a/pages/login/index.vue b/pages/login/index.vue
index 4eae444..a2810b5 100644
--- a/pages/login/index.vue
+++ b/pages/login/index.vue
@@ -6,8 +6,12 @@
<div class="mui-content">
<form id='login-form' class="mui-input-group">
- <a href="javascript:;" class="SetServer" @click="inputDialogToggle">{{translateSys('set')}}</a>
- <a href="javascript:;" class="SetServer" @click="clickSetLanguage">{{translateSys('language')}}</a>
+ <a href="javascript:;" class="set-server" @click="inputDialogToggle">{{translateSys('set')}}</a>
+ <navigator class="set-language" url="./language">
+ <a href="javascript:;">{{translateSys('language')}}</a>
+ </navigator>
+
+
<div class="mui-input-row">
<label class="la_icon">
<image class="logo_input" src="../../images/login/person_30.png"></image>
@@ -161,8 +165,8 @@
try {
if (!this.userServer) {
- showInfo( this.translate('tip_no_web_server'));
-
+ showInfo(this.translate('tip_no_web_server'));
+
return;
}
// var ser = this.userServer.toLowerCase().split('/');
@@ -179,7 +183,7 @@
} catch (ex) {
// console.log(ex);
- showError(ex,this.translateSys("error"));
+ showError(ex, this.translateSys("error"));
}
@@ -244,12 +248,12 @@
//涓嬭浇鎴愬姛,d.filename鏄枃浠跺湪淇濆瓨鍦ㄦ湰鍦扮殑鐩稿璺緞锛屼娇鐢ㄤ笅闈㈢殑API鍙浆涓哄钩鍙扮粷瀵硅矾寰� var fileSaveUrl = plus.io.convertLocalFileSystemURL(d.filename);
plus.runtime.openFile(d.filename); //閫夋嫨杞欢鎵撳紑鏂囦欢
- showInfo( this.translate('update_success'));
+ showInfo(this.translate('update_success'));
_this.$refs.promotion.close();
} else {
//涓嬭浇澶辫触
plus.downloader.clear(); //娓呴櫎涓嬭浇浠诲姟
- showInfo( this.translate('update_fail'));
+ showInfo(this.translate('update_fail'));
_this.showBtns = false;
}
})
@@ -286,11 +290,6 @@
}
}
})
- },
- clickSetLanguage() {
- uni.navigateTo({
- url: './language'
- });
},
dialogInputConfirm(val) {
@@ -399,7 +398,7 @@
} catch (ex) {
hideLoading()
- showError(ex,this.translateSys("error"));
+ showError(ex, this.translateSys("error"));
}
},
@@ -444,8 +443,8 @@
} catch (ex) {
- showError(ex,this.translateSys("error"));
-
+ showError(ex, this.translateSys("error"));
+
this.selectedClasses = ""
this.classesLst = []
// {
@@ -471,7 +470,7 @@
clickSelectClass(item) {
this.selectedClasses = item.text
},
-
+
translate(t) {
if (typeof this.$t == "function") return this.$t(`page.${t}`)
else return t;
@@ -543,7 +542,8 @@
background-repeat: no-repeat !important; */
}
- .SetServer {
+ .set-language,
+ .set-server {
float: left;
margin-left: 20rpx;
}
diff --git a/pages/modal/3018.vue b/pages/modal/3018.vue
index 7cea2aa..09fd2ca 100644
--- a/pages/modal/3018.vue
+++ b/pages/modal/3018.vue
@@ -382,13 +382,16 @@
mounted() {
console.log("3018 mounted");
},
+ onReady() {
+ uni.setNavigationBarTitle({
+ title: this.title
+ }); //璁剧疆椤堕儴鏍囬
+ },
onLoad(options) {
console.log("3018", options);
- uni.setNavigationBarTitle({
- title: options.titlename
- }); //璁剧疆椤堕儴鏍囬
+
var param = JSON.parse(options.param);
- this.title = param.Add_BtnName ? param.Add_BtnName : options.titlename; //璁剧疆鎸夐挳鏂囧瓧
+ this.title = options.titlename; //璁剧疆鎸夐挳鏂囧瓧param.Add_BtnName ? param.Add_BtnName :
if (options.type) {
this.type = options.type;
}
diff --git a/pages/modal/3018_2.vue b/pages/modal/3018_2.vue
index 28d0f61..b4a257d 100644
--- a/pages/modal/3018_2.vue
+++ b/pages/modal/3018_2.vue
@@ -116,7 +116,7 @@
uni.scanCode({
scanType: ["qrCode", 'barCode'],
success: function(res) {
-
+ console.log(res)
if ($this.focusFieldId) {
const items = $this.head_styledef.form.items || []
for (let i in items) {
@@ -177,14 +177,16 @@
this.loadData()
}
},
+ onReady() {
+ uni.setNavigationBarTitle({
+ title: this.title
+ }); //璁剧疆椤堕儴鏍囬
+ },
onLoad(options) {
// console.log(options);
- uni.setNavigationBarTitle({
- title: options.titlename
- }); //璁剧疆椤堕儴鏍囬
+
this.param = JSON.parse(options.param);
- this.title = this.param.Add_BtnName ? this.param.Add_BtnName : options
- .titlename; //璁剧疆鎸夐挳鏂囧瓧
+ this.title = options.titlename; //璁剧疆鎸夐挳鏂囧瓧 this.param.Add_BtnName ? this.param.Add_BtnName :
this.btnName = this.param.Add_BtnName || ""
const paramValue = options.paramValue ? JSON.parse(options.paramValue) : undefined
this.loadData(paramValue)
@@ -521,16 +523,16 @@
})
});
} else {
- showInfo(this.translate(
+ showInfo($this.translate(
'execute_init_event_failed') +
- this.translateSys("full_stop") +
- this.translate('reason') + this
+ $this.translateSys("full_stop") +
+ $this.translate('reason') + $this
.translateSys(
"colon") +
- this.translateSys("quotation_mark_left") +
+ $this.translateSys("quotation_mark_left") +
action
- .action_type + this.translateSys(
- "quotation_mark_right") + this
+ .action_type + $this.translateSys(
+ "quotation_mark_right") + $this
.translate('tip_action_unprocessed'))
}
@@ -563,7 +565,7 @@
},
onScanValue(item, value) {
const $this = this;
- //console.log("onScanValue", item);
+ console.log("onScanValue", value);
item.value = value
let newVal = item.value
if (typeof item.value == "string") {
@@ -720,7 +722,7 @@
}
},
- async onFormEventResult(data, callbackEventId, item) {
+ async onFormEventResult( data, callbackEventId, item,req) {
try {
const $this = this
var enviroment = {
@@ -1071,7 +1073,7 @@
userlogin: '',
clsid: $this.param.DataCls.id,
objid: "",
- attr: $this.popupParam.req,
+ attr: $this.popupParam.req || [],
dataJson: data
}
$this.DataObjRunCustomEvent(info, $this.popupParam.data_attr);
@@ -1112,13 +1114,13 @@
}
}
enviroment = Base64.encode(JSON.stringify(enviroment)); //灏嗗瓧绗︿覆杞崲涓篵ase64缂栫爜
- var input_param = Base64.encode(JSON.stringify(info.attr)); //灏嗗瓧绗︿覆杞崲涓篵ase64缂栫爜
+ var input_param = info.attr ? Base64.encode(JSON.stringify(info.attr)):"" //灏嗗瓧绗︿覆杞崲涓篵ase64缂栫爜
var global_attr = Base64.encode(JSON.stringify(this
.global_attr)); //灏嗗瓧绗︿覆杞崲涓篵ase64缂栫爜
if (info.dataJson)
info.dataJson = Base64.encode(JSON.stringify(info.dataJson)); //灏嗗瓧绗︿覆杞崲涓篵ase64缂栫爜
var obj_attr = {};
- info.attr.forEach(item => {
+ (info.attr || []).forEach(item => {
obj_attr[item.attr] = item.value;
});
if (!info.eventid.includes('{')) info.eventid = '{' + info.eventid + '}';
@@ -1223,7 +1225,7 @@
// return;
runCustomEvent(dataInfo).then(data => {
hideLoading()
- $this.onFormEventResult(data, button_callback, item)
+ $this.onFormEventResult( data, button_callback,item,req)
}).catch(ex => {
// console.log(ex);
diff --git a/pages/modal/3037.vue b/pages/modal/3037.vue
index 900baf4..1a69e07 100644
--- a/pages/modal/3037.vue
+++ b/pages/modal/3037.vue
@@ -703,13 +703,16 @@
check_list: {},
}
},
+ onReady() {
+ uni.setNavigationBarTitle({
+ title: this.title
+ }); //璁剧疆椤堕儴鏍囬
+ },
onLoad(options) {
// console.log(options);
- uni.setNavigationBarTitle({
- title: options.titlename
- }); //璁剧疆椤堕儴鏍囬
+
var param = JSON.parse(options.param);
- this.title = param.Add_BtnName ? param.Add_BtnName : options.titlename; //璁剧疆鎸夐挳鏂囧瓧
+ this.title = options.titlename; //璁剧疆鎸夐挳鏂囧瓧param.Add_BtnName ? param.Add_BtnName :
console.log(param);
if (!param.Master_Cls.View_Style) {
showInfo("璇ュ姛鑳界偣鏈厤缃晫闈㈢獥鍙o紝璇烽噸鏂伴厤缃紒")
diff --git a/pages/modal/3037_2.vue b/pages/modal/3037_2.vue
index a0fee66..66e1f3e 100644
--- a/pages/modal/3037_2.vue
+++ b/pages/modal/3037_2.vue
@@ -173,11 +173,14 @@
saving: false,
};
},
+ onReady() {
+ uni.setNavigationBarTitle({
+ title: this.title
+ }); //璁剧疆椤堕儴鏍囬
+ },
onLoad(options) {
// console.log(options);
- uni.setNavigationBarTitle({
- title: options.titlename
- }); //璁剧疆椤堕儴鏍囬
+
this.title = options.titlename;
this.param = JSON.parse(options.param);
const paramValue = options.paramValue ? JSON.parse(options.paramValue) : undefined
@@ -875,7 +878,7 @@
// return;
runCustomEvent(dataInfo).then(data => {
hideLoading()
- $this.onFormEventResult(data, button_callback, item)
+ $this.onFormEventResult(data, button_callback, item,req)
}).catch(ex => {
// console.log(ex);
@@ -933,7 +936,7 @@
}
},
- async onFormEventResult(data, callbackEventId, item) {
+ async onFormEventResult(data, callbackEventId, item,req) {
try {
const $this = this
var enviroment = {
diff --git a/pages/modal/3200.vue b/pages/modal/3200.vue
index 8132477..90dcd07 100644
--- a/pages/modal/3200.vue
+++ b/pages/modal/3200.vue
@@ -155,13 +155,16 @@
refreshing: false
};
},
+ onReady() {
+ uni.setNavigationBarTitle({
+ title: this.title
+ }); //璁剧疆椤堕儴鏍囬
+ },
async onLoad(options) {
// console.log(options);
try {
showLoading("loading...")
- uni.setNavigationBarTitle({
- title: options.titlename
- }); //璁剧疆椤堕儴鏍囬
+
this.title = options.titlename;
this.param = JSON.parse(options.param);
@@ -1795,17 +1798,17 @@
// });
} else {
- showInfo(this
+ showInfo($this
.translateSys(
"quotation_mark_left"
) +
item
.action_type +
- this
+ $this
.translateSys(
"quotation_mark_right"
) +
- this
+ $this
.translate(
"tip_action_unprocessed"
))
diff --git a/pages/modal/3200_view.vue b/pages/modal/3200_view.vue
index 9e40d67..c12b727 100644
--- a/pages/modal/3200_view.vue
+++ b/pages/modal/3200_view.vue
@@ -98,13 +98,16 @@
},
};
},
+ onReady() {
+ uni.setNavigationBarTitle({
+ title: this.title
+ }); //璁剧疆椤堕儴鏍囬
+ },
async onLoad(options) {
// console.log(options);
try {
showLoading("loading...")
- uni.setNavigationBarTitle({
- title: options.titlename
- }); //璁剧疆椤堕儴鏍囬
+
this.title = options.titlename;
this.param = JSON.parse(options.param);
console.log(this.param);
diff --git a/pages/modal/3201.vue b/pages/modal/3201.vue
index 8930f3e..5bd5da5 100644
--- a/pages/modal/3201.vue
+++ b/pages/modal/3201.vue
@@ -97,12 +97,15 @@
// console.log('鍔ㄧ敾鏀寔瀹屾瘯')
// });
},
+ onReady() {
+ uni.setNavigationBarTitle({
+ title: this.title
+ }); //璁剧疆椤堕儴鏍囬
+ },
async onLoad(options) {
// console.log(options);
this.duration = 2000;
- uni.setNavigationBarTitle({
- title: options.titlename
- }); //璁剧疆椤堕儴鏍囬
+
this.title = options.titlename;
this.param = JSON.parse(options.param);
console.log(this.param);
diff --git a/pages/modal/3202.vue b/pages/modal/3202.vue
index 44ef81f..c12cac2 100644
--- a/pages/modal/3202.vue
+++ b/pages/modal/3202.vue
@@ -117,13 +117,16 @@
},
},
+ onReady() {
+ uni.setNavigationBarTitle({
+ title: this.title
+ }); //璁剧疆椤堕儴鏍囬
+ },
async onLoad(options) {
try {
showLoading("loading...")
// console.log(options);
- uni.setNavigationBarTitle({
- title: options.titlename
- }); //璁剧疆椤堕儴鏍囬
+
this.title = options.titlename;
this.param = JSON.parse(options.param);
const paramValue = options.paramValue ? JSON.parse(options.paramValue) : undefined
diff --git a/pages/modal/3202_view.vue b/pages/modal/3202_view.vue
index 2d21a57..6ffd908 100644
--- a/pages/modal/3202_view.vue
+++ b/pages/modal/3202_view.vue
@@ -117,13 +117,16 @@
onBackPress(e) {
this.beforeNavigateBack()
},
+ onReady() {
+ uni.setNavigationBarTitle({
+ title: this.title
+ }); //璁剧疆椤堕儴鏍囬
+ },
async onLoad(options) {
try {
showLoading("loading...")
console.log(options);
- uni.setNavigationBarTitle({
- title: options.titlename
- }); //璁剧疆椤堕儴鏍囬
+
this.title = options.titlename;
this.param = JSON.parse(options.param);
this.head_styledef = {
@@ -403,86 +406,82 @@
try {
var $this = this;
- runCustomEvent(dataInfo).then(result => {
- console.log(result);
+ const result = await runCustomEvent(dataInfo)
+ console.log(result);
- if (result.ret != 0 && result.ret != 1) {
- let cls_name = result.event_info?.cls_name
- let event_name = result.event_info?.event_name
- tip = result.err_info ? typeof result.err_info == 'string' ? result.err_info :
- result
- .err_info
- .join('\n') : ''
- if (result.ret == 801) {
- if (this.param.Only_Script_Error) {
- let pos = tip.indexOf("锛�);
- if (pos > -1) tip = tip.substring(pos + 1);
- }
+ if (result.ret != 0 && result.ret != 1) {
+ let cls_name = result.event_info?.cls_name
+ let event_name = result.event_info?.event_name
+ tip = result.err_info ? typeof result.err_info == 'string' ? result.err_info :
+ result
+ .err_info
+ .join('\n') : ''
+ if (result.ret == 801) {
+ if (this.param.Only_Script_Error) {
+ let pos = tip.indexOf("锛�);
+ if (pos > -1) tip = tip.substring(pos + 1);
}
- if (cls_name && event_name) tip =
- `鎵ц鈥�{cls_name}鈥濇暟鎹被鐨勨�${event_name}鈥濊剼鏈椂杩斿洖閿欒锛�{tip}`
- if (result.ret == 801) showInfo(tip)
- else showError(`${tip}锛屾彁绀猴細${result.ret}`, this.translateSys('tip'))
- this.saving = false
- return false
- } else {
- var tip = result.info ? typeof result.info == 'string' ? result.info :
- result.info.join('\n') : '';
- tip = tip || result.err_info
- let time = result.info_time || 0
- if (time)
- showError(tip, this.translateSys('tip'))
- else
- showInfo(tip)
- if ([0, 2, 3, 4, -1].includes(result.result_type)) {
- if (result.result_type == 2) {
-
- } else if (typeof result.result == 'string') {
- showInfo(result.result)
-
- }
- try {
- var actionList = result.action || []
- actionList.forEach(item => {
- if (item.action_type == "goback_to_pre_page") { //杩斿洖涓婁竴椤�- var value = item.value;
- uni.navigateBack({
- delta: 1, //杩斿洖灞傛暟锛�鍒欎笂涓婇〉
- });
- } else {
- showInfo(this
- .translateSys(
- "quotation_mark_left"
- ) +
- item
- .action_type +
- this
- .translateSys(
- "quotation_mark_right"
- ) +
- this
- .translate(
- "tip_action_unprocessed"
- ))
-
- }
- });
-
- } catch (ex) {
- let actionList = (result.action || []).map(a => a.action_type).join(';')
- let tip = typeof ex == 'string' ? ex : ex.message
- tip = `鎵ц鑴氭湰杩斿洖鐨�{actionList}鏃跺嚭鐜板紓甯革紝璇锋鏌ヨ剼鏈繑鍥炵殑鏁版嵁鏍煎紡鏄惁姝g‘銆�{tip}`
- showError(tip, this.translateSys('tip'))
- return
- }
- }
-
}
- }).catch(ex => {
- console.log(ex);
- showError(ex, this.translateSys("error") + "9.1")
+ if (cls_name && event_name) tip =
+ `鎵ц鈥�{cls_name}鈥濇暟鎹被鐨勨�${event_name}鈥濊剼鏈椂杩斿洖閿欒锛�{tip}`
+ if (result.ret == 801) showInfo(tip)
+ else showError(`${tip}锛屾彁绀猴細${result.ret}`, this.translateSys('tip'))
+ this.saving = false
+ return false
+ } else {
+ var tip = result.info ? typeof result.info == 'string' ? result.info :
+ result.info.join('\n') : '';
+ tip = tip || result.err_info
+ let time = result.info_time || 0
+ if (time)
+ showError(tip, this.translateSys('tip'))
+ else
+ showInfo(tip)
+ if ([0, 2, 3, 4, -1].includes(result.result_type)) {
+ if (result.result_type == 2) {
- });
+ } else if (typeof result.result == 'string') {
+ showInfo(result.result)
+
+ }
+ try {
+ var actionList = result.action || []
+ actionList.forEach(item => {
+ if (item.action_type == "goback_to_pre_page") { //杩斿洖涓婁竴椤�+ var value = item.value;
+ uni.navigateBack({
+ delta: 1, //杩斿洖灞傛暟锛�鍒欎笂涓婇〉
+ });
+ } else {
+ showInfo(this
+ .translateSys(
+ "quotation_mark_left"
+ ) +
+ item
+ .action_type +
+ this
+ .translateSys(
+ "quotation_mark_right"
+ ) +
+ this
+ .translate(
+ "tip_action_unprocessed"
+ ))
+
+ }
+ });
+
+ } catch (ex) {
+ let actionList = (result.action || []).map(a => a.action_type).join(';')
+ let tip = typeof ex == 'string' ? ex : ex.message
+ tip = `鎵ц鑴氭湰杩斿洖鐨�{actionList}鏃跺嚭鐜板紓甯革紝璇锋鏌ヨ剼鏈繑鍥炵殑鏁版嵁鏍煎紡鏄惁姝g‘銆�{tip}`
+ showError(tip, this.translateSys('tip'))
+ return
+ }
+ }
+
+ }
+
} catch (ex) {
showError(ex, this.translateSys('error') + "9.2")
diff --git a/pages/modal/5600.vue b/pages/modal/5600.vue
index 7002a5c..c392a1c 100644
--- a/pages/modal/5600.vue
+++ b/pages/modal/5600.vue
@@ -248,17 +248,21 @@
popupParam: {},
};
},
+ onReady() {
+ uni.setNavigationBarTitle({
+ title: this.title
+ }); //璁剧疆椤堕儴鏍囬
+ },
onLoad(options) {
// console.log(options);
- uni.setNavigationBarTitle({
- title: options.titlename
- }); //璁剧疆椤堕儴鏍囬
+
this.title = options.titlename;
this.param = JSON.parse(options.param);
// console.log(this.param);
const paramValue = options.paramValue ? JSON.parse(options.paramValue) : undefined
this.loadData(paramValue)
},
+
//椤甸潰鍒濆鍖栬幏鍙栫劍鐐� methods: {
setData: function(obj) {
diff --git a/pages/modal/5601.vue b/pages/modal/5601.vue
index dfa190f..23d4884 100644
--- a/pages/modal/5601.vue
+++ b/pages/modal/5601.vue
@@ -191,10 +191,12 @@
};
},
},
- onLoad(options) {
+ onReady() {
uni.setNavigationBarTitle({
- title: options.titlename
+ title: this.title
}); //璁剧疆椤堕儴鏍囬
+ },
+ onLoad(options) {
this.title = options.titlename;
this.param = JSON.parse(options.param);
//鑾峰彇涓绘暟鎹被ID
@@ -430,24 +432,24 @@
.DefList.length > 0
) { //鍒ゆ柇鏄惁娓呯┖椤电鍐呭,姝e湪鐮佺洏鏄惁鏈夋暟鎹� uni.showModal({
- title: this
+ title: $this
.translateSys(
'tip'),
- content: this
+ content: $this
.translate(
"are_you_sure_clear_first"
) +
- this
+ $this
.translateSys(
"quotation_mark_left"
) +
value
.page_name +
- this
+ $this
.translateSys(
"quotation_mark_right"
) +
- this
+ $this
.translate(
"are_you_sure_clear_last"
),
@@ -2540,14 +2542,14 @@
// return;
runCustomEvent(dataInfo).then(data => {
hideLoading()
- $this.onFormEventResult(data, button_callback, item)
+ $this.onFormEventResult(data, button_callback, item,req)
}).catch(ex => {
hideLoading()
showError(ex, this.translateSys("error") + "5.1")
});
},
- async onFormEventResult(data, callbackEventId, item) {
+ async onFormEventResult(data, callbackEventId, item,req) {
try {
const $this = this
var enviroment = {
@@ -2627,24 +2629,24 @@
.DefList.length > 0
) { //鍒ゆ柇鏄惁娓呯┖椤电鍐呭,姝e湪鐮佺洏鏄惁鏈夋暟鎹� uni.showModal({
- title: this
+ title: $this
.translateSys(
'tip'),
- content: this
+ content: $this
.translate(
"are_you_sure_clear_first"
) +
- this
+ $this
.translateSys(
"quotation_mark_left"
) +
value
.page_name +
- this
+ $this
.translateSys(
"quotation_mark_right"
) +
- this
+ $this
.translate(
"are_you_sure_clear_last"
),
diff --git a/pages/modal/5602.vue b/pages/modal/5602.vue
index 40de5d0..1af3b47 100644
--- a/pages/modal/5602.vue
+++ b/pages/modal/5602.vue
@@ -252,11 +252,13 @@
popupParam: {},
};
},
+ onReady() {
+ uni.setNavigationBarTitle({
+ title: this.title
+ }); //璁剧疆椤堕儴鏍囬
+ },
onLoad(options) {
// console.log(options);
- uni.setNavigationBarTitle({
- title: options.titlename
- }); //璁剧疆椤堕儴鏍囬
this.title = options.titlename;
this.param = JSON.parse(options.param);
// console.log(this.param);
diff --git a/pages/modal/form/index.vue b/pages/modal/form/index.vue
index 4fa48e1..4214186 100644
--- a/pages/modal/form/index.vue
+++ b/pages/modal/form/index.vue
@@ -133,6 +133,11 @@
};
},
},
+ onReady() {
+ uni.setNavigationBarTitle({
+ title: this.title
+ }); //璁剧疆椤堕儴鏍囬
+ },
onLoad(options) {
this.param = JSON.parse(options.param);
@@ -153,11 +158,6 @@
if (options.dataJson)
this.data_json = JSON.parse(options.dataJson);
this.title = options.titlename ? options.titlename : this.param.ShowName; //璁剧疆鎸夐挳鏂囧瓧
- // console.log(options)
- uni.setNavigationBarTitle({
- title: this.title
- }); //璁剧疆椤堕儴鏍囬
-
if (this.clsId) {
this.loadData(objAttr)
} else {
@@ -717,7 +717,7 @@
showError(ex, this.translateSys('tip') + "4.2")
}
},
- async onFormEventResult(data, button_callback, item) {
+ async onFormEventResult(data, button_callback, item,req) {
try {
const $this = this
var enviroment = {
@@ -1262,7 +1262,7 @@
console.log(dataInfo);
// return;
runCustomEvent(dataInfo).then(data => {
- $this.onFormEventResult(data, button_callback, item)
+ $this.onFormEventResult(data, button_callback, item,req)
}).catch(ex => {
showError(ex, this.translateSys('tip') + "5.1")
--
Gitblit v1.9.1