| | |
| | | console.log(item); |
| | | if(item.oldvalue != item.value){ |
| | | item.oldvalue = item.value; |
| | | item.value = item.value; |
| | | var attr = item.fieldId; |
| | | $this.head_styledef.form.model[attr] = item.value; |
| | | //子数据类扫码区事件脚本 |
| | |
| | | if (result[i].choice_list) { |
| | | for (var c = 0; c < $this.head_styledef.form.items.length; c++) { |
| | | var attr = $this.head_styledef.form.items[c]; |
| | | if(attr.name!='Layout'){ |
| | | if(attr.fieldId==result[i].attr){ |
| | | var dictItemList=[]; |
| | | for(var d in result[i].choice_list){ |
| | |
| | | } |
| | | attr.dict = dictItemList; |
| | | } |
| | | } else if(attr.name=='Layout'){ |
| | | attr.setting.colList.forEach(col=>{ |
| | | if(col){ |
| | | if(col.fieldId==result[i].attr){ |
| | | var dictItemList=[]; |
| | | for(var d in result[i].choice_list){ |
| | | var val =result[i].choice_list[d]; |
| | | dictItemList.push({"CN_S_NAME":val,"CN_S_VALUE":val,"text":val,"value":val}); |
| | | } |
| | | col.dict = dictItemList; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | } |
| | | } |
| | | for (var c = 0; c < $this.$data.head_styledef.form.items.length; c++) { |
| | | var attr = $this.$data.head_styledef.form.items[c]; |
| | | // console.log(attr[j].Name+'=='+result[i].attr); |
| | | //判断表单里是否有返回字段,没有就装载到model里,点击确定提交的时候带上这些数据 |
| | | if($this.head_styledef.form.model[result[i].attr]==undefined){ |
| | | $this.head_styledef.form.model[result[i].attr]=result[i].value; |
| | | } |
| | | //判断是否是栅格表单 |
| | | if(attr.name!='Layout'){ |
| | | if(attr.fieldId==result[i].attr){ |
| | | attr.value = ''; |
| | | attr.oldvalue = ''; |
| | | attr.value = result[i].value; |
| | | attr.oldvalue = result[i].value; |
| | | $this.head_styledef.form.model[attr.fieldId] =result[i].value; |
| | | } |
| | | |
| | | } else if(attr.name=='Layout'){ |
| | | attr.setting.colList.forEach(col=>{ |
| | | if(col){ |
| | | if(col.fieldId==result[i].attr){ |
| | | col.value = ''; |
| | | col.oldvalue = ''; |
| | | col.value = result[i].value; |
| | | col.oldvalue = result[i].value; |
| | | $this.head_styledef.form.model[col.fieldId] =result[i].value; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | var length = 0; |
| | | if (!$this.$data.refdatastore.filter(function (s) { |
| | |
| | | } |
| | | } |
| | | } |
| | | // var head_styledef = JSON.parse(JSON.stringify($this.head_styledef)); |
| | | // $this.head_styledef=[]; |
| | | // $this.head_styledef = head_styledef; |
| | | console.log($this.head_styledef); |
| | | |
| | | if (data.result) { |
| | | var result = data.result; |
| | | for (var i = 0; i < result.length; i++) { |
| | | for (var c = 0; c < $this.$data.head_styledef.form.items.length; c++) { |
| | | var attr = $this.$data.head_styledef.form.items[c]; |
| | | //判断表单里是否有返回字段,没有就装载到model里,点击确定提交的时候带上这些数据 |
| | | if($this.head_styledef.form.model[result[i].attr]==undefined){ |
| | | $this.head_styledef.form.model[result[i].attr]=result[i].value; |
| | | } |
| | | //判断是否是栅格表单 |
| | | if(attr.name!='Layout'){ |
| | | if(attr.fieldId==result[i].attr){ |
| | | attr.value = ''; |
| | | attr.oldvalue = ''; |
| | | attr.value = result[i].value; |
| | | attr.oldvalue = result[i].value; |
| | | $this.head_styledef.form.model[attr.fieldId] =result[i].value; |
| | | } |
| | | } else if(attr.name=='Layout'){ |
| | | attr.setting.colList.forEach(col=>{ |
| | | if(col){ |
| | | if(col.fieldId==result[i].attr){ |
| | | col.value = ''; |
| | | col.oldvalue = ''; |
| | | col.value = result[i].value; |
| | | col.oldvalue = result[i].value; |
| | | $this.head_styledef.form.model[col.fieldId] =result[i].value; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | var length = 0; |