| | |
| | | <template> |
| | | <view class="content"> |
| | | <view class="content" :class="largeMode?'large-mode':''"> |
| | | <view class="v-area" v-for="(classattr,index) in classAttrList"> |
| | | <div class="class_attr_title" style="display: none;"> |
| | | <div class="title_line"></div> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | largeMode: getApp().globalData.largeMode || false, |
| | | title: '新增', |
| | | param: {}, |
| | | focusField: "", |
| | |
| | | //console.log(e.target) |
| | | this.focusOldField = `${e.target.dataset['index']}-${e.target.dataset['iindex']}` |
| | | getApp().onScan((result) => { |
| | | //console.log(result.decodedata); |
| | | //console.log(result); |
| | | this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = |
| | | result.decodedata; |
| | | result; |
| | | uni.hideKeyboard(); |
| | | this.onevent($ele, result.decodedata); |
| | | if (result.decodedata) { //第一个输入框不为空 |
| | | this.onevent($ele, result); |
| | | if (result) { //第一个输入框不为空 |
| | | //初始化,下个输入框focus属性 |
| | | const attrs = this.classAttrList[e.target.dataset['index']].Attr || [] |
| | | var findd = false |
| | |
| | | |
| | | |
| | | }, |
| | | onevent(e, decodedata) { |
| | | onevent(e, value) { |
| | | // console.log(e.target); |
| | | var data_attr = this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']]; |
| | | // console.log(decodedata); |
| | | // console.log(value); |
| | | if (e.detail.value != data_attr.Value) { |
| | | this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = |
| | | decodedata ? decodedata : e.detail.value; |
| | | value ? value : e.detail.value; |
| | | var eventid = this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']] |
| | | .action; |
| | | if (eventid) { |