| | |
| | | :disabled="item.disabled" |
| | | :placeholder="item.placeholder" |
| | | :style="{'width':item.setting.prefix && item.setting.suffix?'78%':item.setting.prefix || item.setting.suffix?'87%':'96%'}" |
| | | :focus="focusMateria" |
| | | @focus="ontap(item)" |
| | | :focus="focusFieldId == item.fieldId" |
| | | @focus="ontap(index,item)" |
| | | @keyup.enter="onEnterChange(item)" |
| | | @blur="onEnterChange(item)" |
| | | /> |
| | |
| | | ClsID: "Sorting_Detail", |
| | | ClsID2: "Sorting_Result", |
| | | param: {}, |
| | | focusMateria:false, |
| | | focusFieldId:"", |
| | | head_styledef:{ |
| | | form:{ |
| | | items:[] |
| | |
| | | this.Detail2_UIstyleGetInfo(this.ClsID2,this.$data.param.Sub_Page[1].UI_Style.ID); |
| | | |
| | | console.log(this.$data.param); |
| | | //页面初始化获取焦点 |
| | | // this.focusMateria=true; |
| | | }, |
| | | methods: { |
| | | setData: function(obj) { |
| | |
| | | if(ele.useDict==true){ //判断useDict是否使用字典 |
| | | await this.DictGetInfo(ele.bind.dict,index,'mast'); |
| | | } |
| | | if($this.focusFieldId == "") |
| | | { |
| | | if(ele.name=='Input' || ele.name=='InputNumber') |
| | | { |
| | | $this.setData({focusFieldId:ele.fieldId}) |
| | | } |
| | | } |
| | | }); |
| | | }else{ |
| | | uni.showModal({title:"错误1",content:ret.err_msg,showCancel:false,confirmText:"取消"}); |
| | |
| | | }); |
| | | }, |
| | | |
| | | ontap(item){ //扫码功能 |
| | | ontap(index,item){ //扫码功能 |
| | | // var $ele = e; |
| | | getApp().onScan((result)=>{ |
| | | console.log(result.decodedata); |
| | | item.value = result.decodedata; |
| | | uni.hideKeyboard(); |
| | | //uni.hideKeyboard(); |
| | | var $this = this; |
| | | |
| | | console.log(item); |
| | |
| | | var onSuffixClickCallbackEvent = item.bind.onSuffixClickCallbackEvent; //后图标点击事件 |
| | | var onSuffixClickEvent = item.bind.onSuffixClickEvent; //后图标点击回调 |
| | | var isflag = false; |
| | | |
| | | |
| | | if(onChangeEvent.id){ //内容变化后事件 |
| | | $this.onChange(onChangeEvent); |
| | | } |
| | | if(item.value){ //第一个输入框不为空 |
| | | $this.focusMateria = true; //初始化,第二个输入框focus属性 |
| | | // setTimeout(function(){ |
| | | // $this.focusMateria=true; //第二个输入框获取焦点 |
| | | setTimeout(function(){ |
| | | uni.hideKeyboard(); |
| | | },1000); |
| | | // },500); |
| | | if(item.value){ //输入框不为空 |
| | | //初始化,下个输入框focus属性 |
| | | const curIndex = $this.head_styledef.form.items.findIndex((ele, index2, arr) => { |
| | | return (ele.name=='Input' || ele.name=='InputNumber') && index2 > index; |
| | | }) |
| | | if(curIndex > -1){ |
| | | $this.setData({focusFieldId: $this.head_styledef.form.items[curIndex].fieldId}) |
| | | } |
| | | // setTimeout(function(){ |
| | | // uni.hideKeyboard(); |
| | | // },1000); |
| | | } |
| | | // if(onSuffixClickCallbackEvent.id){ //后图标点击事件 |
| | | // this.onSuffixClick(onSuffixClickCallbackEvent); |
| | |
| | | } else if (value.page_name == $this.$data.param.Sub_Page[1].Name) { |
| | | $this.setData({detail2StyleDefList:[],detail2ExtData:{}}) |
| | | } |
| | | } |
| | | else if (item.action_type == "set_dlg_current_edit_attr") { |
| | | if($this.focusFieldId == item.value) |
| | | $this.setData({focusFieldId: ""}) |
| | | $this.setData({focusFieldId:item.value}) |
| | | } |
| | | else if(item.action_type == "set_dlg_attr"){ |
| | | // value = {"attr":"xxx", "value":"xxx"} |
| | |
| | | var jsonlist=[]; |
| | | detailAttrList.forEach(attr=>{ |
| | | jsonlist.push({ |
| | | id:'', |
| | | id:attr["id"]|| "", |
| | | attrs: Object.keys(attr).map((a) => ({ |
| | | attr: a, |
| | | value: attr[a] || "", |
| | | })) |
| | | })).filter((a)=>{return a.attr != "id"}) |
| | | }); |
| | | }); |
| | | // console.log(jsonlist); |
| | | $this.runCustomEvent(event,input_param,jsonlist,'1'); |
| | | const list = [] |
| | | list.push({page_name:$this.param.Sub_Page[0].Name,item_list:jsonlist,ext_data:$this.detail1ExtData}) |
| | | $this.runCustomEvent(event,input_param,list,'1'); |
| | | // jsonlist.forEach(async (json,key)=>{ |
| | | // await $this.runCustomEvent(event,input_param,json,'1'); |
| | | // }); |
| | |
| | | var jsonlist=[]; |
| | | detailAttrList.forEach(attr=>{ |
| | | jsonlist.push({ |
| | | id:'', |
| | | id:attr["id"]|| "", |
| | | attrs: Object.keys(attr).map((a) => ({ |
| | | attr: a, |
| | | value: attr[a] || "", |
| | | })) |
| | | })).filter((a)=>{return a.attr != "id"}) |
| | | }); |
| | | }); |
| | | const list = [] |
| | | list.push({page_name:$this.param.Sub_Page[1].Name,item_list:jsonlist,ext_data:$this.detail2ExtData}) |
| | | |
| | | // console.log(jsonlist); |
| | | $this.runCustomEvent(event,input_param,jsonlist,'2'); |
| | | $this.runCustomEvent(event,input_param,list,'2'); |
| | | // jsonlist.forEach(async (json,key)=>{ |
| | | // await $this.runCustomEvent(event,input_param,json,'2'); |
| | | // }); |
| | |
| | | $this.setData({detail2StyleDefList:[],detail2ExtData:{}}) |
| | | } |
| | | } |
| | | else if (item.action_type == "set_dlg_current_edit_attr") { |
| | | if($this.focusFieldId == item.value) |
| | | $this.setData({focusFieldId: ""}) |
| | | $this.setData({focusFieldId:item.value}) |
| | | } |
| | | else if(item.action_type == "refresh"){ //刷新 |
| | | var value = item.value; |
| | | //清除待分拣成功的数据 |