| | |
| | | |
| | | <view class="view-floor"> |
| | | <button type="default" @click="cancel" class="btn_cancel" |
| | | :style="{'width':param.ListPage.Page_Button?'39.5%':'49.5%'}">关闭</button> |
| | | :style="{'width':param.ListPage.Page_Button.length>0?'39.5%':'48.5%'}">关闭</button> |
| | | <button type="default" @click="Refresh" class="btn_refresh" |
| | | :style="{'width':param.ListPage.Page_Button?'39.5%':'49.5%'}">刷新</button> |
| | | <view class="uni-padding-wrap" v-if="param.ListPage.Page_Button"> |
| | | :style="{'width':param.ListPage.Page_Button.length>0?'39.5%':'48.5%'}">刷新</button> |
| | | <view class="uni-padding-wrap" v-if="param.ListPage.Page_Button.length>0"> |
| | | <view class="uni-btn-v"> |
| | | <a @tap="actionSheetTap"><Icon class="mobox-normal-more"/></a> |
| | | </view> |
| | |
| | | if(!ret.result.style_def.includes('"')) styledef = Base64.decode(ret.result.style_def); |
| | | } |
| | | $this.$data.detail1_styledef = ret.result.style_def? JSON.parse(styledef): {}; |
| | | $this.$data.detail1_styledef.SelBut_Checked = true; |
| | | $this.$data.detail1_styledef.SelBut_Checked = false; |
| | | // console.log($this.$data.detail1_styledef); |
| | | // $this.$data.detail1StyleDefList.push($this.$data.detail1_styledef); |
| | | // var aa = JSON.stringify(this.detail1_styledef); |
| | |
| | | var $this = this; |
| | | var dataInfo={ |
| | | ed_type: 0, |
| | | start_transaction: true, |
| | | class_id: clsid, |
| | | event_id: eventid, |
| | | }; |
| | |
| | | var tip = result.err_info ? typeof result.err_info == 'string' ? result.err_info : result.err_info.join('<br/>') : ''; |
| | | if (result.ret == 801) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"}); |
| | | else uni.showModal({title:'提示',content:tip+',提示:'+result.ret,showCancel:false,confirmText:"取消"}); |
| | | return false |
| | | return false; |
| | | }else{ |
| | | var tip = result.info ? typeof result.info == 'string' ? result.info : result.info.join('<br/>') : ''; |
| | | if (tip) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"}); |
| | |
| | | url:'../modal/3200?param='+JSON.stringify(this.$data.param)+"&titlename="+this.$data.title |
| | | }); |
| | | }, |
| | | //点击显示浏览对象显示页面定义 |
| | | //点击显示浏览对象显示页面 |
| | | async onViewPageClick(style){ |
| | | if(this.param.ViewPage){ |
| | | if(this.param.ViewPage.View_UIDef){ |
| | |
| | | var eventid = $this.param.ViewPage.Exit_View_Event?.id; |
| | | if(eventid){ |
| | | try { |
| | | var obj_attr = [{attr: 'S_ID',value:$this.styledef.form.objId}]; |
| | | var obj_attr = {'S_ID':$this.styledef.form.objId}; |
| | | $this.styledef.form.attrs.forEach((attr) => { |
| | | obj_attr.push({attr: attr.name,value: attr.value}); |
| | | obj_attr[attr.name]=attr.value; |
| | | }); |
| | | // console.log(obj_attr); |
| | | var input_param = Base64.encode(JSON.stringify(obj_attr)); |
| | | this.runCustomEvent({ |
| | | ed_type: 0, |
| | | start_transaction: true, |
| | | class_id: this.param.DataCls.id, |
| | | event_id: eventid, |
| | | obj_attr, |
| | |
| | | //执行后处理事件 |
| | | await this.runCustomEvent({ |
| | | ed_type: 0, |
| | | start_transaction: true, |
| | | class_id: clsId, |
| | | event_id: afterProcess_Event.ID, |
| | | }); |
| | |
| | | var $this = this; |
| | | var dataInfo={ |
| | | ed_type: 0, |
| | | start_transaction: '', |
| | | start_transaction: true, |
| | | class_id: this.$data.head_styledef.form.clsId, |
| | | class_name: '', |
| | | event_id: event.id, |
| | |
| | | var tip = result.err_info ? typeof result.err_info == 'string' ? result.err_info : result.err_info.join('<br/>') : ''; |
| | | if (result.ret == 801) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"}); |
| | | else uni.showModal({title:'提示',content:tip+',提示:'+result.ret,showCancel:false,confirmText:"取消"}); |
| | | return false |
| | | return false; |
| | | }else{ |
| | | var tip = result.info ? typeof result.info == 'string' ? result.info : result.info.join('<br/>') : ''; |
| | | if (tip) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"}); |
| | | |
| | | if(result.result_type == 0 && result.action){ |
| | | result.action.forEach(item=>{ |
| | | if(item.action_type == "insert_subtable_page_row"){ //分拣中 |
| | | $this.$data.param.Show_Welcom_Page=false; |
| | | var value = item.value; |
| | | $this.viewAceionRow(value); |
| | | } |
| | | else if(item.action_type == "set_subtable_page_content"){ //已分拣 |
| | | $this.$data.param.Show_Welcom_Page=false; |
| | | var value = item.value; |
| | | if(value.clear == true && $this.$data.detail1StyleDefList.length>0){ //判断是否清空页签内容,正在分拣是否有数据 |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '系统检测到有待分拣中的货品,继续操作会清空,是否继续?', |
| | | success: function (res) { |
| | | if (res.confirm) { |
| | | $this.$data.detail1StyleDefList=[]; |
| | | $this.$data.detail2StyleDefList=[]; |
| | | $this.viewAceionContent(value); |
| | | } else if (res.cancel) { |
| | | if(value.page_name == $this.$data.param.Sub_Page[0].Name){ //判断返回的action的page_name是否是待分拣 |
| | | $this.$data.detail1StyleDefList=[]; |
| | | }else{ |
| | | $this.$data.detail2StyleDefList=[]; |
| | | } |
| | | $this.viewAceionContent(value); |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | if(value.page_name == $this.$data.param.Sub_Page[0].Name){ //判断返回的action的page_name是否是待分拣 |
| | | $this.$data.detail1StyleDefList=[]; |
| | | }else{ |
| | | $this.$data.detail2StyleDefList=[]; |
| | | } |
| | | $this.viewAceionContent(value); |
| | | } |
| | | } |
| | | else if(item.action_type == "select_subtable_page_row"){ |
| | | // value = {"page_name":"码盘中", "row":{"id":"xx"}} |
| | | var value = item.value; |
| | | $this.detail1StyleDefList.forEach((ele,index)=>{ |
| | | $this.activelist[index].active = false; |
| | | if(ele.form.objId == value.row.id){ |
| | | ele.SelBut_Checked = true; |
| | | $this.active_id = ele.form.htmlobjId; |
| | | //自动滚动到指定元素 |
| | | uni.createSelectorQuery() |
| | | .select("#tabpanel")//对应外层节点 |
| | | .boundingClientRect((container) => { |
| | | uni.createSelectorQuery() |
| | | .select("#tabpanel"+ele.form.htmlobjId)//目标节点 |
| | | .boundingClientRect((target) => { |
| | | uni.pageScrollTo({ |
| | | scrollTop: target.top - container.top,//滚动到实际距离是元素距离顶部的距离减去最外层盒子的滚动距离 |
| | | }); |
| | | }) |
| | | .exec(); |
| | | }) |
| | | .exec(); |
| | | } |
| | | }); |
| | | } |
| | | else if(item.action_type == "set_dlg_attr"){ |
| | | if(item.action_type == "set_dlg_attr"){ |
| | | // value = {"attr":"xxx", "value":"xxx"} |
| | | var data = item.value; |
| | | $this.$data.head_styledef.form.items.forEach(async (ele,index) => { |
| | |
| | | try { |
| | | var $this = this; |
| | | this.$store.dispatch('runCustomEvent',dataInfo).then(ret=>{ |
| | | // console.log(ret); |
| | | console.log(ret); |
| | | if (ret.err_code == 0) { |
| | | var result = ret.result; |
| | | if (result.ret != 0) { |
| | | var tip = result.err_info ? typeof result.err_info == 'string' ? result.err_info : result.err_info.join('<br/>') : ''; |
| | | if (result.ret == 801) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"}); |
| | | else uni.showModal({title:'提示',content:tip+',提示:'+result.ret,showCancel:false,confirmText:"取消"}); |
| | | return false |
| | | return false; |
| | | }else{ |
| | | var tip = result.info ? typeof result.info == 'string' ? result.info : result.info.join('<br/>') : ''; |
| | | if (tip) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"}); |
| | | |
| | | if(result.result_type == 0 && result.action){ |
| | | result.action.forEach(item=>{ |
| | | // if(item.action_type == "insert_subtable_page_row"){ |
| | | if(item.action_type == "goback_to_pre_page"){ //返回上一页 |
| | | var value = item.value; |
| | | uni.navigateBack({ |
| | | delta:1 ,//返回层数,2则上上页 |
| | | }); |
| | | } else if(item.action_type == "hidden_button"){ //隐藏按钮 |
| | | var value = item.value; |
| | | value.forEach(btn => { |
| | | var index = $this.param.ListPage.Page_Button.findIndex(button => button.ShowName == btn) |
| | | if (index > -1) |
| | | $this.param.ListPage.Page_Button.splice(index, 1) |
| | | }) |
| | | // } else if(item.action_type == "refresh_cur_row"){ // |
| | | // var value = item.value; |
| | | // } |
| | | uni.showModal({title:"提示",content:"当前action_type:"+item.action_type+"未处理",showCancel:false,confirmText:"取消"}); |
| | | |
| | | |
| | | } else{ |
| | | uni.showModal({title:"提示",content:"当前action_type:"+item.action_type+"未处理",showCancel:false,confirmText:"取消"}); |
| | | } |
| | | }); |
| | | }else{ |
| | | // this.detail2StyleDefList=[]; |