| | |
| | | //console.log(e.target) |
| | | 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; |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | | var attr = attrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | | var ar = attr[j]; |
| | | if(ar.Type=='引用对象(多个)') |
| | | if(ar.Value=='请') ar.Value=''; |
| | | if(ar.Type=='引用人员' || ar.Type=='引用项目') |
| | | req.push({ attr: ar.Name, val: ar.ValID ?ar.ValID :'' }); |
| | | else if(ar.Type=='布尔值') |
| | | req.push({ attr: ar.Name, val: ar.Value?'1':'0'}); |
| | | else |
| | | req.push({ attr: ar.Name, val: ar.Value ?ar.Value :''}); |
| | | } |
| | | } |
| | | var info = { |
| | | eventid: eventid, |
| | | edtype: "0", |
| | | projectid: '', |
| | | rclsid: '', |
| | | robjid: '', |
| | | userlogin: '', |
| | | clsid: this.$data.param.Sub_Cls.ID, |
| | | objid: "", |
| | | attr: req, |
| | | inputParamter:[{ attr: 'input_3037', value: result.decodedata }] |
| | | } |
| | | |
| | | this.scan_DataObjRunCustomEvent(info, ""); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | scan_ontap(e){ //扫码区扫码功能 |