| | |
| | | getApp().onScan((result)=>{ |
| | | //console.log(result.decodedata); |
| | | var isVal =this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value; |
| | | |
| | | //主数据类扫码查询数据 |
| | | if (isVal!=result.decodedata) { |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=result.decodedata; |
| | | |
| | | //子数据类扫码区事件脚本 |
| | | var eventid = this.$data.param.Scan_Code.Input_Change_Event.ID; |
| | | if (eventid) { |
| | | var req=[]; |
| | | var attrlist = this.$data.classAttrList; |
| | | var attrlist = this.$data.classAttrList; //主数据类属性 |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | | var attr = attrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | |
| | | if(this.$data.subPanelList[i].scanCodeVal == result.decodedata) |
| | | isflag=false; |
| | | } |
| | | |
| | | //子数据类扫码查询数据 |
| | | if (isflag) { |
| | | this.$data.scanCodeVal=result.decodedata; |
| | | var eventid = this.$data.param.Scan_Code.Input_Change_Event.ID; |
| | |
| | | } |
| | | } else if (action.action_type == 'set_global_attr') { |
| | | $this.$actiontr = action.value || []; |
| | | } else if (action.action_type == 'add_subcls_panel') { |
| | | } else if (action.action_type == 'add_subcls_panel') { //主从数据类扫码查询数据 |
| | | var result = action.value; |
| | | let list_1 = JSON.parse(JSON.stringify(this.$data.subClassAttrList)); |
| | | var scanCodeVal = $this.$data.scanCodeVal; |
| | | if(info.inputParamter[0].attr=="mast_input_3037") |
| | | if(info.inputParamter[0].attr=="mast_input_3037") //判断是主数据类扫码查询数据 |
| | | scanCodeVal = "mast_input_3037-"+ii; |
| | | $this.$data.subPanelList.push({ |
| | | scanCodeVal:scanCodeVal, |
| | |
| | | |
| | | if (data.result) { |
| | | let list_1 = JSON.parse(JSON.stringify(this.$data.subClassAttrList)); |
| | | var scanCodeVal = $this.$data.scanCodeVal; |
| | | if(info.inputParamter[0].attr=="mast_input_3037") |
| | | scanCodeVal = "mast_input_3037-"+ii; |
| | | $this.$data.subPanelList.push({ |
| | | scanCodeVal:$this.$data.scanCodeVal, |
| | | scanCodeVal:scanCodeVal, |
| | | subClassAttr:list_1 |
| | | }); |
| | | var result = data.result; |
| | | for (var i = 0; i < result.length; i++) { |
| | | for (var s = 0; s < $this.$data.subPanelList.length; s++) { |
| | | if($this.$data.subPanelList[s].scanCodeVal == $this.$data.scanCodeVal){ |
| | | if($this.$data.subPanelList[s].scanCodeVal == scanCodeVal){ |
| | | var _subClassAttr = $this.$data.subPanelList[s].subClassAttr; |
| | | for (var c = 0; c < _subClassAttr.length; c++) { |
| | | var attr = _subClassAttr[c].Attr; |