| | |
| | | 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) { |
| | |
| | | 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 |
| | | }) |
| | |
| | | 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, |
| | |
| | | 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 { |
| | |
| | | } 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({ |
| | |
| | | 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; |
| | | }) |
| | |
| | | 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, |
| | |
| | | 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, |
| | |
| | | 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({ |
| | |
| | | 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, |