From 0df15ed47f6e2aa5eb0610890bed7dcbaabc7c92 Mon Sep 17 00:00:00 2001 From: cuiqian2004 <cuiqian2004@163.com> Date: 星期四, 11 七月 2024 17:32:07 +0800 Subject: [PATCH] test --- pages/modal/3018_2.vue | 101 ++++++++++++++++++++++++++++++++------------------ 1 files changed, 65 insertions(+), 36 deletions(-) diff --git a/pages/modal/3018_2.vue b/pages/modal/3018_2.vue index 73b45c7..674429b 100644 --- a/pages/modal/3018_2.vue +++ b/pages/modal/3018_2.vue @@ -203,14 +203,15 @@ const items = $this.head_styledef.form.items || [] for (let i in items) { const ele = items[i] - if (ele.name == 'Input' || ele.name == 'InputNumber'|| ele.name == 'Textarea') { + if (ele.name == 'Input' || ele.name == 'InputNumber' || ele.name == 'Textarea') { if ($this.focusFieldId == ele.fieldId) { $this.onScanValue(ele, res.result) break; } } else if (ele.name == "Layot") { let curIndex = (ele.setting.colList || []).findIndex((col, index2, arr) => { - return (col.name == 'Input' || col.name == 'InputNumber'|| col.name == 'Textarea') && $this + return (col.name == 'Input' || col.name == 'InputNumber' || col + .name == 'Textarea') && $this .focusFieldId == col.fieldId; }) if (curIndex > -1) { @@ -288,7 +289,8 @@ await this.DictGetInfo(ele.bind.dict, index, 'mast'); } if ($this.focusFieldId == "") { - if (ele.name == 'Input' || ele.name == 'InputNumber'|| ele.name == 'Textarea') { + if (ele.name == 'Input' || ele.name == 'InputNumber' || ele.name == + 'Textarea') { $this.setData({ focusFieldId: ele.fieldId }) @@ -401,12 +403,18 @@ var tip = data.err_info ? typeof data.err_info == 'string' ? data .err_info : data .err_info.join('<br/>') : ''; - if (data.ret == 801) uni.showModal({ - title: this.translateSys("tip"), - content: tip, - showCancel: false, - confirmText: this.translateSys("cancel") - }); + if (data.ret == 801) { + if (this.param.Only_Script_Error) { + let pos = tip.indexOf("锛�); + if (pos > -1) tip = tip.substring(pos + 1); + } + uni.showModal({ + title: this.translateSys("tip"), + content: tip, + showCancel: false, + confirmText: this.translateSys("cancel") + }); + } else uni.showModal({ title: this.translateSys("tip"), content: tip + ',' + this.translateSys('tip') + ':' + data.ret, @@ -678,7 +686,7 @@ const ele = items[i] if (ele.name != "Layout") { - if (ele.name == 'Input' || ele.name == 'InputNumber'|| ele.name == 'Textarea') { + if (ele.name == 'Input' || ele.name == 'InputNumber' || ele.name == 'Textarea') { if (attr == ele.fieldId) { findd = true } else { @@ -695,7 +703,8 @@ } else { if (findd) { let curIndex = ele.setting.colList.findIndex((col, index2, arr) => { - return (col.name == 'Input' || col.name == 'InputNumber'|| col.name == 'Textarea'); + return (col.name == 'Input' || col.name == 'InputNumber' || col.name == + 'Textarea'); }) if (curIndex > -1) { $this.setData({ @@ -713,7 +722,7 @@ findd = true let curIndex2 = ele.setting.colList.findIndex((col, index2, arr) => { return (col.name == 'Input' || col.name == - 'InputNumber'|| col.name == 'Textarea') && + 'InputNumber' || col.name == 'Textarea') && index2 > curIndex; }) @@ -1004,12 +1013,18 @@ var tip = data.err_info ? typeof data.err_info == 'string' ? data.err_info : data .err_info.join('<br/>') : ''; - if (data.ret == 801) uni.showModal({ - title: this.translateSys("tip"), - content: tip, - showCancel: false, - confirmText: this.translateSys("cancel") - }); + if (data.ret == 801) { + if (this.param.Only_Script_Error) { + let pos = tip.indexOf("锛�); + if (pos > -1) tip = tip.substring(pos + 1); + } + uni.showModal({ + title: this.translateSys("tip"), + content: tip, + showCancel: false, + confirmText: this.translateSys("cancel") + }); + } else uni.showModal({ title: this.translateSys("tip"), content: tip + ',' + this.translateSys('tip') + ':' + data.ret, @@ -1335,12 +1350,18 @@ var tip = data.err_info ? typeof data.err_info == 'string' ? data.err_info : data .err_info.join('<br/>') : ''; - if (data.ret == 801) uni.showModal({ - title: this.translateSys("tip"), - content: tip, - showCancel: false, - confirmText: this.translateSys("cancel") - }); + if (data.ret == 801){ + if (this.param.Only_Script_Error) { + let pos = tip.indexOf("锛�); + if (pos > -1) tip = tip.substring(pos + 1); + } + uni.showModal({ + title: this.translateSys("tip"), + content: tip, + showCancel: false, + confirmText: this.translateSys("cancel") + }); + } else uni.showModal({ title: this.translateSys("tip"), content: tip + ',' + this.translateSys('tip') + ':' + data.ret, @@ -1656,11 +1677,14 @@ icon: "success", duration: 3000 }); - //鍒锋柊 - uni.redirectTo({ - url: '../modal/3018_2?param=' + JSON.stringify(this.$data.param) + - "&titlename=" + this.$data.title - }); + if (this.$data.param.After_Btn_Refresh) { + //鍒锋柊 + uni.redirectTo({ + url: '../modal/3018_2?param=' + JSON.stringify(this.$data.param) + + "&titlename=" + this.$data.title + }); + } + // this.class_attr_init(); } else { uni.showModal({ @@ -1719,13 +1743,18 @@ var tip = data.err_info ? typeof data.err_info == 'string' ? data.err_info : data .err_info.join('<br/>') : ''; - if (data.ret == 801) uni.showModal({ - title: this.translateSys("tip"), - content: tip, - showCancel: false, - confirmText: this.translateSys("cancel") - }); - else uni.showModal({ + if (data.ret == 801) { + if (this.param.Only_Script_Error) { + let pos = tip.indexOf("锛�); + if (pos > -1) tip = tip.substring(pos + 1); + } + uni.showModal({ + title: this.translateSys("tip"), + content: tip, + showCancel: false, + confirmText: this.translateSys("cancel") + }); + } else uni.showModal({ title: this.translateSys("tip"), content: tip + ',' + this.translateSys('tip') + ':' + data.ret, showCancel: false, -- Gitblit v1.9.1