| | |
| | | $this.onScanValue(ele, res.result) |
| | | break; |
| | | } |
| | | } else if (ele.name == "Layot") { |
| | | } else if (ele.name == "Layout") { |
| | | let curIndex = (ele.setting.colList || []).findIndex((col, index2, |
| | | arr) => { |
| | | return (col.name == 'Input' || col.name == 'InputNumber' || col |
| | |
| | | formItem.dict = list; |
| | | } catch (ex) { |
| | | // console.log(ex); |
| | | let exStr = JSON.stringify(ex) |
| | | if (exStr == "{}") |
| | | exStr = ex |
| | | let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr |
| | | |
| | | uni.showModal({ |
| | | title: this.translateSys("error") + "1.3", |
| | | content: ex.errMsg, |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: this.translateSys("cancel") |
| | | }); |
| | | |
| | | |
| | | } |
| | | }, |
| | | |
| | |
| | | if (action.action_type == 'set_dlg_attr') { |
| | | var result = action.value; |
| | | $this.setFormValues(result) |
| | | } else if (data.action[i].action_type == 'set_dlg_attr_show') { |
| | | } else if (action.action_type == 'set_dlg_attr_show') { |
| | | var result = action.value; |
| | | $this.hideFormItems(result) |
| | | |
| | | // console.log($this.$data.head_styledef); |
| | | } else if (action.action_type == |
| | | "set_dlg_current_edit_attr" |
| | | ) { |
| | | if ($this |
| | | .focusOldFieldId == |
| | | action.value) { |
| | | $this.setData({ |
| | | focusFieldId: "" |
| | | }) |
| | | } else { |
| | | $this.setData({ |
| | | focusFieldId: $this |
| | | .focusOldFieldId |
| | | }) |
| | | } |
| | | $this.$nextTick(() => { |
| | | $this.setData({ |
| | | focusFieldId: action |
| | | .value |
| | | }) |
| | | }); |
| | | } else { |
| | | uni.showModal({ |
| | | title: this.translateSys("tip"), |
| | |
| | | // console.log($this.$data.head_styledef); |
| | | } else if (action.action_type == 'set_global_attr') { |
| | | $this.$data.global_attr = action.value || []; |
| | | } else if (action.action_type == |
| | | "set_dlg_current_edit_attr" |
| | | ) { |
| | | if ($this |
| | | .focusOldFieldId == |
| | | action.value) { |
| | | $this.setData({ |
| | | focusFieldId: "" |
| | | }) |
| | | } else { |
| | | $this.setData({ |
| | | focusFieldId: $this |
| | | .focusOldFieldId |
| | | }) |
| | | } |
| | | $this.$nextTick(() => { |
| | | $this.setData({ |
| | | focusFieldId: action |
| | | .value |
| | | }) |
| | | }); |
| | | } else { |
| | | uni.showModal({ |
| | | title: this.translateSys("tip"), |
| | |
| | | showCancel: false, |
| | | confirmText: this.translateSys("cancel") |
| | | }); |
| | | else { |
| | | |
| | | uni.showToast({ |
| | | title: this.translate('create_success'), |
| | | icon: "success", |
| | | duration: 3000 |
| | | }); |
| | | uni.showToast({ |
| | | title: this.translate('create_success'), |
| | | icon: "success", |
| | | duration: 3000 |
| | | }); |
| | | } |
| | | |
| | | |
| | | if (!this.$data.param.After_Btn_Not_Refresh) { |
| | | //刷新 |
| | |
| | | var action = actionlist[i]; |
| | | if (action.action_type == 'set_dlg_attr') { |
| | | $this.setFormValues(action.value) |
| | | } else if (data.action[i].action_type == 'set_dlg_attr_show') { |
| | | } else if (action.action_type == 'set_dlg_attr_show') { |
| | | var result = action.value; |
| | | $this.hideFormItems(result) |
| | | } else if (action.action_type == |
| | | "set_dlg_current_edit_attr" |
| | | ) { |
| | | if ($this |
| | | .focusOldFieldId == |
| | | action.value) { |
| | | $this.setData({ |
| | | focusFieldId: "" |
| | | }) |
| | | } else { |
| | | $this.setData({ |
| | | focusFieldId: $this |
| | | .focusOldFieldId |
| | | }) |
| | | } |
| | | $this.$nextTick(() => { |
| | | $this.setData({ |
| | | focusFieldId: action |
| | | .value |
| | | }) |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | // this.class_attr_init(); |
| | | |
| | | this.saving = false |
| | | }).catch(ex => { |
| | | console.log(ex); |
| | | this.saving = false |
| | | |
| | | uni.hideLoading(); |
| | | let exStr = JSON.stringify(ex) |
| | | if (exStr == "{}") |
| | | exStr = ex |
| | | let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr |
| | | uni.showModal({ |
| | | title: this.translateSys("tip"), |
| | | content: ex.errMsg, |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: this.translateSys("cancel") |
| | | }); |
| | |
| | | var action = actionlist[i]; |
| | | if (action.action_type == 'set_dlg_attr') { |
| | | $this.setFormValues(action.value) |
| | | } else if (data.action[i].action_type == 'set_dlg_attr_show') { |
| | | } else if (action.action_type == 'set_dlg_attr_show') { |
| | | var result = action.value; |
| | | $this.hideFormItems(result) |
| | | } else if (action.action_type == |
| | | "set_dlg_current_edit_attr" |
| | | ) { |
| | | if ($this |
| | | .focusOldFieldId == |
| | | action.value) { |
| | | $this.setData({ |
| | | focusFieldId: "" |
| | | }) |
| | | } else { |
| | | $this.setData({ |
| | | focusFieldId: $this |
| | | .focusOldFieldId |
| | | }) |
| | | } |
| | | $this.$nextTick(() => { |
| | | $this.setData({ |
| | | focusFieldId: action |
| | | .value |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | this.saving = false |
| | | let exStr = JSON.stringify(ex) |
| | | if (exStr == "{}") |
| | | exStr = ex |
| | | let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr |
| | | uni.showModal({ |
| | | title: this.translateSys('tip') + "7.1", |
| | | content: ex.errMsg, |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: this.translateSys("cancel") |
| | | }); |
| | |
| | | showCancel: false, |
| | | confirmText: this.translateSys("cancel") |
| | | }); |
| | | if (!this.$data.param.After_Btn_Not_Refresh) { |
| | | //刷新 |
| | | uni.redirectTo({ |
| | | url: '../modal/3018_2?param=' + JSON.stringify(this.$data |
| | | .param) + |
| | | "&titlename=" + this.$data.title |
| | | }); |
| | | } else { |
| | | var actionlist = data.action; |
| | | if (actionlist) { |
| | | console.log(actionlist); |
| | | for (var i = 0; i < actionlist.length; i++) { |
| | | var action = actionlist[i]; |
| | | if (action.action_type == 'set_dlg_attr') { |
| | | $this.setFormValues(action.value) |
| | | } else if (action.action_type == 'set_dlg_attr_show') { |
| | | var result = action.value; |
| | | $this.hideFormItems(result) |
| | | } else if (action.action_type == |
| | | "set_dlg_current_edit_attr" |
| | | ) { |
| | | if ($this |
| | | .focusOldFieldId == |
| | | action.value) { |
| | | $this.setData({ |
| | | focusFieldId: "" |
| | | }) |
| | | } else { |
| | | $this.setData({ |
| | | focusFieldId: $this |
| | | .focusOldFieldId |
| | | }) |
| | | } |
| | | $this.$nextTick(() => { |
| | | $this.setData({ |
| | | focusFieldId: action |
| | | .value |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | var actionlist = data.action; |
| | | if (actionlist) { |
| | | console.log(actionlist); |
| | | for (var i = 0; i < actionlist.length; i++) { |
| | | var action = actionlist[i]; |
| | | if (action.action_type == 'set_dlg_attr') { |
| | | $this.setFormValues(action.value) |
| | | } else if (data.action[i].action_type == 'set_dlg_attr_show') { |
| | | var result = action.value; |
| | | $this.hideFormItems(result) |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | let exStr = JSON.stringify(ex) |
| | | if (exStr == "{}") |
| | | exStr = ex |
| | | let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr |
| | | uni.showModal({ |
| | | title: this.translateSys('tip') + "7.1", |
| | | content: ex.errMsg, |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: this.translateSys("cancel") |
| | | }); |
| | |
| | | const url = '../modal/3018?param=' + JSON.stringify(data) + "&titlename=" + btn.Edit_dlg |
| | | .Name + |
| | | "&type=addDataObj" |
| | | console.log("showAddSmallDialog", url); |
| | | var $this = this; |
| | | uni.navigateTo({ |
| | | url: url, |
| | |
| | | addDataObj: function(resData) { |
| | | console.log(resData); |
| | | //刷新 |
| | | if (!this.$data.param.After_Btn_Not_Refresh) { |
| | | uni.redirectTo({ |
| | | url: '../modal/3018_2?param=' + JSON.stringify(this |
| | | .$data.param) + |
| | | "&titlename=" + this.$data.title |
| | | }); |
| | | } |
| | | uni.redirectTo({ |
| | | url: '../modal/3018_2?param=' + JSON.stringify(this |
| | | .$data.param) + |
| | | "&titlename=" + this.$data.title |
| | | }); |
| | | |
| | | }, |
| | | } |
| | | }); |