| | |
| | | :type="item.name=='Input'?'text':'number'" v-model="item.value" :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)" @keyup.enter="onEnterChange(item)" |
| | | :focus="focusFieldId == item.fieldId" @focus="ontap(index,item)" @keyup.enter="onEnterChange(item)" |
| | | @blur="onEnterChange(item)" /> |
| | | <text v-if="item.setting.suffix" class="uni-icon" :class="[item.setting.suffix]" |
| | | @click="onEnterChange(item)"></text> |
| | |
| | | title: '码盘', |
| | | ClsID: 'CG_Detail', |
| | | param: {}, |
| | | focusMateria: false, |
| | | focusFieldId: "", |
| | | head_styledef: { |
| | | form: { |
| | | items: [] |
| | |
| | | this.Detail2_UIstyleGetInfo(this.ClsID, this.$data.param.Sub_Page[1].UI_Style.ID); |
| | | |
| | | console.log(this.$data.param); |
| | | //页面初始化获取焦点 |
| | | // this.focusMateria=true; |
| | | }, |
| | | //页面初始化获取焦点 |
| | | methods: { |
| | | setData: function(obj) { |
| | | let that = this; |
| | |
| | | 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({ |
| | |
| | | }); |
| | | }, |
| | | |
| | | ontap(item) { //扫码功能 |
| | | ontap(index,item) { //扫码功能 |
| | | // var $ele = e; |
| | | //console.log(e.target) |
| | | getApp().onScan((result) => { |
| | | console.log(result.decodedata); |
| | | item.value = result.decodedata; |
| | | uni.hideKeyboard(); |
| | | // uni.hideKeyboard(); |
| | | var $this = this; |
| | | |
| | | // if(item.value=='B61DF51DD50645CEB9D152DD77D2466A'){ |
| | |
| | | $this.onChange(onChangeEvent); |
| | | } |
| | | if (item.value) { //第一个输入框不为空 |
| | | $this.focusMateria = true; //初始化,第二个输入框focus属性 |
| | | // setTimeout(function(){ |
| | | // $this.focusMateria=true; //第二个输入框获取焦点 |
| | | setTimeout(function() { |
| | | uni.hideKeyboard(); |
| | | }, 1000); |
| | | // },500); |
| | | //初始化,下个输入框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"} |
| | |
| | | })) |
| | | }); |
| | | }); |
| | | const list = [] |
| | | list.push({page_name:$this.param.Sub_Page[0].Name,item_list:jsonlist,ext_data:$this.detail1ExtData}) |
| | | |
| | | // console.log(jsonlist); |
| | | $this.runCustomEvent(event, input_param, jsonlist, '1'); |
| | | // jsonlist.forEach(async (json,key)=>{ |
| | |
| | | })) |
| | | }); |
| | | }); |
| | | 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 ($this.$data.After_OK_Event.ID != event.ID) { //判断当前事件是否是确定后事件 |