| | |
| | | ClsID: 'CG_Detail', |
| | | param: {}, |
| | | focusFieldId: "", |
| | | focusOldFieldId: "", |
| | | head_styledef: { |
| | | form: { |
| | | items: [] |
| | |
| | | ontap(index,item) { //扫码功能 |
| | | // var $ele = e; |
| | | //console.log(e.target) |
| | | this.focusOldFieldId = item.fieldId |
| | | getApp().onScan((result) => { |
| | | console.log(result.decodedata); |
| | | item.value = result.decodedata; |
| | |
| | | // }) |
| | | // .exec(); |
| | | // } |
| | | console.log(item); |
| | | //console.log(item); |
| | | if (item.oldvalue != item.value) { |
| | | item.oldvalue = item.value; |
| | | var attr = item.fieldId; |
| | |
| | | "set_subtable_page_content") { //已码盘 |
| | | $this.$data.param.Show_Welcom_Page = false; |
| | | var value = item.value; |
| | | if (value.clear == true && $this.$data |
| | | .detail1StyleDefList.length > 0 && value |
| | | .page_name == $this.$data.param.Sub_Page[0].Name |
| | | if (value.clear_confirm != false && value.clear == true |
| | | && $this.$data.detail1StyleDefList.length > 0 |
| | | && value.page_name == $this.$data.param.Sub_Page[0].Name |
| | | ) { //判断是否清空页签内容,正在码盘是否有数据 |
| | | uni.showModal({ |
| | | title: '提示', |
| | |
| | | } |
| | | } |
| | | else if (item.action_type == "set_dlg_current_edit_attr") { |
| | | if($this.focusFieldId == item.value) |
| | | if($this.focusOldFieldId == item.value) |
| | | { |
| | | $this.setData({focusFieldId: ""}) |
| | | } |
| | | else{ |
| | | $this.setData({focusFieldId:$this.focusOldFieldId}) |
| | | } |
| | | $this.$nextTick(()=> { |
| | | $this.setData({focusFieldId:item.value}) |
| | | }); |
| | | } |
| | | else if (item.action_type == "set_dlg_attr") { |
| | | // value = {"attr":"xxx", "value":"xxx"} |
| | |
| | | } |
| | | } |
| | | else if (item.action_type == "set_dlg_current_edit_attr") { |
| | | if($this.focusFieldId == item.value) |
| | | if($this.focusOldFieldId == item.value) |
| | | $this.setData({focusFieldId: ""}) |
| | | else{ |
| | | $this.setData({focusFieldId:$this.focusOldFieldId}) |
| | | } |
| | | $this.$nextTick(()=> { |
| | | $this.setData({focusFieldId:item.value}) |
| | | }); |
| | | } |
| | | }); |
| | | } else { |