| | |
| | | float: left; |
| | | display: inline-block; |
| | | } |
| | | button.btn_sava { |
| | | width:100%; |
| | | margin-top: 50rpx; |
| | | padding: 20rpx; |
| | | line-height: 1.5; |
| | | background: #27A6E1; |
| | | border: none; |
| | | color: #fff; |
| | | font-size: 38rpx; |
| | | font-weight: bold; |
| | | float: left; |
| | | display: inline-block; |
| | | } |
| | | .i_tishi{ |
| | | color: red; |
| | | vertical-align: sub; |
| | |
| | | text-align: center; |
| | | font-weight: bold; |
| | | } |
| | | .v-panel{ |
| | | min-height:788rpx; |
| | | } |
| | | .v-panellist{ |
| | | border:4rpx solid #aaa; |
| | | border-radius: 10rpx; |
| | |
| | | |
| | | <template> |
| | | <view class="content"> |
| | | <!-- 主数据 --> |
| | | <view class="v-area" v-for="(classattr,index) in classAttrList"> |
| | | <div class="class_attr_title" style="display: none;"> |
| | | <div class="title_line"></div> |
| | |
| | | <span class="title">{{classattr.Name}}</span> |
| | | <a href="javascript:;" class="arrow" @tap="onarrow(index,classattr.Open)"><i class="ace-icon fa ":class="classattr.Open?'fa-angle-down':'fa-angle-up'"></i></a> |
| | | </div> |
| | | <!-- 主数据显示详情区 --> |
| | | <div class="class_attr_body" :style="{'display':classattr.Open?'block':'none'}"> |
| | | <div class="dv_field_div" v-for="(attr,iindex) in classattr.Attr"> |
| | | <view class="form-group" v-if="attr.Type=='字符串' || attr.Type=='可变长字符串' || attr.Type=='整数' || attr.Type=='浮点数'" :style="{'display':attr.hidden == 'True'?'none':''}"> |
| | |
| | | </div> |
| | | </div> |
| | | </view> |
| | | <view class="v-area class_attr_body"> |
| | | <view class="form-group"> |
| | | <!-- 左右布局 --> |
| | | <p class="tx_title2" >{{param.Scan_Code.Name}}:</p> |
| | | <input type="text" class="attr_field" :value="scanCodeVal" @focus="scan_ontap" :style="param.Scan_Code.Have_Select_Button==true?'width: '+(100-(param.Scan_Code.Name.length * 5)-14)+'%;':'width: '+(100-(param.Scan_Code.Name.length * 5)-5)+'%;'"> |
| | | <div class="text-right2" v-if="param.Scan_Code.Have_Select_Button==true"> |
| | | <a @tap="scan_classAttr_extButton()" ><i class="ace-icon fa" :class="param.Scan_Code.Img?param.Scan_Code.Img:'fa-plus-circle'"></i></a> |
| | | </div> |
| | | <!-- 上下布局 --> |
| | | <!-- <text class="tx_title">{{param.Scan_Code.Name}}:</text> |
| | | <div class="text-right" v-if="param.Scan_Code.Have_Select_Button==true"> |
| | | <a @tap="ms_classAttr_extButton()"><i class="ace-icon fa" :class="param.Scan_Code.Img?param.Scan_Code.Img:'fa-plus-circle'"></i></a> |
| | | </div> |
| | | <input type="text" value="" > --> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 从数据 --> |
| | | <view class="v-panel"> |
| | | <div class="panel_title">{{param.Sub_Cls.Title}}</div> |
| | | <!-- 从数据扫码区 --> |
| | | <view class="v-area class_attr_body" v-if="param.Sub_Cls.Can_Add_Delete == true"> |
| | | <h4 style="margin: 15rpx 0 0 30rpx;font-weight: bold;">新增{{param.Sub_Cls.Name }}</h4> |
| | | <view class="form-group"> |
| | | <!-- 左右布局 --> |
| | | <p class="tx_title2" >{{param.Scan_Code.Name}}:</p> |
| | | <input type="text" class="attr_field" :value="scanCodeVal" @focus="scan_ontap" @blur="scan_onevent" :style="param.Scan_Code.Have_Select_Button==true?'width: '+(100-(param.Scan_Code.Name.length * 5)-14)+'%;':'width: '+(100-(param.Scan_Code.Name.length * 5)-5)+'%;'"> |
| | | <div class="text-right2" v-if="param.Scan_Code.Have_Select_Button==true"> |
| | | <a @tap="scan_classAttr_extButton()" ><i class="ace-icon fa" :class="param.Scan_Code.Img?param.Scan_Code.Img:'fa-plus-circle'"></i></a> |
| | | </div> |
| | | <!-- 上下布局 --> |
| | | <!-- <text class="tx_title">{{param.Scan_Code.Name}}:</text> |
| | | <div class="text-right" v-if="param.Scan_Code.Have_Select_Button==true"> |
| | | <a @tap="ms_classAttr_extButton()"><i class="ace-icon fa" :class="param.Scan_Code.Img?param.Scan_Code.Img:'fa-plus-circle'"></i></a> |
| | | </div> |
| | | <input type="text" value="" > --> |
| | | </view> |
| | | </view> |
| | | <!-- 从数据显示详情区 --> |
| | | <view class="v-panellist" v-for="(subpanel,index) in subPanelList"> |
| | | <view class="v-area" v-for="(subclassattr,index) in subpanel.subClassAttr"> |
| | | <div class="class_attr_title" style="display: none;"> |
| | |
| | | </div> |
| | | </view> |
| | | |
| | | <view class="v-paneldel"><a href="javascript:;" class="panel_del" @tap="panel_del(index)"><i class="ace-icon fu-delete"></i></a></view> |
| | | <view class="v-paneldel" v-if="param.Sub_Cls.Can_Add_Delete == true"> |
| | | <a href="javascript:;" class="panel_del" @tap="panel_del(index)"><i class="ace-icon fu-delete"></i></a> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <button type="default" @tap="cancel" class="btn_cancel">取消</button> |
| | | <button type="default" @tap="sava" class="btn_add">{{title}}</button> |
| | | <button type="default" @tap="cancel" class="btn_cancel" v-if="param.Sub_Cls.Can_Add_Delete == true">取消</button> |
| | | <button type="default" @tap="sava" class="btn_add" v-if="param.Sub_Cls.Can_Add_Delete == true">{{title}}</button> |
| | | <button type="default" @tap="cancel" class="btn_sava" v-else-if="param.Sub_Cls.Can_Add_Delete == false">{{title}}</button> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | name: styleName, |
| | | type: '2' |
| | | }; |
| | | $this.$store.state.thisEditName = styleName; |
| | | // console.log($this.$store.getters.getclassGridStyleInfo); |
| | | //获取主数据类界面样式 |
| | | if(clsType=='Mast'){ |
| | | $this.$store.state.thisEditName = styleName; |
| | | if($this.$store.getters.getclassGridStyleInfo){ |
| | | $this.$data.classGridStyle = $this.$store.getters.getclassGridStyleInfo.data; |
| | | $this.class_attr_init(); |
| | |
| | | }); |
| | | } |
| | | } else if(clsType=='Sub'){ //获取从数据类界面样式 |
| | | $this.$store.state.thisEditSubName = styleName; |
| | | if($this.$store.getters.getSubClassGridStyleInfo){ |
| | | $this.$data.subClassGridStyle = $this.$store.getters.getSubClassGridStyleInfo.data; |
| | | $this.subClass_attr_init(); |
| | |
| | | } |
| | | }) |
| | | }, |
| | | scan_onevent(e){ |
| | | // console.log(e.target); |
| | | if(e.target.value){ |
| | | var isflag=true; |
| | | for(var i in this.$data.subPanelList){ |
| | | if(this.$data.subPanelList[i].scanCodeVal == e.target.value) |
| | | isflag=false; |
| | | } |
| | | //子数据类扫码查询数据 |
| | | if (isflag) { |
| | | uni.hideKeyboard(); |
| | | this.$data.scanCodeVal=e.target.value; |
| | | var eventid = this.$data.param.Scan_Code.Input_Change_Event.ID; |
| | | if (eventid) { |
| | | var mast_req=[]; |
| | | //主数据类属性 |
| | | var classattrlist = this.$data.classAttrList; |
| | | for (var i = 0; i < classattrlist.length; i++) { |
| | | var attr = classattrlist[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=='引用项目') |
| | | mast_req.push({ attr: ar.Name, value: ar.ValID ?ar.ValID :'' }); |
| | | else if(ar.Type=='布尔值') |
| | | mast_req.push({ attr: ar.Name, value: ar.Value?'1':'0'}); |
| | | else |
| | | mast_req.push({ attr: ar.Name, value: ar.Value ?ar.Value :''}); |
| | | } |
| | | } |
| | | var req=[]; |
| | | //子数据类属性 |
| | | var attrlist = this.$data.subClassAttrList; |
| | | 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, value: ar.ValID ?ar.ValID :'' }); |
| | | else if(ar.Type=='布尔值') |
| | | req.push({ attr: ar.Name, value: ar.Value?'1':'0'}); |
| | | else |
| | | req.push({ attr: ar.Name, value: ar.Value ?ar.Value :''}); |
| | | } |
| | | } |
| | | var info = { |
| | | eventid: eventid, |
| | | edtype: '7',//"0", |
| | | projectid: '', |
| | | rclsid: '', |
| | | robjid: '', |
| | | userlogin: '', |
| | | clsid: 'MBOX',//this.$data.param.Sub_Cls.ID, |
| | | objid: "", |
| | | attr: req, |
| | | mast_attr: mast_req, |
| | | inputParamter:[{ attr: 'input_3037', value: this.$data.scanCodeVal }] |
| | | } |
| | | |
| | | this.scan_DataObjRunCustomEvent(info, ""); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | onarrow(index,open){ |
| | | // console.log(index+'--'+open); |
| | | this.$data.classAttrList[index].Open=open==true?false:true; |
| | |
| | | // console.log(data_attr); |
| | | if (e.target.value != data_attr.Value) { |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=e.target.value; |
| | | var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].action; |
| | | // var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].action; |
| | | //子数据类扫码区事件脚本 |
| | | var eventid = this.$data.param.Scan_Code.Input_Change_Event.ID; |
| | | if (eventid) { |
| | | // self.event_no_sub = 1; |
| | | var req=[]; |
| | | var attrlist = this.$data.classAttrList; |
| | | 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++) { |
| | |
| | | if(ar.Type=='引用对象(多个)') |
| | | if(ar.Value=='请') ar.Value=''; |
| | | if(ar.Type=='引用人员' || ar.Type=='引用项目') |
| | | req.push({ attr: ar.Name, val: ar.ValID ?ar.ValID :'' }); |
| | | req.push({ attr: ar.Name, value: ar.ValID ?ar.ValID :'' }); |
| | | else if(ar.Type=='布尔值') |
| | | req.push({ attr: ar.Name, val: ar.Value?'1':'0'}); |
| | | req.push({ attr: ar.Name, value: ar.Value?'1':'0'}); |
| | | else |
| | | req.push({ attr: ar.Name, val: ar.Value ?ar.Value :''}); |
| | | req.push({ attr: ar.Name, value: ar.Value ?ar.Value :''}); |
| | | } |
| | | } |
| | | var info = { |
| | | eventid: eventid, |
| | | edtype: "0", |
| | | edtype: "7",//"0", |
| | | projectid: '', |
| | | rclsid: '', |
| | | robjid: '', |
| | | userlogin: '', |
| | | clsid: this.$data.param.Master_Cls.ID, |
| | | clsid: 'MBOX',//this.$data.param.Sub_Cls.ID, |
| | | objid: "", |
| | | attr: req, |
| | | mast_attr: [], |
| | | inputParamter:[{ attr: 'mast_input_3037', value: e.target.value }] |
| | | } |
| | | this.DataObjRunCustomEvent(info, data_attr); |
| | | |
| | | this.scan_DataObjRunCustomEvent(info, ""); |
| | | } |
| | | } |
| | | |