| | |
| | | <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;"> |
| | |
| | | }, |
| | | 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); |
| | | var isVal = this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']].Value; |
| | | // if(!isVal){ |
| | | // this.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=result.decodedata; |
| | | // this.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=result; |
| | | // var isVald =this.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value; |
| | | // return; |
| | | // } |
| | | //主数据类扫码查询数据 |
| | | if (isVal != result.decodedata) { |
| | | if (isVal != result) { |
| | | this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']] |
| | | .Value = result.decodedata; |
| | | .Value = result; |
| | | uni.hideKeyboard(); |
| | | //子数据类扫码区事件脚本 |
| | | var eventid = this.param.Scan_Code.Input_Change_Event.ID; |
| | |
| | | mast_attr: req, |
| | | inputParamter: [{ |
| | | attr: 'mast_input_3037', |
| | | value: result.decodedata |
| | | value: result |
| | | }] |
| | | } |
| | | |
| | | this.scan_DataObjRunCustomEvent(info, ""); |
| | | } |
| | | if (result.decodedata) { //第一个输入框不为空 |
| | | if (result) { //第一个输入框不为空 |
| | | //初始化,下个输入框focus属性 |
| | | const attrs = this.classAttrList[e.target.dataset['index']].Attr || [] |
| | | var findd = false |
| | |
| | | subontap(e) { //扫码功能 |
| | | //console.log(e.target) |
| | | getApp().onScan((result) => { |
| | | //console.log(result.decodedata); |
| | | //console.log(result); |
| | | var isVal = this.subClassAttrList[e.target.dataset['index']].Attr[e.target |
| | | .dataset[ |
| | | 'iindex']].Value; |
| | | //主数据类扫码查询数据 |
| | | if (isVal != result.decodedata) { |
| | | if (isVal != result) { |
| | | this.subClassAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']] |
| | | .Value = result.decodedata; |
| | | .Value = result; |
| | | uni.hideKeyboard(); |
| | | //子数据类扫码区事件脚本 |
| | | var eventid = this.param.Scan_Code.Input_Change_Event.ID; |
| | |
| | | mast_attr: [], |
| | | inputParamter: [{ |
| | | attr: 'mast_input_3037', |
| | | value: result.decodedata |
| | | value: result |
| | | }] |
| | | } |
| | | |
| | |
| | | scan_ontap(e) { //扫码区扫码功能 |
| | | //console.log(e.target) |
| | | getApp().onScan((result) => { |
| | | console.log(result.decodedata); |
| | | console.log(result); |
| | | var isflag = true; |
| | | for (var i in this.subPanelList) { |
| | | if (this.subPanelList[i].scanCodeVal == result.decodedata) |
| | | if (this.subPanelList[i].scanCodeVal == result) |
| | | isflag = false; |
| | | } |
| | | //子数据类扫码查询数据 |
| | | if (isflag) { |
| | | uni.hideKeyboard(); |
| | | this.scanCodeVal = result.decodedata; |
| | | this.scanCodeVal = result; |
| | | var eventid = this.param.Scan_Code.Input_Change_Event.ID; |
| | | if (eventid) { |
| | | var mast_req = []; |