From 07925905f1a596e20e980de6d42db217abb753b0 Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期五, 12 十二月 2025 18:06:11 +0800
Subject: [PATCH] plugin
---
pages/modal/3018_2.vue | 38 ++++++++++++++++++++------------------
1 files changed, 20 insertions(+), 18 deletions(-)
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);
--
Gitblit v1.9.1