| | |
| | | <image class="divX" src="../../images/msg_50_new.png"></image>--> |
| | | <input |
| | | :type="attr.Type=='整数' || attr.Type=='浮点数' || attr.Type=='int' || attr.Type=='float'?'number':'text'" |
| | | :value="attr.Value" @focus="ontap" @blur="onevent" v-if="attr.Height=='1'" |
| | | :value="attr.Value" :focus="focusField ==`${index}-${iindex}`" @focus="ontap" |
| | | @click="onClick(index,iindex)" @blur="onevent" v-if="attr.Height=='1'" |
| | | :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" |
| | | :disabled="attr.edit?false:true"> |
| | | <!-- =='flase'?true:false --> |
| | | <textarea :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='2'" |
| | | <textarea :value="attr.Value" :focus="focusField == `${index}-${iindex}`" @focus="ontap" |
| | | @click="onClick(index,iindex)" @blur="onevent" v-else-if="attr.Height=='2'" |
| | | :data-index="index" :data-iindex="iindex" style="height:60px;" |
| | | :style="{'width':attr.Width}" :disabled="attr.edit?false:true"></textarea> |
| | | <textarea :value="attr.Value" @focus="ontap" @blur="onevent" v-else-if="attr.Height=='3'" |
| | | <textarea :value="attr.Value" :focus="focusField == `${index}-${iindex}`" @focus="ontap" |
| | | @click="onClick(index,iindex)" @blur="onevent" v-else-if="attr.Height=='3'" |
| | | :data-index="index" :data-iindex="iindex" style="height:90px;" |
| | | :style="{'width':attr.Width}" :disabled="attr.edit?false:true"></textarea> |
| | | <!-- </div> --> |
| | |
| | | <image class="divX" src="../../images/msg_50_new.png"></image> --> |
| | | <input |
| | | :type="attr.Type=='整数' || attr.Type=='浮点数' || attr.Type=='int' || attr.Type=='float' ?'number':'text'" |
| | | class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent" |
| | | v-if="attr.Height=='1'" :data-index="index" :data-iindex="iindex" |
| | | class="attr_field" :value="attr.Value" :focus="focusField ==`${index}-${iindex}`" |
| | | @focus="ontap" @blur="onevent" @click="onClick(index,iindex)" v-if="attr.Height=='1'" |
| | | :data-index="index" :data-iindex="iindex" |
| | | :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - (attr.ext_button==true?9:0) +'%'}" |
| | | :disabled="attr.edit?false:true"> |
| | | <textarea class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent" |
| | | <textarea class="attr_field" :value="attr.Value" :focus="focusField == `${index}-${iindex}`" |
| | | @focus="ontap" @blur="onevent" @click="onClick(index,iindex)" |
| | | v-else-if="attr.Height=='2'" :data-index="index" :data-iindex="iindex" |
| | | style="height:60px;" |
| | | :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - (attr.ext_button==true?9:0) +'%'}" |
| | | :disabled="attr.edit?false:true"></textarea> |
| | | <textarea class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent" |
| | | <textarea class="attr_field" :value="attr.Value" :focus="focusField == `${index}-${iindex}`" |
| | | @focus="ontap" @blur="onevent" @click="onClick(index,iindex)" |
| | | v-else-if="attr.Height=='3'" :data-index="index" :data-iindex="iindex" |
| | | style="height:90px;" |
| | | :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - (attr.ext_button==true?9:0) +'%'}" |
| | |
| | | <a class="class_attr_add_ref"><i class="ace-icon fa fa-plus-circle"></i></a> |
| | | </div> |
| | | <input type="text" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" |
| | | disabled="true"> |
| | | disabled="true" :maxlength="-1"> |
| | | </view> |
| | | <view v-if="classattr.control_style=='左右布局'"> |
| | | <p class="tx_title2" |
| | |
| | | </p> |
| | | <input type="text" class="attr_field" :data-index="index" :data-iindex="iindex" |
| | | :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - 9 +'%'}" |
| | | disabled="true"> |
| | | disabled="true" :maxlength="-1"> |
| | | <div class="text-right2" v-if="attr.Type=='引用对象(单个)'|| attr.Type=='obj-ref'"> |
| | | <a @tap="classAttr_AddRef" :data-classid="attr.RelCls.split('|')[0]" |
| | | :data-classname="attr.RelCls.split('|')[1]"><i |
| | |
| | | <a class="class_attr_add_per" @tap="classAttr_AddPer(index,iindex)"><i |
| | | class="ace-icon fa fa-plus-circle"></i></a> |
| | | </div> |
| | | <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true"> |
| | | <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true" |
| | | :maxlength="-1"> |
| | | </view> |
| | | <view v-if="classattr.control_style=='左右布局'"> |
| | | <p class="tx_title2" |
| | |
| | | </p> |
| | | <input type="text" class="attr_field" :value="attr.Value" |
| | | :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) - 9 +'%'}" |
| | | disabled="true"> |
| | | disabled="true" :maxlength="-1"> |
| | | <div class="text-right2"> |
| | | <a class="class_attr_add_per" @tap="classAttr_AddPer(index,iindex)"><i |
| | | class="ace-icon fa fa-plus-circle"></i></a> |
| | |
| | | <a href="#" class="class_attr_add_prj" @tap="classAttr_AddPrj(index,iindex)"><i |
| | | class="ace-icon fa fa-plus-circle"></i></a> |
| | | </div> |
| | | <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true"> |
| | | <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true" |
| | | :maxlength="-1"> |
| | | </view> |
| | | <view v-if="classattr.control_style=='左右布局'"> |
| | | <p class="tx_title2" |
| | |
| | | </p> |
| | | <input type="text" class="attr_field" :value="attr.Value" |
| | | :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true ?10:5) - 9 +'%'}" |
| | | disabled="true"> |
| | | disabled="true" :maxlength="-1"> |
| | | <div class="text-right2"> |
| | | <a class="class_attr_add_prj" @tap="classAttr_AddPrj(index,iindex)"><i |
| | | class="ace-icon fa fa-plus-circle"></i></a> |
| | |
| | | :style="{'font-family':classattr.Font.Name?classattr.Font.Name:'initial','font-size':classattr.Font.Size?classattr.Font.Size:'initial','font-weight':classattr.Font.Bold?'bold':'initial','font-style':classattr.Font.Tilt?'italic':'initial','text-decoration':classattr.Font.Underline?'underline':'initial','background-color':classattr.Font.Bk_Color,'color':classattr.Font.Text_Color,'width':classattr.title_p_wdith+'%'}"><i |
| | | class="i_tishi" v-if="attr.notempty==true">*</i>{{attr.DispName}}:</text> |
| | | <input type="text" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" |
| | | :disabled="attr.edit?false:true"> |
| | | :disabled="attr.edit?false:true" :maxlength="-1"> |
| | | </view> |
| | | <view v-if="classattr.control_style=='左右布局'"> |
| | | <p class="tx_title2" |
| | |
| | | </p> |
| | | <input type="text" class="attr_field" :data-index="index" :data-iindex="iindex" |
| | | :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true ?10:5) +'%'}" |
| | | :disabled="attr.edit?false:true"> |
| | | :disabled="attr.edit?false:true" :maxlength="-1"> |
| | | <i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i> |
| | | </view> |
| | | </view> |
| | |
| | | <!-- 左右布局 --> |
| | | <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)+'%;'"> |
| | | :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)+'%;'" |
| | | :maxlength="-1"> |
| | | <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> |
| | |
| | | <script> |
| | | import pickerAddress from '../../js/pickerAddress/pickerAddress.vue' |
| | | import utils from "@/js/utils.js" |
| | | import { |
| | | classAttrList, |
| | | classGridStyleInfo, |
| | | dataObjAdd, |
| | | dataObjDelele, |
| | | dataObjRunCustomEvent |
| | | } from "@/api/index.js" |
| | | |
| | | export default { |
| | | components: { |
| | | pickerAddress |
| | |
| | | return { |
| | | title: '新增', |
| | | param: {}, |
| | | focusField: "", |
| | | focusOldField: "", |
| | | classAttrList: [], |
| | | classGridStyle: [], |
| | | edit_inital_event: "", //弹窗初始化事件ID |
| | |
| | | title: options.titlename |
| | | }); //设置顶部标题 |
| | | var param = JSON.parse(options.param); |
| | | this.$data.title = param.Add_BtnName ? param.Add_BtnName : options.titlename; //设置按钮文字 |
| | | this.title = param.Add_BtnName ? param.Add_BtnName : options.titlename; //设置按钮文字 |
| | | console.log(param); |
| | | if (!param.Master_Cls.View_Style) { |
| | | uni.showModal({ |
| | |
| | | }); |
| | | return; |
| | | } |
| | | this.$data.param = param; |
| | | this.param = param; |
| | | // var edit_dlg = { |
| | | // Model: param.EditDlgMode, |
| | | // Name: param.Master_Cls.View_Style.Name |
| | | // } |
| | | //主数据类获取 |
| | | var dataInfo = { |
| | | class_id: param.Master_Cls.ID |
| | | }; |
| | | var $this = this; |
| | | $this.$store.state.thisareaFuncID = param.Master_Cls.ID; |
| | | // console.log($this.$store.getters.getclassAttrList); |
| | | if ($this.$store.getters.getclassAttrList) { |
| | | $this.$data.classAttrList = $this.$store.getters.getclassAttrList.data; |
| | | $this.classGridStyleInfo(param.Master_Cls.ID, $this.$data.param.Master_Cls.View_Style.Name, 'Mast'); |
| | | } else { |
| | | $this.$store.dispatch('classAttrList', dataInfo).then(success => { |
| | | // console.log(success); |
| | | if (success.code == '00000') { |
| | | $this.$data.classAttrList = success.data; |
| | | this.loadData() |
| | | |
| | | $this.classGridStyleInfo(param.Master_Cls.ID, $this.$data.param.Master_Cls.View_Style.Name, |
| | | 'Mast'); |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误1", |
| | | content: success.msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | uni.showModal({ |
| | | title: "错误1.1", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | //从数据类获取 |
| | | var subdataInfo = { |
| | | class_id: param.Sub_Cls.ID |
| | | }; |
| | | $this.$store.state.thisareaFuncSubID = param.Sub_Cls.ID; |
| | | if ($this.$store.getters.getSubClassAttrList) { |
| | | $this.$data.subClassAttrList = $this.$store.getters.getSubClassAttrList.data; |
| | | $this.classGridStyleInfo(param.Sub_Cls.ID, $this.$data.param.Sub_Cls.View_Style.Name, 'Sub'); |
| | | } else { |
| | | $this.$store.dispatch('subClassAttrList', subdataInfo).then(success => { |
| | | // console.log(success); |
| | | if (success.code == '00000') { |
| | | $this.$data.subClassAttrList = success.data; |
| | | |
| | | $this.classGridStyleInfo(param.Sub_Cls.ID, $this.$data.param.Sub_Cls.View_Style.Name, |
| | | 'Sub'); |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误1_1", |
| | | content: success.msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | uni.showModal({ |
| | | title: "错误1_1.1", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | }); |
| | | } |
| | | }, |
| | | methods: { |
| | | setData(obj) { |
| | | let that = this; |
| | | let keys = []; |
| | | let val, data; |
| | | |
| | | Object.keys(obj).forEach(function(key) { |
| | | keys = key.split("."); |
| | | val = obj[key]; |
| | | data = that.$data; |
| | | keys.forEach(function(key2, index) { |
| | | if (index + 1 == keys.length) { |
| | | that.$set(data, key2, val); |
| | | } else { |
| | | if (!data[key2]) { |
| | | that.$set(data, key2, {}); |
| | | } |
| | | } |
| | | data = data[key2]; |
| | | }); |
| | | }); |
| | | }, |
| | | async loadData() { |
| | | try { |
| | | const param = this.param |
| | | |
| | | this.classAttrList = await this.classAttrGetList(param.Master_Cls?.ID) |
| | | this.classGridStyle = await this.classGridStyleInfo(param.Master_Cls?.ID, param.Master_Cls |
| | | ?.View_Style?.Name) |
| | | this.class_attr_init(); |
| | | |
| | | |
| | | this.subClassAttrList = await this.classAttrGetList(param.Sub_Cls?.ID) |
| | | this.subClassGridStyle = await this.classGridStyleInfo(param.Sub_Cls?.ID, param.Sub_Cls |
| | | ?.View_Style |
| | | ?.Name) |
| | | this.subClass_attr_init(); |
| | | |
| | | } catch (ex) { |
| | | console.log(ex) |
| | | uni.showModal({ |
| | | title: "错误1", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | }, |
| | | scan_classAttr_extButton(e) { //选择按钮前 |
| | | var $this = this; |
| | | var Before_Select_Event = $this.$data.param.Scan_Code.Before_Select_Event; |
| | | var Before_Select_Event = $this.param.Scan_Code.Before_Select_Event; |
| | | if (!Before_Select_Event) { |
| | | uni.showModal({ |
| | | title: "提示", |
| | |
| | | return; |
| | | } |
| | | var mast_attr = []; |
| | | var attrlist = this.$data.classAttrList; |
| | | var attrlist = this.classAttrList; |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | | var attr = attrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | |
| | | } |
| | | |
| | | var objects = []; |
| | | var subPanelList = $this.$data.subPanelList; |
| | | var subPanelList = $this.subPanelList; |
| | | for (var s = 0; s < subPanelList.length; s++) { |
| | | var sub_req = []; |
| | | for (var i = 0; i < subPanelList[s].subClassAttr.length; i++) { |
| | |
| | | } |
| | | var enviroment = { |
| | | 'function': '3000', // 功能点编号 |
| | | cls_id: 'MBOX', //this.$data.param.Sub_Cls.ID, // 功能点从数据类标识 |
| | | cls_id: 'MBOX', //this.param.Sub_Cls.ID, // 功能点从数据类标识 |
| | | 'button': 'top', // top/bottom |
| | | button_name: '新增', |
| | | edit_dlg: { |
| | | type: 'small', //小窗口 |
| | | class_id: 'MBOX', //this.$data.param.Sub_Cls.ID,//当前数据类id |
| | | class_id: 'MBOX', //this.param.Sub_Cls.ID,//当前数据类id |
| | | }, |
| | | master_cls: { |
| | | cls_name: 'MBOX', //$this.$data.param.Master_Cls.Name, |
| | | cls_name: 'MBOX', //$this.param.Master_Cls.Name, |
| | | obj_attrs: req |
| | | }, |
| | | sub_cls: { |
| | | cls_name: 'MBOX', //$this.$data.param.Sub_Cls.Name, |
| | | cls_name: 'MBOX', //$this.param.Sub_Cls.Name, |
| | | objects: objects |
| | | } |
| | | |
| | | }; |
| | | var req = []; |
| | | // var subPanelList = $this.$data.subPanelList; |
| | | // var subPanelList = $this.subPanelList; |
| | | // for (var s = 0; s < subPanelList.length; s++) { |
| | | // var json = {}; |
| | | // for (var i = 0; i < subPanelList[s].subClassAttr.length; i++) { |
| | |
| | | rclsid: '', |
| | | robjid: '', |
| | | userlogin: '', |
| | | clsid: 'MBOX', //this.$data.param.Sub_Cls.ID, |
| | | clsid: 'MBOX', //this.param.Sub_Cls.ID, |
| | | objid: "", |
| | | attr: [], |
| | | global_attr: req, |
| | |
| | | // console.log(e.target.dataset); |
| | | var index = e.target.dataset.index; |
| | | var ischeck = e.target.dataset.ischeck; |
| | | var data = this.$data.check_list.items; |
| | | // this.$data.check_list.items=[]; |
| | | if (this.$data.check_list.multiple_choice == "0") { //判断时单选还是多选 |
| | | var data = this.check_list.items; |
| | | // this.check_list.items=[]; |
| | | if (this.check_list.multiple_choice == "0") { //判断时单选还是多选 |
| | | for (var i in data) { |
| | | data[i].check = false; |
| | | } |
| | | } |
| | | data[index].check = ischeck ? false : true; |
| | | this.$data.check_list.items = data; |
| | | this.check_list.items = data; |
| | | |
| | | }, |
| | | popup_cancel(e) { //弹框取消 |
| | |
| | | }, |
| | | popup_sava(e) { //弹框确定 选择按钮后 |
| | | var $this = this; |
| | | var After_Select_Event = $this.$data.param.Scan_Code.After_Select_Event; |
| | | var After_Select_Event = $this.param.Scan_Code.After_Select_Event; |
| | | if (!After_Select_Event) { |
| | | uni.showModal({ |
| | | title: "提示", |
| | |
| | | }); |
| | | return; |
| | | } |
| | | var items = $this.$data.check_list.items; |
| | | var items = $this.check_list.items; |
| | | var data = []; |
| | | var name = ""; |
| | | for (var i = 0; i < items.length; i++) { |
| | |
| | | return; |
| | | } |
| | | var mast_attr = []; |
| | | var attrlist = this.$data.classAttrList; |
| | | var attrlist = this.classAttrList; |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | | var attr = attrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | |
| | | } |
| | | } |
| | | |
| | | $this.$data.scanCodeVal = name; |
| | | $this.scanCodeVal = name; |
| | | var info = { |
| | | eventid: After_Select_Event.ID, |
| | | edtype: "7", |
| | |
| | | }, |
| | | panel_del(index) { |
| | | var $this = this; |
| | | if (this.$data.subPanelList[index].scanCodeVal == this.$data.scanCodeVal) { |
| | | this.$data.scanCodeVal = ''; |
| | | if (this.subPanelList[index].scanCodeVal == this.scanCodeVal) { |
| | | this.scanCodeVal = ''; |
| | | } |
| | | if (!this.$data.subPanelList[index].ObjID) |
| | | this.$data.subPanelList.splice(index, 1); |
| | | if (!this.subPanelList[index].ObjID) |
| | | this.subPanelList.splice(index, 1); |
| | | else { |
| | | var dataInfo = { |
| | | clsId: this.$data.param.Sub_Cls.ID, |
| | | objId: this.$data.subPanelList[index].ObjID |
| | | clsId: this.param.Sub_Cls.ID, |
| | | objId: this.subPanelList[index].ObjID |
| | | }; |
| | | console.log(dataInfo); |
| | | // return; |
| | | uni.showLoading({ |
| | | title: "加载中..." |
| | | }); |
| | | this.$store.dispatch('DelObj', dataInfo).then(success => { |
| | | console.log(success); |
| | | dataObjDelele(dataInfo).then(success => { |
| | | uni.hideLoading(); |
| | | if (success.code == '00000') { |
| | | $this.$data.subPanelList.splice(index, 1); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "删除成功!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误9", |
| | | content: success.msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | $this.subPanelList.splice(index, 1); |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: "删除成功!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | |
| | | }).catch(ex => { |
| | | console.log(ex); |
| | | uni.hideLoading(); |
| | |
| | | }); |
| | | } |
| | | }, |
| | | async classGridStyleInfo(clsid, styleName, clsType) { |
| | | var $this = this; |
| | | var gridstyleInfo = { |
| | | class_id: clsid, |
| | | name: styleName, |
| | | type: '2' |
| | | async classAttrGetList(clsid) { |
| | | try { |
| | | |
| | | var $this = this; |
| | | var dataInfo = { |
| | | class_id: clsid, |
| | | }; |
| | | const result = await classAttrList(dataInfo) || [] |
| | | console.log("classAttrGetList", result) |
| | | return result |
| | | } catch (ex) { |
| | | // console.log(ex); |
| | | let exStr = JSON.stringify(ex) |
| | | if (exStr == "{}") |
| | | exStr = ex |
| | | let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr |
| | | uni.showModal({ |
| | | title: "错误1.1", |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | return [] |
| | | }; |
| | | // 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 { |
| | | //console.log(gridstyleInfo); |
| | | $this.$store.dispatch('classGridStyleInfo', gridstyleInfo).then(success => { |
| | | // console.log(success); |
| | | |
| | | if (success.code == '00000') { |
| | | |
| | | success.data.StyleDef = JSON.parse(success.data.StyleDef); |
| | | $this.$data.classGridStyle = success.data; |
| | | |
| | | $this.class_attr_init(); |
| | | |
| | | |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误1.2", |
| | | content: success.msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | }).catch(ex => { |
| | | console.log(ex); |
| | | uni.showModal({ |
| | | title: "错误1.3", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | }); |
| | | } |
| | | } 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(); |
| | | } else { |
| | | //console.log(gridstyleInfo); |
| | | |
| | | $this.$store.dispatch('subClassGridStyleInfo', gridstyleInfo).then(success => { |
| | | // console.log(success); |
| | | if (success.code == '00000') { |
| | | |
| | | success.data.StyleDef = JSON.parse(success.data.StyleDef); |
| | | $this.$data.subClassGridStyle = success.data; |
| | | |
| | | $this.subClass_attr_init(); |
| | | |
| | | |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误1.2", |
| | | content: success.msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | }).catch(ex => { |
| | | console.log(ex); |
| | | uni.showModal({ |
| | | title: "错误1.3", |
| | | content: ex.errMsg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | |
| | | async classGridStyleInfo(clsid, styleName) { |
| | | try { |
| | | |
| | | var $this = this; |
| | | var gridstyleInfo = { |
| | | class_id: clsid, |
| | | name: styleName, |
| | | type: '2' |
| | | }; |
| | | const result = await classGridStyleInfo(gridstyleInfo) |
| | | result.StyleDef = JSON.parse(result.StyleDef); |
| | | return result |
| | | |
| | | } catch (ex) { |
| | | // console.log(ex); |
| | | let exStr = JSON.stringify(ex) |
| | | if (exStr == "{}") |
| | | exStr = ex |
| | | let tip = typeof ex.errMsg == "string" ? ex.errMsg : exStr |
| | | uni.showModal({ |
| | | title: "错误1.2", |
| | | content: tip, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | return {} |
| | | }; |
| | | }, |
| | | |
| | | onClick(index, iindex) { |
| | | this.focusField = `${index}-${iindex}` |
| | | console.log("onClick", this.focusField) |
| | | }, |
| | | |
| | | ontap(e) { //扫码功能 |
| | | //console.log(e.target) |
| | | this.focusOldField = `${e.target.dataset['index']}-${e.target.dataset['iindex']}` |
| | | getApp().onScan((result) => { |
| | | //console.log(result.decodedata); |
| | | var isVal = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | var isVal = this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']].Value; |
| | | // if(!isVal){ |
| | | // this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=result.decodedata; |
| | | // var isVald =this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value; |
| | | // this.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=result.decodedata; |
| | | // var isVald =this.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value; |
| | | // return; |
| | | // } |
| | | //主数据类扫码查询数据 |
| | | if (isVal != result.decodedata) { |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']] |
| | | this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']] |
| | | .Value = result.decodedata; |
| | | uni.hideKeyboard(); |
| | | //子数据类扫码区事件脚本 |
| | | var eventid = this.$data.param.Scan_Code.Input_Change_Event.ID; |
| | | var eventid = this.param.Scan_Code.Input_Change_Event.ID; |
| | | if (eventid) { |
| | | var req = []; |
| | | var attrlist = this.$data.classAttrList; //主数据类属性 |
| | | var attrlist = this.classAttrList; //主数据类属性 |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | | var attr = attrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | |
| | | rclsid: '', |
| | | robjid: '', |
| | | userlogin: '', |
| | | clsid: 'MBOX', //this.$data.param.Sub_Cls.ID, |
| | | clsid: 'MBOX', //this.param.Sub_Cls.ID, |
| | | objid: "", |
| | | attr: req, |
| | | mast_attr: req, |
| | |
| | | |
| | | this.scan_DataObjRunCustomEvent(info, ""); |
| | | } |
| | | if (result.decodedata) { //第一个输入框不为空 |
| | | //初始化,下个输入框focus属性 |
| | | const attrs = this.classAttrList[e.target.dataset['index']].Attr || [] |
| | | var findd = false |
| | | for (let i = e.target.dataset['iindex'] + 1; i < attrs.length; i++) { |
| | | const ele = attrs[i] |
| | | |
| | | if (ele.hidden != true) { |
| | | if (utils.classUtils.attrTypeIsString(ele.Type) || utils.classUtils |
| | | .attrTypeIsInt(ele.Type)) { |
| | | const field = `${e.target.dataset['index']}-${i}` |
| | | if (this |
| | | .focusOldField == |
| | | field) { |
| | | this.setData({ |
| | | focusField: "" |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | focusField: this |
| | | .focusOldField |
| | | }) |
| | | } |
| | | this.$nextTick(() => { |
| | | this.setData({ |
| | | focusField: field |
| | | }) |
| | | }); |
| | | findd = true |
| | | break |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | if (findd) { |
| | | return |
| | | } |
| | | for (let i = e.target.dataset['index'] + 1; i < this.classAttrList.length; i++) { |
| | | const attrs2 = this.classAttrList[i].Attr || [] |
| | | for (let ii in attrs2) { |
| | | const ele = attrs2[ii] |
| | | if (ele.hidden != true) { |
| | | if (utils.classUtils.attrTypeIsString(ele.Type) || utils.classUtils |
| | | .attrTypeIsInt(ele.Type)) { |
| | | const field = `${i}-${ii}` |
| | | if (this |
| | | .focusOldField == |
| | | field) { |
| | | this.setData({ |
| | | focusField: "" |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | focusField: this |
| | | .focusOldField |
| | | }) |
| | | } |
| | | this.$nextTick(() => { |
| | | this.setData({ |
| | | focusField: field |
| | | }) |
| | | }); |
| | | break |
| | | } |
| | | } |
| | | } |
| | | if (findd) { |
| | | break |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | subontap(e) { //扫码功能 |
| | | //console.log(e.target) |
| | | getApp().onScan((result) => { |
| | | //console.log(result.decodedata); |
| | | var isVal = this.$data.subClassAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']].Value; |
| | | var isVal = this.subClassAttrList[e.target.dataset['index']].Attr[e.target |
| | | .dataset[ |
| | | 'iindex']].Value; |
| | | //主数据类扫码查询数据 |
| | | if (isVal != result.decodedata) { |
| | | this.$data.subClassAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']] |
| | | this.subClassAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']] |
| | | .Value = result.decodedata; |
| | | uni.hideKeyboard(); |
| | | //子数据类扫码区事件脚本 |
| | | var eventid = this.$data.param.Scan_Code.Input_Change_Event.ID; |
| | | var eventid = this.param.Scan_Code.Input_Change_Event.ID; |
| | | if (eventid) { |
| | | var req = []; |
| | | var attrlist = this.$data.subClassAttrList; //主数据类属性 |
| | | var attrlist = this.subClassAttrList; //主数据类属性 |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | | var attr = attrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | |
| | | rclsid: '', |
| | | robjid: '', |
| | | userlogin: '', |
| | | clsid: 'MBOX', //this.$data.param.Sub_Cls.ID, |
| | | clsid: 'MBOX', //this.param.Sub_Cls.ID, |
| | | objid: "", |
| | | attr: req, |
| | | mast_attr: [], |
| | |
| | | getApp().onScan((result) => { |
| | | console.log(result.decodedata); |
| | | var isflag = true; |
| | | for (var i in this.$data.subPanelList) { |
| | | if (this.$data.subPanelList[i].scanCodeVal == result.decodedata) |
| | | for (var i in this.subPanelList) { |
| | | if (this.subPanelList[i].scanCodeVal == result.decodedata) |
| | | isflag = false; |
| | | } |
| | | //子数据类扫码查询数据 |
| | | if (isflag) { |
| | | uni.hideKeyboard(); |
| | | this.$data.scanCodeVal = result.decodedata; |
| | | var eventid = this.$data.param.Scan_Code.Input_Change_Event.ID; |
| | | this.scanCodeVal = result.decodedata; |
| | | var eventid = this.param.Scan_Code.Input_Change_Event.ID; |
| | | if (eventid) { |
| | | var mast_req = []; |
| | | //主数据类属性 |
| | | var classattrlist = this.$data.classAttrList; |
| | | var classattrlist = this.classAttrList; |
| | | for (var i = 0; i < classattrlist.length; i++) { |
| | | var attr = classattrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | |
| | | } |
| | | var req = []; |
| | | //子数据类属性 |
| | | var attrlist = this.$data.subClassAttrList; |
| | | var attrlist = this.subClassAttrList; |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | | var attr = attrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | |
| | | rclsid: '', |
| | | robjid: '', |
| | | userlogin: '', |
| | | clsid: 'MBOX', //this.$data.param.Sub_Cls.ID, |
| | | clsid: 'MBOX', //this.param.Sub_Cls.ID, |
| | | objid: "", |
| | | attr: req, |
| | | mast_attr: mast_req, |
| | | inputParamter: [{ |
| | | attr: 'input_3037', |
| | | value: this.$data.scanCodeVal |
| | | value: this.scanCodeVal |
| | | }] |
| | | } |
| | | |
| | |
| | | }, |
| | | scan_onevent(e) { |
| | | // console.log(e.target); |
| | | if (e.target.value) { |
| | | if (e.detail.value) { |
| | | var isflag = true; |
| | | for (var i in this.$data.subPanelList) { |
| | | if (this.$data.subPanelList[i].scanCodeVal == e.target.value) |
| | | for (var i in this.subPanelList) { |
| | | if (this.subPanelList[i].scanCodeVal == e.detail.value) |
| | | isflag = false; |
| | | } |
| | | //子数据类扫码查询数据 |
| | | if (isflag) { |
| | | uni.hideKeyboard(); |
| | | this.$data.scanCodeVal = e.target.value; |
| | | var eventid = this.$data.param.Scan_Code.Input_Change_Event.ID; |
| | | this.scanCodeVal = e.detail.value; |
| | | var eventid = this.param.Scan_Code.Input_Change_Event.ID; |
| | | if (eventid) { |
| | | var mast_req = []; |
| | | //主数据类属性 |
| | | var classattrlist = this.$data.classAttrList; |
| | | var classattrlist = this.classAttrList; |
| | | for (var i = 0; i < classattrlist.length; i++) { |
| | | var attr = classattrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | |
| | | } |
| | | var req = []; |
| | | //子数据类属性 |
| | | var attrlist = this.$data.subClassAttrList; |
| | | var attrlist = this.subClassAttrList; |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | | var attr = attrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | |
| | | rclsid: '', |
| | | robjid: '', |
| | | userlogin: '', |
| | | clsid: 'MBOX', //this.$data.param.Sub_Cls.ID, |
| | | clsid: 'MBOX', //this.param.Sub_Cls.ID, |
| | | objid: "", |
| | | attr: req, |
| | | mast_attr: mast_req, |
| | | inputParamter: [{ |
| | | attr: 'input_3037', |
| | | value: this.$data.scanCodeVal |
| | | value: this.scanCodeVal |
| | | }] |
| | | } |
| | | |
| | |
| | | }, |
| | | onarrow(index, open) { |
| | | // console.log(index+'--'+open); |
| | | var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Open; |
| | | var data_attr = this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']].Open; |
| | | if (!data_attr) { |
| | | this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e |
| | | .target.dataset['iindex']].Value = open == true ? false : true; |
| | | this.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']] |
| | | .Attr[e |
| | | .target.dataset['iindex']].Value = open == true ? false : true; |
| | | return; |
| | | } |
| | | this.$data.classAttrList[e.target.dataset['iiindex']].subClassAttr[index].Open = open == true ? false : |
| | | this.classAttrList[e.target.dataset['iiindex']].subClassAttr[index].Open = open == true ? |
| | | false : |
| | | true; |
| | | }, |
| | | ondateTime(e) { |
| | | //console.log(e.target) |
| | | var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value; |
| | | var data_attr = this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']].Value; |
| | | if (!data_attr) { |
| | | this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e |
| | | .target.dataset['iindex']].Value = e.target.value; |
| | | this.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']] |
| | | .Attr[e |
| | | .target.dataset['iindex']].Value = e.detail.value; |
| | | return; |
| | | } |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = e.target |
| | | this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = e |
| | | .target |
| | | .value; |
| | | |
| | | }, |
| | | onchange(e) { |
| | | console.log(e.target); |
| | | var value = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].dictitem[e |
| | | .target.value]; |
| | | var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']]; |
| | | var value = this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']] |
| | | .dictitem[e |
| | | .detail.value]; |
| | | var data_attr = this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']]; |
| | | console.log(data_attr); |
| | | if (value.Name != data_attr.Value) { |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = value |
| | | this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = |
| | | value |
| | | .Name; |
| | | console.log(this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']] |
| | | console.log(this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']] |
| | | .Value); |
| | | var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']] |
| | | var eventid = this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']] |
| | | .action; |
| | | if (eventid) { |
| | | // self.event_no_sub = 1; |
| | | var req = []; |
| | | var attrlist = this.$data.classAttrList; |
| | | var attrlist = this.classAttrList; |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | | var attr = attrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | |
| | | rclsid: '', |
| | | robjid: '', |
| | | userlogin: '', |
| | | clsid: this.$data.param.Master_Cls.ID, |
| | | clsid: this.param.Master_Cls.ID, |
| | | objid: "", |
| | | attr: req, |
| | | } |
| | |
| | | // console.log(delvalue); |
| | | if (item.length == 0) { //为空时,清空属性value |
| | | var index, iindex, dindex = 0; |
| | | for (var i in this.$data.classAttrList) { |
| | | for (var j in this.$data.classAttrList[i].Attr) { |
| | | if (delvalue[0].attr == this.$data.classAttrList[i].Attr[j].Name) { |
| | | this.$data.classAttrList[i].Attr[j].Value = ""; |
| | | for (var i in this.classAttrList) { |
| | | for (var j in this.classAttrList[i].Attr) { |
| | | if (delvalue[0].attr == this.classAttrList[i].Attr[j].Name) { |
| | | this.classAttrList[i].Attr[j].Value = ""; |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | for (var v in item) { |
| | | var index, iindex, dindex = 0; |
| | | for (var i in this.$data.classAttrList) { |
| | | for (var j in this.$data.classAttrList[i].Attr) { |
| | | if (item[v].attr == this.$data.classAttrList[i].Attr[j].Name) { |
| | | for (var i in this.classAttrList) { |
| | | for (var j in this.classAttrList[i].Attr) { |
| | | if (item[v].attr == this.classAttrList[i].Attr[j].Name) { |
| | | index = i; |
| | | iindex = j; |
| | | } |
| | | } |
| | | } |
| | | var itemvalue = item[v]; |
| | | var data_attr = this.$data.classAttrList[index].Attr[iindex]; |
| | | var data_attr = this.classAttrList[index].Attr[iindex]; |
| | | |
| | | console.log(data_attr); |
| | | if (itemvalue.Name != data_attr.Value) { |
| | | this.$data.classAttrList[index].Attr[iindex].Value = value; |
| | | console.log(this.$data.classAttrList[index].Attr[iindex].Value); |
| | | var eventid = this.$data.classAttrList[index].Attr[iindex].action; |
| | | this.classAttrList[index].Attr[iindex].Value = value; |
| | | console.log(this.classAttrList[index].Attr[iindex].Value); |
| | | var eventid = this.classAttrList[index].Attr[iindex].action; |
| | | if (eventid) { |
| | | // self.event_no_sub = 1; |
| | | var req = []; |
| | | var attrlist = this.$data.classAttrList; |
| | | var attrlist = this.classAttrList; |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | | var attr = attrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | |
| | | rclsid: '', |
| | | robjid: '', |
| | | userlogin: '', |
| | | clsid: this.$data.param.Master_Cls.ID, |
| | | clsid: this.param.Master_Cls.ID, |
| | | objid: "", |
| | | attr: req, |
| | | } |
| | |
| | | }, |
| | | sub_onchange(e) { |
| | | console.log(e.target); |
| | | var value = this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']] |
| | | .Attr[e.target.dataset['iindex']].dictitem[e.target.value]; |
| | | var data_attr = this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset[ |
| | | var value = this.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset[ |
| | | 'index']] |
| | | .Attr[e.target.dataset['iindex']].dictitem[e.detail.value]; |
| | | var data_attr = this.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset[ |
| | | 'index']].Attr[e.target.dataset['iindex']]; |
| | | console.log(data_attr); |
| | | if (value.Name != data_attr.Value) { |
| | | this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e |
| | | .target.dataset['iindex']].Value = value.Name; |
| | | console.log(this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset[ |
| | | this.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']] |
| | | .Attr[e |
| | | .target.dataset['iindex']].Value = value.Name; |
| | | console.log(this.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset[ |
| | | 'index']].Attr[e.target.dataset['iindex']].Value); |
| | | var eventid = this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset[ |
| | | 'index']].Attr[e.target.dataset['iindex']].action; |
| | | var eventid = this.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target |
| | | .dataset[ |
| | | 'index']].Attr[e.target.dataset['iindex']].action; |
| | | if (eventid) { |
| | | // self.event_no_sub = 1; |
| | | var req = []; |
| | | var attrlist = this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr; |
| | | var attrlist = this.subPanelList[e.target.dataset['iiindex']].subClassAttr; |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | | var attr = attrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | |
| | | rclsid: '', |
| | | robjid: '', |
| | | userlogin: '', |
| | | clsid: this.$data.param.Sub_Cls.ID, |
| | | clsid: this.param.Sub_Cls.ID, |
| | | objid: "", |
| | | attr: req, |
| | | } |
| | |
| | | // console.log(item); |
| | | // console.log(value); |
| | | // console.log(delvalue); |
| | | var subClassAttr = this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr; |
| | | var subClassAttr = this.subPanelList[e.target.dataset['iiindex']].subClassAttr; |
| | | if (item.length == 0) { //为空时,清空属性value |
| | | var index, iindex, dindex = 0; |
| | | for (var i in subClassAttr) { |
| | |
| | | rclsid: '', |
| | | robjid: '', |
| | | userlogin: '', |
| | | clsid: this.$data.param.Sub_Cls.ID, |
| | | clsid: this.param.Sub_Cls.ID, |
| | | objid: "", |
| | | attr: req, |
| | | } |
| | |
| | | }, |
| | | onevent(e) { |
| | | // console.log(e.target); |
| | | var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']]; |
| | | var data_attr = this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']]; |
| | | if (!data_attr) { |
| | | this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e |
| | | .target.dataset['iindex']].Value = e.target.value; |
| | | this.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']] |
| | | .Attr[e |
| | | .target.dataset['iindex']].Value = e.detail.value; |
| | | return; |
| | | } |
| | | // 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 |
| | | if (e.detail.value != data_attr.Value) { |
| | | this.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.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].action; |
| | | //子数据类扫码区事件脚本 |
| | | var eventid = this.$data.param.Scan_Code.Input_Change_Event.ID; |
| | | var eventid = this.param.Scan_Code.Input_Change_Event.ID; |
| | | if (eventid) { |
| | | // self.event_no_sub = 1; |
| | | var req = []; |
| | | var attrlist = this.$data.classAttrList; //主数据类属性 |
| | | var attrlist = this.classAttrList; //主数据类属性 |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | | var attr = attrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | |
| | | rclsid: '', |
| | | robjid: '', |
| | | userlogin: '', |
| | | clsid: 'MBOX', //this.$data.param.Sub_Cls.ID, |
| | | clsid: 'MBOX', //this.param.Sub_Cls.ID, |
| | | objid: "", |
| | | attr: req, |
| | | mast_attr: req, |
| | | inputParamter: [{ |
| | | attr: 'mast_input_3037', |
| | | value: e.target.value |
| | | value: e.detail.value |
| | | }] |
| | | } |
| | | |
| | |
| | | oncheck(e) { |
| | | // console.log(e.target); |
| | | var ischecked = e.target.dataset.ischeck ? false : true; |
| | | var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']]; |
| | | var data_attr = this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']]; |
| | | if (!data_attr) { |
| | | this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e |
| | | .target.dataset['iindex']].Value = ischecked; |
| | | this.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']] |
| | | .Attr[e |
| | | .target.dataset['iindex']].Value = ischecked; |
| | | return; |
| | | } |
| | | // console.log(data_attr); |
| | | if (ischecked != data_attr.Value) { |
| | | this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = ischecked; |
| | | var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']] |
| | | this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = |
| | | ischecked; |
| | | var eventid = this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[ |
| | | 'iindex']] |
| | | .action; |
| | | if (eventid) { |
| | | // self.event_no_sub = 1; |
| | | var req = []; |
| | | var attrlist = this.$data.classAttrList; |
| | | var attrlist = this.classAttrList; |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | | var attr = attrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | |
| | | rclsid: '', |
| | | robjid: '', |
| | | userlogin: '', |
| | | clsid: this.$data.param.Master_Cls.ID, |
| | | clsid: this.param.Master_Cls.ID, |
| | | objid: "", |
| | | attr: req, |
| | | } |
| | |
| | | }, |
| | | inputValListIsDel(index) { |
| | | // console.log(index); |
| | | this.$data.inputValList.splice(index, 1); //删除tabPagejson的内容 |
| | | // console.log(this.$data.inputValList); |
| | | this.inputValList.splice(index, 1); //删除tabPagejson的内容 |
| | | // console.log(this.inputValList); |
| | | }, |
| | | addresschange(e) { |
| | | // console.log(e.target); |
| | | console.log(e.data.join(';')) |
| | | this.$data.subClassAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = e.data |
| | | this.subClassAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = e |
| | | .data |
| | | .join(';'); |
| | | }, |
| | | classAttr_extButton(index, iindex) { |
| | | var $this = this; |
| | | var before_click_button = $this.$data.classAttrList[index].Attr[iindex].before_click_button; |
| | | var button_callback = $this.$data.classAttrList[index].Attr[iindex].button_callback; |
| | | var before_click_button = $this.classAttrList[index].Attr[iindex].before_click_button; |
| | | var button_callback = $this.classAttrList[index].Attr[iindex].button_callback; |
| | | if (!before_click_button) { |
| | | uni.showModal({ |
| | | title: "提示", |
| | |
| | | }); |
| | | return; |
| | | } |
| | | var data_attr = this.$data.classAttrList[index].Attr[iindex]; |
| | | var data_attr = this.classAttrList[index].Attr[iindex]; |
| | | this.DataObjRunCustomEvent_Return(before_click_button, data_attr, button_callback, index, iindex); |
| | | }, |
| | | classAttr_AddPer(index, iindex) { |
| | |
| | | AddPer(data, param) { |
| | | // console.log(param); |
| | | console.log(data); |
| | | $this.$data.classAttrList[param.index].Attr[param.iindex].Value = data[0].Name; |
| | | $this.$data.classAttrList[param.index].Attr[param.iindex].ValID = data[0].Login + ';' + |
| | | $this.classAttrList[param.index].Attr[param.iindex].Value = data[0].Name; |
| | | $this.classAttrList[param.index].Attr[param.iindex].ValID = data[0] |
| | | .Login + ';' + |
| | | data[0].Name; |
| | | |
| | | var eventid = $this.$data.classAttrList[param.index].Attr[param.iindex].action; |
| | | var eventid = $this.classAttrList[param.index].Attr[param.iindex].action; |
| | | if (eventid) { |
| | | eventid = eventid.trim(); |
| | | if (eventid) { |
| | |
| | | rclsid: "", |
| | | robjid: "", |
| | | userlogin: data[0].Login, |
| | | clsid: $this.$data.param.Master_Cls.ID, |
| | | clsid: $this.param.Master_Cls.ID, |
| | | objid: "", |
| | | attr: [], |
| | | } |
| | | |
| | | // var data_attr = $this.$data.classAttrList[param.index].Attr[param.iindex]; |
| | | // var data_attr = $this.classAttrList[param.index].Attr[param.iindex]; |
| | | $this.DataObjRunCustomEvent(info); |
| | | } |
| | | } |
| | |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | // var value=this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].RelCls[e.target.value]; |
| | | // this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=value; |
| | | // var value=this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].RelCls[e.detail.value]; |
| | | // this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=value; |
| | | }, |
| | | classAttr_AddPrj(index, iindex) { |
| | | var param = { |
| | |
| | | AddPer(data, param) { |
| | | // console.log(param); |
| | | // console.log(data); |
| | | $this.$data.classAttrList[param.index].Attr[param.iindex].Value = data[0].Name; |
| | | $this.$data.classAttrList[param.index].Attr[param.iindex].ValID = data[0].ID + ';' + |
| | | $this.classAttrList[param.index].Attr[param.iindex].Value = data[0].Name; |
| | | $this.classAttrList[param.index].Attr[param.iindex].ValID = data[0].ID + |
| | | ';' + |
| | | data[0].Name; |
| | | |
| | | var eventid = $this.$data.classAttrList[param.index].Attr[param.iindex].action; |
| | | var eventid = $this.classAttrList[param.index].Attr[param.iindex].action; |
| | | if (eventid) { |
| | | eventid = eventid.trim(); |
| | | if (eventid) { |
| | |
| | | rclsid: "", |
| | | robjid: "", |
| | | userlogin: "", |
| | | clsid: $this.$data.param.Master_Cls.ID, |
| | | clsid: $this.param.Master_Cls.ID, |
| | | objid: "", |
| | | attr: [], |
| | | } |
| | | |
| | | // var data_attr = $this.$data.classAttrList[param.index].Attr[param.iindex]; |
| | | // var data_attr = $this.classAttrList[param.index].Attr[param.iindex]; |
| | | $this.DataObjRunCustomEvent(info); |
| | | } |
| | | } |
| | |
| | | }); |
| | | }, |
| | | sava() { |
| | | if (this.$data.param.Before_OK_Event) //判断功能点参数是否有确定前脚本 |
| | | this.scan_OKDataObjRunCustomEvent(this.$data.param.Before_OK_Event.ID); |
| | | else if (this.$data.param.After_OK_Event) //判断功能点参数是否有确定后脚本 |
| | | this.scan_OKDataObjRunCustomEvent(this.$data.param.After_OK_Event.ID); |
| | | if (this.param.Before_OK_Event) //判断功能点参数是否有确定前脚本 |
| | | this.scan_OKDataObjRunCustomEvent(this.param.Before_OK_Event.ID); |
| | | else if (this.param.After_OK_Event) //判断功能点参数是否有确定后脚本 |
| | | this.scan_OKDataObjRunCustomEvent(this.param.After_OK_Event.ID); |
| | | else |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }); //返回层数,2则上上页 |
| | | }, |
| | | trigger() { |
| | | if (this.$data.param.Before_Trigger_Event) //判断功能点参数是否有触发前脚本 |
| | | this.scan_TriggerDataObjRunCustomEvent(this.$data.param.Before_Trigger_Event.ID); |
| | | else if (this.$data.param.After_Trigger_Event) //判断功能点参数是否有触发后脚本 |
| | | this.scan_TriggerDataObjRunCustomEvent(this.$data.param.After_Trigger_Event.ID); |
| | | if (this.param.Before_Trigger_Event) //判断功能点参数是否有触发前脚本 |
| | | this.scan_TriggerDataObjRunCustomEvent(this.param.Before_Trigger_Event.ID); |
| | | else if (this.param.After_Trigger_Event) //判断功能点参数是否有触发后脚本 |
| | | this.scan_TriggerDataObjRunCustomEvent(this.param.After_Trigger_Event.ID); |
| | | elsess |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | |
| | | mask: true |
| | | }); |
| | | var req = []; |
| | | var attrlist = this.$data.classAttrList; |
| | | var attrlist = this.classAttrList; |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | | var attr = attrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | |
| | | } |
| | | var enviroment = { |
| | | 'function': '3000', // 功能点编号 |
| | | cls_id: this.$data.param.Master_Cls.ID, // 功能点主数据类标识 |
| | | cls_id: this.param.Master_Cls.ID, // 功能点主数据类标识 |
| | | 'button': 'top', // top/bottom |
| | | button_name: '新增', |
| | | master: { |
| | | cls_id: this.$data.param.Master_Cls.ID, |
| | | cls_id: this.param.Master_Cls.ID, |
| | | } |
| | | }; |
| | | |
| | | var dataInfo = { |
| | | class_id: this.$data.param.Master_Cls.ID, |
| | | class_id: this.param.Master_Cls.ID, |
| | | data_obj_id: '', |
| | | masterclsid: '', |
| | | req: JSON.stringify(req), |
| | |
| | | |
| | | // return |
| | | console.log(dataInfo); |
| | | this.$store.dispatch('addclassattr', dataInfo).then(success => { |
| | | console.log(success); |
| | | dataObjAdd(dataInfo).then(data => { |
| | | console.log(data); |
| | | uni.hideLoading(); |
| | | if (success.code == '00000') { |
| | | var action = JSON.parse(success.data.Action); |
| | | if (action.ret == '0') { |
| | | if (action.result_type == '0') { |
| | | uni.showToast({ |
| | | title: action.result, |
| | | icon: "success", |
| | | duration: 3000 |
| | | }); |
| | | } |
| | | // "{"ret":0, "result_type":0, "result":"创建成功123123123","info":""}" |
| | | var action = JSON.parse(data.Action); |
| | | if (action.ret == '0') { |
| | | if (action.result_type == '0') { |
| | | uni.showToast({ |
| | | title: action.result, |
| | | icon: "success", |
| | | duration: 3000 |
| | | }); |
| | | } |
| | | //刷新 |
| | | // uni.redirectTo({ |
| | | // url: '../modal/ms_classAttr?param=' + JSON.stringify(this.$data.param) + |
| | | // "&titlename=" + this.$data.title |
| | | // }); |
| | | // // this.class_attr_init(); |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误", |
| | | content: success.msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | // "{"ret":0, "result_type":0, "result":"创建成功123123123","info":""}" |
| | | } |
| | | //刷新 |
| | | uni.redirectTo({ |
| | | url: '../modal/ms_classAttr?param=' + JSON.stringify(this.param) + |
| | | "&titlename=" + this.title |
| | | }); |
| | | // // this.class_attr_init(); |
| | | |
| | | }).catch(ex => { |
| | | console.log(ex); |
| | | uni.hideLoading(); |
| | |
| | | }); |
| | | }, |
| | | class_attr_init() { |
| | | const attrlist = this.$data.classGridStyle.StyleDef?.show_style || [] |
| | | const attrlist = this.classGridStyle.StyleDef?.show_style || [] |
| | | var newattrlist = []; |
| | | if (this.$data.classAttrList.length > 0) { |
| | | |
| | | if (this.classAttrList.length > 0) { |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | | var open = attrlist[i].open; |
| | | var name = attrlist[i].attrgroup_name; |
| | | var attrs = attrlist[i].attrs; |
| | | for (var s = 0; s < this.$data.classAttrList.length; s++) { |
| | | var clsattr = this.$data.classAttrList[s]; |
| | | |
| | | for (var s = 0; s < this.classAttrList.length; s++) { |
| | | var clsattr = this.classAttrList[s]; |
| | | |
| | | if (name == clsattr.Name) { |
| | | var attr = []; |
| | | for (var j = 0; j < attrs.length; j++) { |
| | |
| | | month: nowDate.getMonth() + 1, |
| | | day: nowDate.getDate() |
| | | } |
| | | ca.Value = date.year + '-' + (date.month >= 10 ? date.month : '0' + date |
| | | .month) + '-' + (date.day >= 10 ? date.day : '0' + date.day); |
| | | ca.Value = date.year + '-' + (date.month >= 10 ? date.month : '0' + |
| | | date |
| | | .month) + '-' + (date.day >= 10 ? date.day : '0' + date |
| | | .day); |
| | | } |
| | | if (utils.classUtils.attrTypeIsObjRefMulti(ca.Type)) { |
| | | var relClsList = []; |
| | |
| | | ca.Value = '请选择'; |
| | | if (utils.classUtils.attrTypeIsBool(ca.Type)) |
| | | ca.Value = false; |
| | | |
| | | if (ca.hidden != true) { |
| | | if (utils.classUtils.attrTypeIsString(ca.Type) || utils.classUtils |
| | | .attrTypeIsInt(ca.Type) || utils.classUtils.attrTypeIsFloat(ca |
| | | .Type)) { |
| | | if (this.focusField == "") { |
| | | this.setData({ |
| | | focusField: `${newattrlist.length}-${attr.length}` |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | attr.push(ca); |
| | | |
| | | } |
| | |
| | | Order: clsattr.Order, |
| | | Open: open, |
| | | Attr: attr, |
| | | control_style: this.$data.classGridStyle.StyleDef.control_style, |
| | | title_p_wdith: this.$data.classGridStyle.StyleDef.title_p_wdith, |
| | | Font: this.$data.classGridStyle.StyleDef.Font ? this.$data.classGridStyle |
| | | control_style: this.classGridStyle.StyleDef.control_style, |
| | | title_p_wdith: this.classGridStyle.StyleDef.title_p_wdith, |
| | | Font: this.classGridStyle.StyleDef.Font ? this.$data |
| | | .classGridStyle |
| | | .StyleDef.Font : {}, |
| | | Bk_Color: this.$data.classGridStyle.StyleDef.Bk_Color ? this.$data |
| | | Bk_Color: this.classGridStyle.StyleDef.Bk_Color ? this.$data |
| | | .classGridStyle.StyleDef.Bk_Color : '#FFFFFF', |
| | | Text_Color: this.$data.classGridStyle.StyleDef.Text_Color ? this.$data |
| | | Text_Color: this.classGridStyle.StyleDef.Text_Color ? this.$data |
| | | .classGridStyle.StyleDef.Text_Color : '#000000' |
| | | }) |
| | | } |
| | |
| | | } |
| | | } |
| | | if (newattrlist.length > 0) { |
| | | this.$data.classAttrList = newattrlist; |
| | | this.classAttrList = newattrlist; |
| | | } |
| | | var req = []; |
| | | |
| | |
| | | }); |
| | | } |
| | | } |
| | | var eventlist = this.$data.classGridStyle.StyleDef.event; |
| | | var eventlist = this.classGridStyle.StyleDef.event; |
| | | if (eventlist) { |
| | | if (eventlist.length > 0) { |
| | | for (var i = 0; i < eventlist.length; i++) { |
| | | if (eventlist[i].event_id == 'before_ok') { |
| | | this.$data.edit_ok_event = eventlist[i]; |
| | | this.edit_ok_event = eventlist[i]; |
| | | } else if (eventlist[i].event_id == 'initial') { |
| | | this.$data.edit_inital_event = eventlist[i]; |
| | | this.edit_inital_event = eventlist[i]; |
| | | } else if (eventlist[i].event_id == 'before_select_compose') { |
| | | this.$data.edit_select_compose_event = eventlist[i].scrip_id; |
| | | this.$data.edit_compose_cls_id = eventlist[i].compose_cls_id; |
| | | this.edit_select_compose_event = eventlist[i].scrip_id; |
| | | this.edit_compose_cls_id = eventlist[i].compose_cls_id; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // console.log(req); |
| | | if (this.$data.edit_inital_event) { |
| | | var eventid = this.$data.edit_inital_event.scrip_id; |
| | | if (this.edit_inital_event) { |
| | | var eventid = this.edit_inital_event.scrip_id; |
| | | var info = { |
| | | eventid: eventid, |
| | | edtype: "0", |
| | |
| | | rclsid: '', |
| | | robjid: '', |
| | | userlogin: '', |
| | | clsid: this.$data.param.Master_Cls.ID, |
| | | clsid: this.param.Master_Cls.ID, |
| | | objid: "", |
| | | attr: req, |
| | | } |
| | | this.ini_DataObjRunCustomEvent(info); |
| | | } |
| | | console.log(this.$data.classGridStyle); |
| | | console.log(this.$data.classAttrList); |
| | | // console.log(this.classGridStyle); |
| | | // console.log(this.classAttrList); |
| | | |
| | | } else { |
| | | uni.showModal({ |
| | |
| | | } |
| | | }, |
| | | subClass_attr_init() { |
| | | var attrlist = this.$data.subClassGridStyle.StyleDef.show_style |
| | | var attrlist = this.subClassGridStyle.StyleDef.show_style || [] |
| | | var newattrlist = []; |
| | | if (this.$data.subClassAttrList.length > 0) { |
| | | if (this.subClassAttrList.length > 0) { |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | | var open = attrlist[i].open; |
| | | var name = attrlist[i].attrgroup_name; |
| | | var attrs = attrlist[i].attrs; |
| | | for (var s = 0; s < this.$data.subClassAttrList.length; s++) { |
| | | var clsattr = this.$data.subClassAttrList[s]; |
| | | for (var s = 0; s < this.subClassAttrList.length; s++) { |
| | | var clsattr = this.subClassAttrList[s]; |
| | | if (name == clsattr.Name) { |
| | | var attr = []; |
| | | for (var j = 0; j < attrs.length; j++) { |
| | |
| | | month: nowDate.getMonth() + 1, |
| | | day: nowDate.getDate() |
| | | } |
| | | ca.Value = date.year + '-' + (date.month >= 10 ? date.month : '0' + date |
| | | .month) + '-' + (date.day >= 10 ? date.day : '0' + date.day); |
| | | ca.Value = date.year + '-' + (date.month >= 10 ? date.month : '0' + |
| | | date |
| | | .month) + '-' + (date.day >= 10 ? date.day : '0' + date |
| | | .day); |
| | | } |
| | | if (utils.classUtils.attrTypeIsObjRefMulti(ca.Type)) { |
| | | var relClsList = []; |
| | |
| | | Order: clsattr.Order, |
| | | Open: open, |
| | | Attr: attr, |
| | | control_style: this.$data.subClassGridStyle.StyleDef.control_style, |
| | | title_p_wdith: this.$data.subClassGridStyle.StyleDef.title_p_wdith, |
| | | Font: this.$data.subClassGridStyle.StyleDef.Font ? this.$data.subClassGridStyle |
| | | control_style: this.subClassGridStyle.StyleDef.control_style, |
| | | title_p_wdith: this.subClassGridStyle.StyleDef.title_p_wdith, |
| | | Font: this.subClassGridStyle.StyleDef.Font ? this.$data |
| | | .subClassGridStyle |
| | | .StyleDef.Font : {}, |
| | | Bk_Color: this.$data.subClassGridStyle.StyleDef.Bk_Color ? this.$data |
| | | Bk_Color: this.subClassGridStyle.StyleDef.Bk_Color ? this.$data |
| | | .subClassGridStyle.StyleDef.Bk_Color : '#FFFFFF', |
| | | Text_Color: this.$data.subClassGridStyle.StyleDef.Text_Color ? this.$data |
| | | Text_Color: this.subClassGridStyle.StyleDef.Text_Color ? this |
| | | .$data |
| | | .subClassGridStyle.StyleDef.Text_Color : '#000000' |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | if (newattrlist.length > 0) { |
| | | this.$data.subClassAttrList = newattrlist; |
| | | this.subClassAttrList = newattrlist; |
| | | } |
| | | var req = []; |
| | | if (this.$data.subClassGridStyle.StyleDef) { |
| | | if (this.$data.subClassGridStyle.StyleDef.show_style.length > 0) { |
| | | var attrlist = this.$data.subClassGridStyle.StyleDef.show_style |
| | | // $el.find('.attr_field').prop('readonly', true); |
| | | // $el.find('.attr_field').prop('disabled', true); |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | | var attr = attrlist[i].attrs |
| | | for (var j = 0; j < attr.length; j++) { |
| | | var ar = attr[j]; |
| | | req.push({ |
| | | attr: ar.attr, |
| | | value: ar.value ? ar.value : '' |
| | | }); |
| | | } |
| | | if (attrlist.length > 0) { |
| | | |
| | | // $el.find('.attr_field').prop('readonly', true); |
| | | // $el.find('.attr_field').prop('disabled', true); |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | | var attr = attrlist[i].attrs |
| | | for (var j = 0; j < attr.length; j++) { |
| | | var ar = attr[j]; |
| | | req.push({ |
| | | attr: ar.attr, |
| | | value: ar.value ? ar.value : '' |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | var eventlist = this.$data.subClassGridStyle.StyleDef.event; |
| | | var eventlist = this.subClassGridStyle.StyleDef.event; |
| | | if (eventlist) { |
| | | if (eventlist.length > 0) { |
| | | for (var i = 0; i < eventlist.length; i++) { |
| | | if (eventlist[i].event_id == 'before_ok') { |
| | | this.$data.edit_ok_event = eventlist[i]; |
| | | this.edit_ok_event = eventlist[i]; |
| | | } else if (eventlist[i].event_id == 'initial') { |
| | | this.$data.edit_inital_event = eventlist[i]; |
| | | this.edit_inital_event = eventlist[i]; |
| | | } else if (eventlist[i].event_id == 'before_select_compose') { |
| | | this.$data.edit_select_compose_event = eventlist[i].scrip_id; |
| | | this.$data.edit_compose_cls_id = eventlist[i].compose_cls_id; |
| | | this.edit_select_compose_event = eventlist[i].scrip_id; |
| | | this.edit_compose_cls_id = eventlist[i].compose_cls_id; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // console.log(req); |
| | | if (this.$data.edit_inital_event) { |
| | | var eventid = this.$data.edit_inital_event.scrip_id; |
| | | if (this.edit_inital_event) { |
| | | var eventid = this.edit_inital_event.scrip_id; |
| | | var info = { |
| | | eventid: eventid, |
| | | edtype: "0", |
| | |
| | | rclsid: '', |
| | | robjid: '', |
| | | userlogin: '', |
| | | clsid: this.$data.param.Sub_Cls.ID, |
| | | clsid: this.param.Sub_Cls.ID, |
| | | objid: "", |
| | | attr: req, |
| | | } |
| | | this.scan_ini_DataObjRunCustomEvent(info); |
| | | } |
| | | console.log(this.$data.subClassGridStyle); |
| | | console.log(this.$data.subClassAttrList); |
| | | console.log(this.subClassGridStyle); |
| | | console.log(this.subClassAttrList); |
| | | |
| | | } else { |
| | | uni.showModal({ |
| | |
| | | }, |
| | | ini_DataObjRunCustomEvent(info) { |
| | | var param = { |
| | | EditStyle: this.$data.param.Master_Cls.View_Style.Name, |
| | | ViewStyle: this.$data.param.Master_Cls.View_Style.Name, |
| | | EditStyle: this.param.Master_Cls.View_Style.Name, |
| | | ViewStyle: this.param.Master_Cls.View_Style.Name, |
| | | NotTriggerSysEvent: 0, |
| | | enviroment: { |
| | | 'function': '3000', // 功能点编号 |
| | | cls_id: this.$data.param.Master_Cls.ID, // 功能点主数据类标识 |
| | | cls_id: this.param.Master_Cls.ID, // 功能点主数据类标识 |
| | | 'button': 'top', // top/bottom |
| | | button_name: '新增', |
| | | master: { |
| | | cls_id: this.$data.param.Master_Cls.ID, // button=bottom时 master的cls_id |
| | | cls_id: this.param.Master_Cls.ID, // button=bottom时 master的cls_id |
| | | //obj_id: '' // button=bottom时 master的obj_id |
| | | } |
| | | } |
| | |
| | | global_attr: global_attr |
| | | } |
| | | console.log(dataInfo); |
| | | this.$store.dispatch('DataObjRunCustomEventInfo', dataInfo).then(success => { |
| | | console.log(success); |
| | | if (success.code == '00000') { |
| | | var data = JSON.parse(success.data); |
| | | var actionlist = data.action; |
| | | if (actionlist) { |
| | | for (var j = 0; j < actionlist.length; j++) { |
| | | var action = actionlist[j] |
| | | var action_type = action.action_type; |
| | | var value = action.value; |
| | | if (action_type == 'set_dlg_attr') { |
| | | if (value) { |
| | | var val = value; |
| | | if (typeof value == 'string') { |
| | | val = JSON.parse(value); |
| | | } |
| | | console.log(val); |
| | | for (var i = 0; i < val.length; i++) { |
| | | for (var a = 0; a < this.$data.classAttrList.length; a++) { |
| | | for (var l = 0; l < this.$data.classAttrList[a].Attr.length; l++) { |
| | | var ca = this.$data.classAttrList[a].Attr[l]; |
| | | if (val[i].attr == ca.Name) { |
| | | if (utils.classUtils.attrTypeIsDict(ca.Type)) { |
| | | var dictItemList = []; |
| | | for (var d in val[i].choice_list) { |
| | | var val = val[i].choice_list[d]; |
| | | dictItemList.push({ |
| | | "CN_S_NAME": val, |
| | | "Name": val, |
| | | "label": val, |
| | | "value": val |
| | | }); |
| | | dataObjRunCustomEvent(dataInfo).then(success => { |
| | | var data = JSON.parse(success); |
| | | var actionlist = data.action; |
| | | if (actionlist) { |
| | | for (var j = 0; j < actionlist.length; j++) { |
| | | var action = actionlist[j] |
| | | var action_type = action.action_type; |
| | | var value = action.value; |
| | | if (action_type == 'set_dlg_attr') { |
| | | if (value) { |
| | | var val = value; |
| | | if (typeof value == 'string') { |
| | | val = JSON.parse(value); |
| | | } |
| | | console.log(val); |
| | | for (var i = 0; i < val.length; i++) { |
| | | for (var a = 0; a < this.classAttrList.length; a++) { |
| | | for (var l = 0; l < this.classAttrList[a].Attr |
| | | .length; l++) { |
| | | var ca = this.classAttrList[a].Attr[l]; |
| | | if (val[i].attr == ca.Name) { |
| | | if (utils.classUtils.attrTypeIsDict(ca.Type)) { |
| | | var dictItemList = []; |
| | | for (var d in val[i].choice_list) { |
| | | var val = val[i].choice_list[d]; |
| | | dictItemList.push({ |
| | | "CN_S_NAME": val, |
| | | "Name": val, |
| | | "label": val, |
| | | "value": val |
| | | }); |
| | | |
| | | } |
| | | ca.dictitem = dictItemList; |
| | | // attr[j].dictitem = val[i].choice_list; |
| | | } else { |
| | | // ca.value = val[i].value; |
| | | } |
| | | ca.dictitem = dictItemList; |
| | | // attr[j].dictitem = val[i].choice_list; |
| | | } else { |
| | | // ca.value = val[i].value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | var length = 0; |
| | | if (!this.$data.refdatastore.filter(function(s) { |
| | | return val[i].attr == s.attr |
| | | }).length) { |
| | | length = 1; |
| | | this.$data.refdatastore.push(val[i]); |
| | | } |
| | | if (length == 0) { |
| | | for (var j = 0; j < this.$data.refdatastore.length; j++) { |
| | | if (this.$data.refdatastore[j].attr == val[i].attr) { |
| | | this.$data.refdatastore[j].value = val[i].value; |
| | | } |
| | | var length = 0; |
| | | if (!this.refdatastore.filter(function(s) { |
| | | return val[i].attr == s.attr |
| | | }).length) { |
| | | length = 1; |
| | | this.refdatastore.push(val[i]); |
| | | } |
| | | if (length == 0) { |
| | | for (var j = 0; j < this.refdatastore.length; j++) { |
| | | if (this.refdatastore[j].attr == val[i].attr) { |
| | | this.refdatastore[j].value = val[i].value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (action_type == 'open_select_userdlg') { |
| | | uni.showModal({ |
| | | title: "错误2.2", |
| | | content: "open_select_userdlg这个action_type还未处理!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | } else if (action_type == 'open_select_userdlg') { |
| | | uni.showModal({ |
| | | title: "错误2.2", |
| | | content: "open_select_userdlg这个action_type还未处理!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误2", |
| | | content: success.msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | |
| | | |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | uni.showModal({ |
| | |
| | | var $this = this; |
| | | var enviroment = { |
| | | 'function': '3000', // 功能点编号 |
| | | cls_id: this.$data.param.Master_Cls.ID, // 功能点主数据类标识 |
| | | cls_id: this.param.Master_Cls.ID, // 功能点主数据类标识 |
| | | 'button': 'top', // top/bottom |
| | | button_name: '新增', |
| | | master: { |
| | | cls_id: this.$data.param.Master_Cls.ID, // button=bottom时 master的cls_id |
| | | cls_id: this.param.Master_Cls.ID, // button=bottom时 master的cls_id |
| | | //obj_id: '' // button=bottom时 master的obj_id |
| | | } |
| | | }; |
| | | enviroment.edit_dlg = { |
| | | type: 'small', //小窗口 |
| | | class_id: this.$data.param.Master_Cls.ID, //当前数据类id |
| | | class_id: this.param.Master_Cls.ID, //当前数据类id |
| | | } |
| | | if (data_attr) { |
| | | enviroment.edit_dlg.form_control = { //所属的表单控件 |
| | |
| | | attr: JSON.stringify(info.attr), |
| | | extinfo: JSON.stringify(enviroment), |
| | | inputparameter: '', |
| | | global_attr: JSON.stringify(this.$data.global_attr) |
| | | global_attr: JSON.stringify(this.global_attr) |
| | | } |
| | | console.log(dataInfo); |
| | | this.$store.dispatch('DataObjRunCustomEventInfo', dataInfo).then(success => { |
| | | dataObjRunCustomEvent(dataInfo).then(success => { |
| | | console.log(success); |
| | | if (success.code == '00000') { |
| | | var data = JSON.parse(success.data); |
| | | var actionlist = data.action; |
| | | var data = JSON.parse(success); |
| | | var actionlist = data.action; |
| | | |
| | | if (actionlist) { |
| | | console.log(actionlist); |
| | | for (var i = 0; i < actionlist.length; i++) { |
| | | var action = actionlist[i]; |
| | | if (action.action_type == 'set_dlg_attr') { |
| | | var result = action.value; |
| | | for (var i = 0; i < result.length; i++) { |
| | | if (result[i].choice_list) { |
| | | for (var c = 0; c < $this.$data.classAttrList.length; c++) { |
| | | var attr = $this.$data.classAttrList[c].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | | if (attr[j].Name == result[i].attr) { |
| | | if (utils.classUtils.attrTypeIsDict(attr[j].Type)) { |
| | | var dictItemList = []; |
| | | for (var d in result[i].choice_list) { |
| | | var val = result[i].choice_list[d]; |
| | | dictItemList.push({ |
| | | "CN_S_NAME": val, |
| | | "Name": val, |
| | | "label": val, |
| | | "value": val |
| | | }); |
| | | } |
| | | attr[j].dictitem = dictItemList; |
| | | // attr[j].dictitem = result[i].choice_list; |
| | | if (actionlist) { |
| | | console.log(actionlist); |
| | | for (var i = 0; i < actionlist.length; i++) { |
| | | var action = actionlist[i]; |
| | | if (action.action_type == 'set_dlg_attr') { |
| | | var result = action.value; |
| | | for (var i = 0; i < result.length; i++) { |
| | | if (result[i].choice_list) { |
| | | for (var c = 0; c < $this.classAttrList.length; c++) { |
| | | var attr = $this.classAttrList[c].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | | if (attr[j].Name == result[i].attr) { |
| | | if (utils.classUtils.attrTypeIsDict(attr[j].Type)) { |
| | | var dictItemList = []; |
| | | for (var d in result[i].choice_list) { |
| | | var val = result[i].choice_list[d]; |
| | | dictItemList.push({ |
| | | "CN_S_NAME": val, |
| | | "Name": val, |
| | | "label": val, |
| | | "value": val |
| | | }); |
| | | } |
| | | attr[j].dictitem = dictItemList; |
| | | // attr[j].dictitem = result[i].choice_list; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | for (var c = 0; c < $this.$data.classAttrList.length; c++) { |
| | | var attr = $this.$data.classAttrList[c].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | | console.log(attr[j].Name + '==' + result[i].attr); |
| | | if (attr[j].Name == result[i].attr) { |
| | | attr[j].Value = result[i].value; |
| | | } |
| | | } |
| | | } |
| | | var length = 0; |
| | | if (!$this.$data.refdatastore.filter(function(s) { |
| | | return result[i].attr == s.attr |
| | | }).length) { |
| | | length = 1; |
| | | $this.$data.refdatastore.push(result[i]); |
| | | } |
| | | if (length == 0) { |
| | | for (var j = 0; j < $this.$data.refdatastore.length; j++) { |
| | | if ($this.$data.refdatastore[j].attr == result[i].attr) { |
| | | $this.$data.refdatastore[j].value = result[i].value; |
| | | } |
| | | } |
| | | for (var c = 0; c < $this.classAttrList.length; c++) { |
| | | var attr = $this.classAttrList[c].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | | console.log(attr[j].Name + '==' + result[i].attr); |
| | | if (attr[j].Name == result[i].attr) { |
| | | attr[j].Value = result[i].value; |
| | | } |
| | | } |
| | | } |
| | | } else if (data.action[i].action_type == 'set_global_attr') { |
| | | $this.$data.global_attr = data.action[i].value || []; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (data.result) { |
| | | var result = data.result; |
| | | for (var i = 0; i < result.length; i++) { |
| | | for (var c = 0; c < $this.$data.classAttrList.length; c++) { |
| | | var attr = $this.$data.classAttrList[c].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | | if (attr[j].Name == result[i].attr) { |
| | | attr[j].Value = result[i].value; |
| | | var length = 0; |
| | | if (!$this.refdatastore.filter(function(s) { |
| | | return result[i].attr == s.attr |
| | | }).length) { |
| | | length = 1; |
| | | $this.refdatastore.push(result[i]); |
| | | } |
| | | if (length == 0) { |
| | | for (var j = 0; j < $this.refdatastore.length; j++) { |
| | | if ($this.refdatastore[j].attr == result[i].attr) { |
| | | $this.refdatastore[j].value = result[i].value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | var length = 0; |
| | | if (!$this.$data.refdatastore.filter(function(s) { |
| | | return result[i].attr == s.attr |
| | | }).length) { |
| | | length = 1; |
| | | $this.$data.refdatastore.push(result[i]); |
| | | } |
| | | if (length == 0) { |
| | | for (var j = 0; j < $this.$data.refdatastore.length; j++) { |
| | | if ($this.$data.refdatastore[j].attr == result[i].attr) { |
| | | $this.$data.refdatastore[j].value = result[i].value; |
| | | } |
| | | } |
| | | } |
| | | } else if (data.action[i].action_type == 'set_global_attr') { |
| | | $this.global_attr = data.action[i].value || []; |
| | | } |
| | | } |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误3", |
| | | content: success.msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | |
| | | if (data.result) { |
| | | var result = data.result; |
| | | for (var i = 0; i < result.length; i++) { |
| | | for (var c = 0; c < $this.classAttrList.length; c++) { |
| | | var attr = $this.classAttrList[c].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | | if (attr[j].Name == result[i].attr) { |
| | | attr[j].Value = result[i].value; |
| | | } |
| | | } |
| | | } |
| | | |
| | | var length = 0; |
| | | if (!$this.refdatastore.filter(function(s) { |
| | | return result[i].attr == s.attr |
| | | }).length) { |
| | | length = 1; |
| | | $this.refdatastore.push(result[i]); |
| | | } |
| | | if (length == 0) { |
| | | for (var j = 0; j < $this.refdatastore.length; j++) { |
| | | if ($this.refdatastore[j].attr == result[i].attr) { |
| | | $this.refdatastore[j].value = result[i].value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | uni.showModal({ |
| | |
| | | OKDataObjRunCustomEvent() { |
| | | var enviroment = { |
| | | 'function': '3000', // 功能点编号 |
| | | cls_id: this.$data.param.Master_Cls.ID, // 功能点主数据类标识 |
| | | cls_id: this.param.Master_Cls.ID, // 功能点主数据类标识 |
| | | 'button': 'top', // top/bottom |
| | | button_name: '新增', |
| | | master: { |
| | | cls_id: this.$data.param.Master_Cls.ID, // button=bottom时 master的cls_id |
| | | cls_id: this.param.Master_Cls.ID, // button=bottom时 master的cls_id |
| | | |
| | | } |
| | | }; |
| | | |
| | | var eventid = this.$data.edit_ok_event.scrip_id; |
| | | var eventid = this.edit_ok_event.scrip_id; |
| | | var req = []; |
| | | var attrlist = this.$data.classAttrList; |
| | | var attrlist = this.classAttrList; |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | | var attr = attrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | |
| | | } |
| | | } |
| | | |
| | | if (this.$data.refdatastore.length > 0) { |
| | | for (var i = 0; i < this.$data.refdatastore.length; i++) { |
| | | if (this.refdatastore.length > 0) { |
| | | for (var i = 0; i < this.refdatastore.length; i++) { |
| | | if (!req.filter(function(s) { |
| | | return this.$data.refdatastore[i].attr == s.name |
| | | return this.refdatastore[i].attr == s.name |
| | | }).length) { |
| | | length = 1; |
| | | req.push({ |
| | | 'attr': this.$data.refdatastore[i].attr, |
| | | 'value': this.$data.refdatastore[i].value |
| | | 'attr': this.refdatastore[i].attr, |
| | | 'value': this.refdatastore[i].value |
| | | }); |
| | | } |
| | | } |
| | |
| | | rclsid: '', |
| | | robjid: '', |
| | | userlogin: '', |
| | | clsid: this.$data.param.Master_Cls.ID, |
| | | clsid: this.param.Master_Cls.ID, |
| | | objid: "", |
| | | attr: req, |
| | | } |
| | |
| | | objid: info.objid, |
| | | attr: JSON.stringify(info.attr), |
| | | extinfo: JSON.stringify(enviroment), |
| | | global_attr: JSON.stringify(this.$data.global_attr) |
| | | global_attr: JSON.stringify(this.global_attr) |
| | | } |
| | | console.log(dataInfo); |
| | | this.$store.dispatch('DataObjRunCustomEventInfo', dataInfo).then(success => { |
| | | dataObjRunCustomEvent(dataInfo).then(success => { |
| | | console.log(success); |
| | | if (success.code == '00000') { |
| | | var data = JSON.parse(success.data); |
| | | var result = data.result; |
| | | for (var i = 0; i < result.length; i++) { |
| | | // self.class_attr_ele.find('.attr_field[data-field="' + result[i].attr + '"]').val(result[i].value).data('val', result[i].value); |
| | | var length = 0; |
| | | if (!this.$data.refdatastore.filter(function(s) { |
| | | return result[i].attr == s.attr |
| | | }).length) { |
| | | length = 1; |
| | | this.$data.refdatastore.push(result[i]); |
| | | } |
| | | if (length == 0) { |
| | | for (var j = 0; j < this.$data.refdatastore.length; j++) { |
| | | if (this.$data.refdatastore[j].attr == result[i].attr) { |
| | | this.$data.refdatastore[j].value = result[i].value; |
| | | } |
| | | var data = JSON.parse(success); |
| | | var result = data.result; |
| | | for (var i = 0; i < result.length; i++) { |
| | | // self.class_attr_ele.find('.attr_field[data-field="' + result[i].attr + '"]').val(result[i].value).data('val', result[i].value); |
| | | var length = 0; |
| | | if (!this.refdatastore.filter(function(s) { |
| | | return result[i].attr == s.attr |
| | | }).length) { |
| | | length = 1; |
| | | this.refdatastore.push(result[i]); |
| | | } |
| | | if (length == 0) { |
| | | for (var j = 0; j < this.refdatastore.length; j++) { |
| | | if (this.refdatastore[j].attr == result[i].attr) { |
| | | this.refdatastore[j].value = result[i].value; |
| | | } |
| | | } |
| | | } |
| | | |
| | | this.add(); |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误4", |
| | | content: success.msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | |
| | | this.add(); |
| | | |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | uni.showModal({ |
| | |
| | | DataObjRunCustomEvent_Return(eventid, data_attr, button_callback, index, iindex) { |
| | | var enviroment = { |
| | | 'function': '3000', // 功能点编号 |
| | | cls_id: this.$data.param.Master_Cls.ID, // 功能点主数据类标识 |
| | | cls_id: this.param.Master_Cls.ID, // 功能点主数据类标识 |
| | | 'button': 'top', // top/bottom |
| | | button_name: '新增', |
| | | master: { |
| | | cls_id: this.$data.param.Master_Cls.ID, // button=bottom时 master的cls_id |
| | | cls_id: this.param.Master_Cls.ID, // button=bottom时 master的cls_id |
| | | //obj_id: '' // button=bottom时 master的obj_id |
| | | } |
| | | }; |
| | | var req = []; |
| | | var attrlist = this.$data.classAttrList; |
| | | var attrlist = this.classAttrList; |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | | var attr = attrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | |
| | | req.push(this.formatAttr(ar)) |
| | | } |
| | | } |
| | | if (this.$data.refdatastore.length > 0) { |
| | | for (var i = 0; i < this.$data.refdatastore.length; i++) { |
| | | if (this.refdatastore.length > 0) { |
| | | for (var i = 0; i < this.refdatastore.length; i++) { |
| | | if (!req.filter(function(s) { |
| | | return this.$data.refdatastore[i].attr == s.name |
| | | return this.refdatastore[i].attr == s.name |
| | | }).length) { |
| | | length = 1; |
| | | req.push({ |
| | | 'attr': this.$data.refdatastore[i].attr, |
| | | 'value': this.$data.refdatastore[i].value |
| | | 'attr': this.refdatastore[i].attr, |
| | | 'value': this.refdatastore[i].value |
| | | }); |
| | | } |
| | | } |
| | |
| | | var extinfo = enviroment; |
| | | extinfo.edit_dlg = { |
| | | type: 'small', //小窗口 |
| | | class_id: this.$data.param.Master_Cls.ID, //当前数据类id |
| | | class_id: this.param.Master_Cls.ID, //当前数据类id |
| | | } |
| | | if (data_attr) { |
| | | extinfo.edit_dlg.form_control = { //所属的表单控件 |
| | |
| | | rclsid: '', |
| | | robjid: '', |
| | | userlogin: '', |
| | | clsid: this.$data.param.Master_Cls.ID, |
| | | clsid: this.param.Master_Cls.ID, |
| | | objid: '', |
| | | attr: JSON.stringify(req), |
| | | extinfo: JSON.stringify(extinfo), |
| | | global_attr: JSON.stringify(this.$data.global_attr) |
| | | global_attr: JSON.stringify(this.global_attr) |
| | | } |
| | | console.log(dataInfo); |
| | | this.$store.dispatch('DataObjRunCustomEventInfo', dataInfo).then(success => { |
| | | dataObjRunCustomEvent(dataInfo).then(success => { |
| | | console.log(success); |
| | | if (success.code == '00000') { |
| | | var data = JSON.parse(success.data); |
| | | if (data != "") { |
| | | var data = JSON.parse(success); |
| | | if (data != "") { |
| | | |
| | | var actions = data.action; |
| | | console.log(actions); |
| | | if (actions) { |
| | | for (var i = 0; i < actions.length; i++) { |
| | | var action = actions[i]; |
| | | var val = action.value; |
| | | var enviroment = JSON.stringify(enviroment); |
| | | var actions = data.action; |
| | | console.log(actions); |
| | | if (actions) { |
| | | for (var i = 0; i < actions.length; i++) { |
| | | var action = actions[i]; |
| | | var val = action.value; |
| | | var enviroment = JSON.stringify(enviroment); |
| | | |
| | | if (action.action_type == 'open_panel') { |
| | | var d = dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + '提示', |
| | | content: action.action_type + '此action尚未处理!' |
| | | }); |
| | | d.show(); |
| | | } else if (action.action_type == 'open_select_userdlg') { |
| | | var style = val.style; |
| | | // style == 'user' ? '选择人员' : style == 'department' ? '选择部门' : style == 'role' ? '选择角色' : '' |
| | | var $this = this; |
| | | var param = { |
| | | index: index, |
| | | iindex: iindex, |
| | | button_callback: button_callback, |
| | | req: req, |
| | | data_attr: data_attr |
| | | if (action.action_type == 'open_panel') { |
| | | var d = dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + |
| | | '提示', |
| | | content: action.action_type + '此action尚未处理!' |
| | | }); |
| | | d.show(); |
| | | } else if (action.action_type == 'open_select_userdlg') { |
| | | var style = val.style; |
| | | // style == 'user' ? '选择人员' : style == 'department' ? '选择部门' : style == 'role' ? '选择角色' : '' |
| | | var $this = this; |
| | | var param = { |
| | | index: index, |
| | | iindex: iindex, |
| | | button_callback: button_callback, |
| | | req: req, |
| | | data_attr: data_attr |
| | | } |
| | | uni.navigateTo({ |
| | | url: '../selpsn/index?mulit=false¶m=' + JSON.stringify( |
| | | param), |
| | | events: { |
| | | AddPer(data, param) { |
| | | // console.log(param); |
| | | console.log(data); |
| | | var callback_eventid = param.button_callback |
| | | .trim(); |
| | | var info = { |
| | | eventid: callback_eventid, |
| | | edtype: "0", |
| | | projectid: '', |
| | | rclsid: '', |
| | | robjid: '', |
| | | userlogin: '', |
| | | clsid: $this.param.Master_Cls.ID, |
| | | objid: "", |
| | | attr: param.req, |
| | | inputparameter: data |
| | | } |
| | | $this.DataObjRunCustomEvent(info, param.data_attr); |
| | | } |
| | | } |
| | | uni.navigateTo({ |
| | | url: '../selpsn/index?mulit=false¶m=' + JSON.stringify( |
| | | param), |
| | | events: { |
| | | AddPer(data, param) { |
| | | // console.log(param); |
| | | console.log(data); |
| | | var callback_eventid = param.button_callback.trim(); |
| | | }); |
| | | } else if (action.action_type == 'open_data_query_dlg') { |
| | | |
| | | } else if (action.action_type == 'open_common_dlg') { |
| | | var value = action.value; |
| | | var d = dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + |
| | | '提示', |
| | | content: action.action_type + '此action尚未处理!' |
| | | }); |
| | | d.show(); |
| | | } else if (action.action_type == 'open_project_query_dlg') { |
| | | //console.log(action.value.select_range); |
| | | //console.log(action.value.mulit_select); |
| | | var priRel = '-1'; |
| | | if (action.value.select_range == '全部相关') |
| | | priRel = '0'; |
| | | else if (action.value.select_range == '我负责的项目') |
| | | priRel = '1'; |
| | | else if (action.value.select_range == '我创建的') |
| | | priRel = '2'; |
| | | else if (action.value.select_range == '我参与的' || action.value |
| | | .select_range == '我参加的') |
| | | priRel = '3'; |
| | | else if (action.value.select_range == '我关注的') |
| | | priRel = '4'; |
| | | else if (action.value.select_range == '我下属的项目') |
| | | priRel = '5'; |
| | | |
| | | var $this = this; |
| | | var param_ = { |
| | | index: index, |
| | | iindex: iindex, |
| | | button_callback: button_callback, |
| | | req: req |
| | | } |
| | | uni.navigateTo({ |
| | | url: '../selPrj/index?relation=' + priRel + '¶m=' + |
| | | JSON |
| | | .stringify(param_), |
| | | events: { |
| | | AddPer(data, param) { |
| | | $this.classAttrList[param.index].Attr[param |
| | | .iindex].Value = data[0].Name; |
| | | $this.classAttrList[param.index].Attr[param |
| | | .iindex].ValID = data[0].ID + ';' + data[0] |
| | | .Name; |
| | | var callback_eventid = param.button_callback |
| | | .trim(); |
| | | if (callback_eventid) { |
| | | var info = { |
| | | eventid: callback_eventid, |
| | | edtype: "0", |
| | | projectid: '', |
| | | rclsid: '', |
| | | robjid: '', |
| | | userlogin: '', |
| | | clsid: $this.$data.param.Master_Cls.ID, |
| | | edtype: "2", |
| | | projectid: data[0].ID, |
| | | rclsid: "", |
| | | robjid: "", |
| | | userlogin: "", |
| | | clsid: $this.param.Master_Cls.ID, |
| | | objid: "", |
| | | attr: param.req, |
| | | inputparameter: data |
| | | } |
| | | $this.DataObjRunCustomEvent(info, param.data_attr); |
| | | |
| | | $this.DataObjRunCustomEvent(info); |
| | | } |
| | | } |
| | | }); |
| | | } else if (action.action_type == 'open_data_query_dlg') { |
| | | |
| | | } else if (action.action_type == 'open_common_dlg') { |
| | | var value = action.value; |
| | | var d = dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + '提示', |
| | | content: action.action_type + '此action尚未处理!' |
| | | }); |
| | | d.show(); |
| | | } else if (action.action_type == 'open_project_query_dlg') { |
| | | //console.log(action.value.select_range); |
| | | //console.log(action.value.mulit_select); |
| | | var priRel = '-1'; |
| | | if (action.value.select_range == '全部相关') |
| | | priRel = '0'; |
| | | else if (action.value.select_range == '我负责的项目') |
| | | priRel = '1'; |
| | | else if (action.value.select_range == '我创建的') |
| | | priRel = '2'; |
| | | else if (action.value.select_range == '我参与的' || action.value |
| | | .select_range == '我参加的') |
| | | priRel = '3'; |
| | | else if (action.value.select_range == '我关注的') |
| | | priRel = '4'; |
| | | else if (action.value.select_range == '我下属的项目') |
| | | priRel = '5'; |
| | | |
| | | var $this = this; |
| | | var param_ = { |
| | | index: index, |
| | | iindex: iindex, |
| | | button_callback: button_callback, |
| | | req: req |
| | | } |
| | | uni.navigateTo({ |
| | | url: '../selPrj/index?relation=' + priRel + '¶m=' + JSON |
| | | .stringify(param_), |
| | | events: { |
| | | AddPer(data, param) { |
| | | $this.$data.classAttrList[param.index].Attr[param |
| | | .iindex].Value = data[0].Name; |
| | | $this.$data.classAttrList[param.index].Attr[param |
| | | .iindex].ValID = data[0].ID + ';' + data[0] |
| | | .Name; |
| | | var callback_eventid = param.button_callback.trim(); |
| | | if (callback_eventid) { |
| | | var info = { |
| | | eventid: callback_eventid, |
| | | edtype: "2", |
| | | projectid: data[0].ID, |
| | | rclsid: "", |
| | | robjid: "", |
| | | userlogin: "", |
| | | clsid: $this.$data.param.Master_Cls.ID, |
| | | objid: "", |
| | | attr: param.req, |
| | | } |
| | | |
| | | $this.DataObjRunCustomEvent(info); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | var d = dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + '提示', |
| | | content: action.action_type + '此action尚未处理!' |
| | | }); |
| | | d.show(); |
| | | } |
| | | }); |
| | | } else { |
| | | var d = dialog({ |
| | | title: '<i class="ace-icon fa fa-info-circle"></i> ' + |
| | | '提示', |
| | | content: action.action_type + '此action尚未处理!' |
| | | }); |
| | | d.show(); |
| | | } |
| | | } |
| | | } else { |
| | | uni.showModal({ |
| | | title: "提示5.2", |
| | | content: '调用 before_click_button 脚本返回空,event_id' + eventid, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误5", |
| | | content: success.msg, |
| | | title: "提示5.2", |
| | | content: '调用 before_click_button 脚本返回空,event_id' + eventid, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | uni.showModal({ |
| | |
| | | }, |
| | | scan_ini_DataObjRunCustomEvent(info) { |
| | | var param = { |
| | | EditStyle: this.$data.param.Sub_Cls.View_Style.Name, |
| | | ViewStyle: this.$data.param.Sub_Cls.View_Style.Name, |
| | | EditStyle: this.param.Sub_Cls.View_Style.Name, |
| | | ViewStyle: this.param.Sub_Cls.View_Style.Name, |
| | | NotTriggerSysEvent: 0, |
| | | enviroment: { |
| | | 'function': '3000', // 功能点编号 |
| | | cls_id: this.$data.param.Sub_Cls.ID, // 功能点主数据类标识 |
| | | cls_id: this.param.Sub_Cls.ID, // 功能点主数据类标识 |
| | | 'button': 'top', // top/bottom |
| | | button_name: '新增', |
| | | master: { |
| | | cls_id: this.$data.param.Sub_Cls.ID, // button=bottom时 master的cls_id |
| | | cls_id: this.param.Sub_Cls.ID, // button=bottom时 master的cls_id |
| | | //obj_id: '' // button=bottom时 master的obj_id |
| | | } |
| | | } |
| | |
| | | global_attr: global_attr |
| | | } |
| | | console.log(dataInfo); |
| | | this.$store.dispatch('DataObjRunCustomEventInfo', dataInfo).then(success => { |
| | | dataObjRunCustomEvent(dataInfo).then(success => { |
| | | console.log(success); |
| | | if (success.code == '00000') { |
| | | var data = JSON.parse(success.data); |
| | | var actionlist = data.action; |
| | | if (actionlist) { |
| | | for (var j = 0; j < actionlist.length; j++) { |
| | | var action = actionlist[j] |
| | | var action_type = action.action_type; |
| | | var value = action.value; |
| | | if (action_type == 'set_dlg_attr') { |
| | | if (value) { |
| | | var val = value; |
| | | if (typeof value == 'string') { |
| | | val = JSON.parse(value); |
| | | } |
| | | console.log(val); |
| | | for (var i = 0; i < val.length; i++) { |
| | | for (var a = 0; a < this.$data.subClassAttrList.length; a++) { |
| | | for (var l = 0; l < this.$data.subClassAttrList[a].Attr |
| | | .length; l++) { |
| | | var ca = this.$data.subClassAttrList[a].Attr[l]; |
| | | if (val[i].attr == ca.Name) { |
| | | if (utils.classUtils.attrTypeIsDict(ca.Type)) { |
| | | var dictItemList = []; |
| | | for (var d in val[i].choice_list) { |
| | | var val = val[i].choice_list[d]; |
| | | dictItemList.push({ |
| | | "CN_S_NAME": val, |
| | | "Name": val, |
| | | "label": val, |
| | | "value": val |
| | | }); |
| | | var data = JSON.parse(success); |
| | | var actionlist = data.action; |
| | | if (actionlist) { |
| | | for (var j = 0; j < actionlist.length; j++) { |
| | | var action = actionlist[j] |
| | | var action_type = action.action_type; |
| | | var value = action.value; |
| | | if (action_type == 'set_dlg_attr') { |
| | | if (value) { |
| | | var val = value; |
| | | if (typeof value == 'string') { |
| | | val = JSON.parse(value); |
| | | } |
| | | console.log(val); |
| | | for (var i = 0; i < val.length; i++) { |
| | | for (var a = 0; a < this.subClassAttrList.length; a++) { |
| | | for (var l = 0; l < this.subClassAttrList[a].Attr |
| | | .length; l++) { |
| | | var ca = this.subClassAttrList[a].Attr[l]; |
| | | if (val[i].attr == ca.Name) { |
| | | if (utils.classUtils.attrTypeIsDict(ca.Type)) { |
| | | var dictItemList = []; |
| | | for (var d in val[i].choice_list) { |
| | | var val = val[i].choice_list[d]; |
| | | dictItemList.push({ |
| | | "CN_S_NAME": val, |
| | | "Name": val, |
| | | "label": val, |
| | | "value": val |
| | | }); |
| | | |
| | | } |
| | | ca.dictitem = dictItemList; |
| | | // attr[j].dictitem = val[i].choice_list; |
| | | } else { |
| | | // ca.value = val[i].value; |
| | | } |
| | | ca.dictitem = dictItemList; |
| | | // attr[j].dictitem = val[i].choice_list; |
| | | } else { |
| | | // ca.value = val[i].value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | var length = 0; |
| | | if (!this.$data.refdatastore.filter(function(s) { |
| | | return val[i].attr == s.attr |
| | | }).length) { |
| | | length = 1; |
| | | this.$data.refdatastore.push(val[i]); |
| | | } |
| | | if (length == 0) { |
| | | for (var j = 0; j < this.$data.refdatastore.length; j++) { |
| | | if (this.$data.refdatastore[j].attr == val[i].attr) { |
| | | this.$data.refdatastore[j].value = val[i].value; |
| | | } |
| | | var length = 0; |
| | | if (!this.refdatastore.filter(function(s) { |
| | | return val[i].attr == s.attr |
| | | }).length) { |
| | | length = 1; |
| | | this.refdatastore.push(val[i]); |
| | | } |
| | | if (length == 0) { |
| | | for (var j = 0; j < this.refdatastore.length; j++) { |
| | | if (this.refdatastore[j].attr == val[i].attr) { |
| | | this.refdatastore[j].value = val[i].value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (action_type == 'open_select_userdlg') { |
| | | uni.showModal({ |
| | | title: "错误6.2", |
| | | content: "open_select_userdlg这个action_type还未处理!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | } else if (action_type == 'open_select_userdlg') { |
| | | uni.showModal({ |
| | | title: "错误6.2", |
| | | content: "open_select_userdlg这个action_type还未处理!", |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误6", |
| | | content: success.msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | |
| | | |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | uni.showModal({ |
| | |
| | | } else { |
| | | enviroment = { |
| | | 'function': '3000', // 功能点编号 |
| | | cls_id: 'MBOX', //this.$data.param.Sub_Cls.ID, // 功能点从数据类标识 |
| | | cls_id: 'MBOX', //this.param.Sub_Cls.ID, // 功能点从数据类标识 |
| | | 'button': 'top', // top/bottom |
| | | button_name: '新增', |
| | | edit_dlg: { |
| | | type: 'small', //小窗口 |
| | | class_id: 'MBOX', //this.$data.param.Sub_Cls.ID,//当前数据类id |
| | | class_id: 'MBOX', //this.param.Sub_Cls.ID,//当前数据类id |
| | | }, |
| | | master: { |
| | | cls_id: 'MBOX', //self.options.ExtParam.Sub_Cls.ID, // button=bottom时 master的cls_id |
| | |
| | | }; |
| | | |
| | | } |
| | | var global_attr = this.$data.global_attr; |
| | | var global_attr = this.global_attr; |
| | | if (info.global_attr) { |
| | | global_attr = info.global_attr; |
| | | } |
| | |
| | | global_attr: JSON.stringify(global_attr) |
| | | } |
| | | console.log(dataInfo); |
| | | this.$store.dispatch('DataObjRunCustomEventInfo', dataInfo).then(success => { |
| | | dataObjRunCustomEvent(dataInfo).then(success => { |
| | | console.log(success); |
| | | if (success.code == '00000') { |
| | | var data = JSON.parse(success.data); |
| | | var actionlist = data.action; |
| | | var data = JSON.parse(success); |
| | | var actionlist = data.action; |
| | | |
| | | if (actionlist) { |
| | | console.log(actionlist); |
| | | for (var ii = 0; ii < actionlist.length; ii++) { |
| | | var action = actionlist[ii]; |
| | | if (action.action_type == 'set_dlg_attr') { |
| | | var result = action.value; |
| | | for (var i = 0; i < result.length; i++) { |
| | | if (result[i].choice_list) { |
| | | for (var s = 0; s < $this.$data.subPanelList.length; s++) { |
| | | for (var c = 0; c < $this.$data.subPanelList[s].subClassAttrList |
| | | .length; c++) { |
| | | var attr = $this.$data.subPanelList[s].subClassAttrList[c] |
| | | .Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | | if (attr[j].Name == result[i].attr) { |
| | | if (utils.classUtils.attrTypeIsDict(attr[j].Type)) { |
| | | var dictItemList = []; |
| | | for (var d in result[i].choice_list) { |
| | | var val = result[i].choice_list[d]; |
| | | dictItemList.push({ |
| | | "CN_S_NAME": val, |
| | | "Name": val, |
| | | "label": val, |
| | | "value": val |
| | | }); |
| | | } |
| | | attr[j].dictitem = dictItemList; |
| | | // attr[j].dictitem = result[i].choice_list; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | for (var s = 0; s < $this.$data.subPanelList.length; s++) { |
| | | for (var c = 0; c < $this.$data.subPanelList[s].subClassAttrList |
| | | if (actionlist) { |
| | | console.log(actionlist); |
| | | for (var ii = 0; ii < actionlist.length; ii++) { |
| | | var action = actionlist[ii]; |
| | | if (action.action_type == 'set_dlg_attr') { |
| | | var result = action.value; |
| | | for (var i = 0; i < result.length; i++) { |
| | | if (result[i].choice_list) { |
| | | for (var s = 0; s < $this.subPanelList.length; s++) { |
| | | for (var c = 0; c < $this.subPanelList[s] |
| | | .subClassAttrList |
| | | .length; c++) { |
| | | var attr = $this.$data.subPanelList[s].subClassAttrList[c].Attr; |
| | | var attr = $this.subPanelList[s].subClassAttrList[c] |
| | | .Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | | console.log(attr[j].Name + '==' + result[i].attr); |
| | | if (attr[j].Name == result[i].attr) { |
| | | attr[j].Value = result[i].value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | var length = 0; |
| | | if (!$this.$data.refdatastore.filter(function(s) { |
| | | return result[i].attr == s.attr |
| | | }).length) { |
| | | length = 1; |
| | | $this.$data.refdatastore.push(result[i]); |
| | | } |
| | | if (length == 0) { |
| | | for (var j = 0; j < $this.$data.refdatastore.length; j++) { |
| | | if ($this.$data.refdatastore[j].attr == result[i].attr) { |
| | | $this.$data.refdatastore[j].value = result[i].value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } else if (action.action_type == 'set_global_attr') { |
| | | $this.$actiontr = action.value || []; |
| | | } else if (action.action_type == 'open_common_dlg') { //打开侧滑弹框 |
| | | var $this = this; |
| | | if (action.value.common_dlg_id == 'check_list') { |
| | | $this.$data.check_list = action.value.config; |
| | | if (action.value.config.appear_style == 'sideslip') //判断是否是侧滑 |
| | | $this.$data.popupType = 'right'; |
| | | else |
| | | $this.$data.popupType = 'center' |
| | | // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性 |
| | | $this.$refs.popup.open($this.$data.popupType); |
| | | } |
| | | } else if (action.action_type == 'add_subcls_panel') { //主从数据类扫码查询数据 |
| | | var result = action.value; |
| | | var $this = this; |
| | | let list_1 = JSON.parse(JSON.stringify(this.$data.subClassAttrList)); |
| | | var scanCodeVal = $this.$data.scanCodeVal; |
| | | var rand = ''; |
| | | for (var i = 0; i < 5; i++) { //生成5位随机数 |
| | | rand += Math.floor(Math.random() * 10); |
| | | } |
| | | if (info.inputParamter[0].attr) { |
| | | if (info.inputParamter[0].attr == "mast_input_3037") //判断是主数据类扫码查询数据 |
| | | scanCodeVal = "mast_input_3037-" + rand; |
| | | } |
| | | if (info.attr[0].attr) { |
| | | if (info.attr[0].attr == "mast_input_3037") //判断是主数据类扫码查询数据 |
| | | scanCodeVal = "mast_input_3037-" + rand; |
| | | } |
| | | $this.$data.subPanelList.push({ |
| | | scanCodeVal: scanCodeVal, |
| | | subClassAttr: list_1 |
| | | }); |
| | | for (var i = 0; i < result.length; i++) { |
| | | for (var s = 0; s < $this.$data.subPanelList.length; s++) { |
| | | if ($this.$data.subPanelList[s].scanCodeVal == scanCodeVal) { |
| | | if (result[i].attr == "S_ID") |
| | | $this.$data.subPanelList[s].ObjID = result[i].value; |
| | | var _subClassAttr = $this.$data.subPanelList[s].subClassAttr; |
| | | for (var c = 0; c < _subClassAttr.length; c++) { |
| | | var attr = _subClassAttr[c].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | | // console.log(attr[j].Name+'=='+result[i].attr); |
| | | if (attr[j].Name == result[i].attr) { |
| | | attr[j].Value = result[i].value; |
| | | if (utils.classUtils.attrTypeIsDict(attr[j] |
| | | .Type)) { |
| | | var dictItemList = []; |
| | | for (var d in result[i].choice_list) { |
| | | var val = result[i].choice_list[d]; |
| | | dictItemList.push({ |
| | | "CN_S_NAME": val, |
| | | "Name": val, |
| | | "label": val, |
| | | "value": val |
| | | }); |
| | | } |
| | | attr[j].dictitem = dictItemList; |
| | | // attr[j].dictitem = result[i].choice_list; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // $this.$data.subPanelList[s].subClassAttr=list_1; |
| | | } |
| | | } |
| | | var length = 0; |
| | | if (!$this.$data.refdatastore.filter(function(s) { |
| | | return result[i].attr == s.attr |
| | | }).length) { |
| | | length = 1; |
| | | $this.$data.refdatastore.push(result[i]); |
| | | } |
| | | if (length == 0) { |
| | | for (var j = 0; j < $this.$data.refdatastore.length; j++) { |
| | | if ($this.$data.refdatastore[j].attr == result[i].attr) { |
| | | $this.$data.refdatastore[j].value = result[i].value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | if (data.result) { |
| | | let list_1 = JSON.parse(JSON.stringify(this.$data.subClassAttrList)); |
| | | var scanCodeVal = $this.$data.scanCodeVal; |
| | | if (info.inputParamter[0].attr == "mast_input_3037") |
| | | scanCodeVal = "mast_input_3037-" + ii; |
| | | $this.$data.subPanelList.push({ |
| | | scanCodeVal: scanCodeVal, |
| | | subClassAttr: list_1 |
| | | }); |
| | | var result = data.result; |
| | | for (var i = 0; i < result.length; i++) { |
| | | for (var s = 0; s < $this.$data.subPanelList.length; s++) { |
| | | if ($this.$data.subPanelList[s].scanCodeVal == scanCodeVal) { |
| | | if (result[i].attr == "S_ID") |
| | | $this.$data.subPanelList[s].ObjID = result[i].value; |
| | | var _subClassAttr = $this.$data.subPanelList[s].subClassAttr; |
| | | for (var c = 0; c < _subClassAttr.length; c++) { |
| | | var attr = _subClassAttr[c].Attr; |
| | | for (var s = 0; s < $this.subPanelList.length; s++) { |
| | | for (var c = 0; c < $this.subPanelList[s].subClassAttrList |
| | | .length; c++) { |
| | | var attr = $this.subPanelList[s].subClassAttrList[c] |
| | | .Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | | // console.log(attr[j].Name+'=='+result[i].attr); |
| | | console.log(attr[j].Name + '==' + result[i].attr); |
| | | if (attr[j].Name == result[i].attr) { |
| | | attr[j].Value = result[i].value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | var length = 0; |
| | | if (!$this.refdatastore.filter(function(s) { |
| | | return result[i].attr == s.attr |
| | | }).length) { |
| | | length = 1; |
| | | $this.refdatastore.push(result[i]); |
| | | } |
| | | if (length == 0) { |
| | | for (var j = 0; j < $this.refdatastore.length; j++) { |
| | | if ($this.refdatastore[j].attr == result[i].attr) { |
| | | $this.refdatastore[j].value = result[i].value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } else if (action.action_type == 'set_global_attr') { |
| | | $this.$actiontr = action.value || []; |
| | | } else if (action.action_type == 'open_common_dlg') { //打开侧滑弹框 |
| | | var $this = this; |
| | | if (action.value.common_dlg_id == 'check_list') { |
| | | $this.check_list = action.value.config; |
| | | if (action.value.config.appear_style == 'sideslip') //判断是否是侧滑 |
| | | $this.popupType = 'right'; |
| | | else |
| | | $this.popupType = 'center' |
| | | // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性 |
| | | $this.$refs.popup.open($this.popupType); |
| | | } |
| | | } else if (action.action_type == 'add_subcls_panel') { //主从数据类扫码查询数据 |
| | | var result = action.value; |
| | | var $this = this; |
| | | let list_1 = JSON.parse(JSON.stringify(this.subClassAttrList)); |
| | | var scanCodeVal = $this.scanCodeVal; |
| | | var rand = ''; |
| | | for (var i = 0; i < 5; i++) { //生成5位随机数 |
| | | rand += Math.floor(Math.random() * 10); |
| | | } |
| | | if (info.inputParamter[0].attr) { |
| | | if (info.inputParamter[0].attr == "mast_input_3037") //判断是主数据类扫码查询数据 |
| | | scanCodeVal = "mast_input_3037-" + rand; |
| | | } |
| | | if (info.attr[0].attr) { |
| | | if (info.attr[0].attr == "mast_input_3037") //判断是主数据类扫码查询数据 |
| | | scanCodeVal = "mast_input_3037-" + rand; |
| | | } |
| | | $this.subPanelList.push({ |
| | | scanCodeVal: scanCodeVal, |
| | | subClassAttr: list_1 |
| | | }); |
| | | for (var i = 0; i < result.length; i++) { |
| | | for (var s = 0; s < $this.subPanelList.length; s++) { |
| | | if ($this.subPanelList[s].scanCodeVal == scanCodeVal) { |
| | | if (result[i].attr == "S_ID") |
| | | $this.subPanelList[s].ObjID = result[i].value; |
| | | var _subClassAttr = $this.subPanelList[s].subClassAttr; |
| | | for (var c = 0; c < _subClassAttr.length; c++) { |
| | | var attr = _subClassAttr[c].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | | // console.log(attr[j].Name+'=='+result[i].attr); |
| | | if (attr[j].Name == result[i].attr) { |
| | | attr[j].Value = result[i].value; |
| | | } |
| | | } |
| | | } |
| | | |
| | | var length = 0; |
| | | if (!$this.$data.refdatastore.filter(function(s) { |
| | | return result[i].attr == s.attr |
| | | }).length) { |
| | | length = 1; |
| | | $this.$data.refdatastore.push(result[i]); |
| | | } |
| | | if (length == 0) { |
| | | for (var j = 0; j < $this.$data.refdatastore.length; j++) { |
| | | if ($this.$data.refdatastore[j].attr == result[i].attr) { |
| | | $this.$data.refdatastore[j].value = result[i].value; |
| | | // $this.subPanelList[s].subClassAttr=list_1; |
| | | } |
| | | } |
| | | var length = 0; |
| | | if (!$this.refdatastore.filter(function(s) { |
| | | return result[i].attr == s.attr |
| | | }).length) { |
| | | length = 1; |
| | | $this.refdatastore.push(result[i]); |
| | | } |
| | | if (length == 0) { |
| | | for (var j = 0; j < $this.refdatastore.length; j++) { |
| | | if ($this.refdatastore[j].attr == result[i].attr) { |
| | | $this.refdatastore[j].value = result[i].value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误7", |
| | | content: success.msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | }); |
| | | } |
| | | |
| | | if (data.result) { |
| | | let list_1 = JSON.parse(JSON.stringify(this.subClassAttrList)); |
| | | var scanCodeVal = $this.scanCodeVal; |
| | | if (info.inputParamter[0].attr == "mast_input_3037") |
| | | scanCodeVal = "mast_input_3037-" + ii; |
| | | $this.subPanelList.push({ |
| | | scanCodeVal: scanCodeVal, |
| | | subClassAttr: list_1 |
| | | }); |
| | | var result = data.result; |
| | | for (var i = 0; i < result.length; i++) { |
| | | for (var s = 0; s < $this.subPanelList.length; s++) { |
| | | if ($this.subPanelList[s].scanCodeVal == scanCodeVal) { |
| | | if (result[i].attr == "S_ID") |
| | | $this.subPanelList[s].ObjID = result[i].value; |
| | | var _subClassAttr = $this.subPanelList[s].subClassAttr; |
| | | for (var c = 0; c < _subClassAttr.length; c++) { |
| | | var attr = _subClassAttr[c].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | | // console.log(attr[j].Name+'=='+result[i].attr); |
| | | if (attr[j].Name == result[i].attr) { |
| | | attr[j].Value = result[i].value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | var length = 0; |
| | | if (!$this.refdatastore.filter(function(s) { |
| | | return result[i].attr == s.attr |
| | | }).length) { |
| | | length = 1; |
| | | $this.refdatastore.push(result[i]); |
| | | } |
| | | if (length == 0) { |
| | | for (var j = 0; j < $this.refdatastore.length; j++) { |
| | | if ($this.refdatastore[j].attr == result[i].attr) { |
| | | $this.refdatastore[j].value = result[i].value; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | uni.showModal({ |
| | |
| | | }); |
| | | var $this = this; |
| | | var req = []; |
| | | var attrlist = $this.$data.classAttrList; |
| | | var attrlist = $this.classAttrList; |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | | var attr = attrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | |
| | | } |
| | | } |
| | | var objects = []; |
| | | var subPanelList = $this.$data.subPanelList; |
| | | var subPanelList = $this.subPanelList; |
| | | for (var s = 0; s < subPanelList.length; s++) { |
| | | var sub_req = []; |
| | | for (var i = 0; i < subPanelList[s].subClassAttr.length; i++) { |
| | |
| | | } |
| | | var dataJson = { |
| | | master_cls: { |
| | | cls_name: 'MBOX', //$this.$data.param.Master_Cls.Name, |
| | | cls_name: 'MBOX', //$this.param.Master_Cls.Name, |
| | | obj_attrs: req |
| | | }, |
| | | input_3037: $this.$data.scanCodeVal, //扫码内容 |
| | | op_type: $this.$data.param.OperationType, //作业类型定义 |
| | | input_3037: $this.scanCodeVal, //扫码内容 |
| | | op_type: $this.param.OperationType, //作业类型定义 |
| | | sub_cls: { |
| | | cls_name: 'MBOX', //$this.$data.param.Sub_Cls.Name, |
| | | cls_name: 'MBOX', //$this.param.Sub_Cls.Name, |
| | | objects: objects |
| | | } |
| | | }; |
| | |
| | | objid: '', |
| | | attr: JSON.stringify([]), |
| | | extinfo: JSON.stringify([]), |
| | | global_attr: JSON.stringify($this.$data.global_attr), |
| | | global_attr: JSON.stringify($this.global_attr), |
| | | dataJson: JSON.stringify(dataJson) |
| | | } |
| | | // console.log(JSON.stringify(dataInfo)); |
| | | console.log(dataInfo); |
| | | this.$store.dispatch('DataObjRunCustomEventInfo', dataInfo).then(success => { |
| | | dataObjRunCustomEvent(dataInfo).then(success => { |
| | | console.log(success); |
| | | uni.hideLoading(); |
| | | if (success.code == '00000') { |
| | | var data = JSON.parse(success.data); |
| | | var result = data.result; |
| | | if (eventID != $this.$data.param.After_OK_Event.ID) |
| | | $this.scan_OKDataObjRunCustomEvent($this.$data.param.After_OK_Event.ID); |
| | | // else { |
| | | // //刷新 |
| | | // uni.redirectTo({ |
| | | // url: '../modal/ms_classAttr?param=' + JSON.stringify($this.$data.param) + |
| | | // "&titlename=" + $this.$data.title |
| | | // }); |
| | | // } |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误8", |
| | | content: success.msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | var data = JSON.parse(success); |
| | | var result = data.result; |
| | | if (eventID != $this.param.After_OK_Event.ID) |
| | | $this.scan_OKDataObjRunCustomEvent($this.param.After_OK_Event.ID); |
| | | else { |
| | | //刷新 |
| | | uni.redirectTo({ |
| | | url: '../modal/ms_classAttr?param=' + JSON.stringify($this.param) + |
| | | "&titlename=" + $this.title |
| | | }); |
| | | } |
| | | |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | uni.hideLoading(); |
| | |
| | | }); |
| | | var $this = this; |
| | | var req = []; |
| | | var attrlist = $this.$data.classAttrList; |
| | | var attrlist = $this.classAttrList; |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | | var attr = attrlist[i].Attr; |
| | | for (var j = 0; j < attr.length; j++) { |
| | |
| | | } |
| | | } |
| | | var objects = []; |
| | | var subPanelList = $this.$data.subPanelList; |
| | | var subPanelList = $this.subPanelList; |
| | | for (var s = 0; s < subPanelList.length; s++) { |
| | | var sub_req = []; |
| | | for (var i = 0; i < subPanelList[s].subClassAttr.length; i++) { |
| | |
| | | } |
| | | var dataJson = { |
| | | master_cls: { |
| | | cls_name: 'MBOX', //$this.$data.param.Master_Cls.Name, |
| | | cls_name: 'MBOX', //$this.param.Master_Cls.Name, |
| | | obj_attrs: req |
| | | }, |
| | | input_3037: $this.$data.scanCodeVal, //扫码内容 |
| | | op_type: $this.$data.param.OperationType, //作业类型定义 |
| | | input_3037: $this.scanCodeVal, //扫码内容 |
| | | op_type: $this.param.OperationType, //作业类型定义 |
| | | sub_cls: { |
| | | cls_name: 'MBOX', //$this.$data.param.Sub_Cls.Name, |
| | | cls_name: 'MBOX', //$this.param.Sub_Cls.Name, |
| | | objects: objects |
| | | } |
| | | }; |
| | |
| | | objid: '', |
| | | attr: JSON.stringify([]), |
| | | extinfo: JSON.stringify([]), |
| | | global_attr: JSON.stringify($this.$data.global_attr), |
| | | global_attr: JSON.stringify($this.global_attr), |
| | | dataJson: JSON.stringify(dataJson) |
| | | } |
| | | // console.log(JSON.stringify(dataInfo)); |
| | | console.log(dataInfo); |
| | | this.$store.dispatch('DataObjRunCustomEventInfo', dataInfo).then(success => { |
| | | dataObjRunCustomEvent(dataInfo).then(success => { |
| | | console.log(success); |
| | | uni.hideLoading(); |
| | | if (success.code == '00000') { |
| | | var data = JSON.parse(success.data); |
| | | var result = data.result; |
| | | if (eventID != $this.$data.param.After_Trigger_Event.ID) |
| | | $this.scan_TriggerDataObjRunCustomEvent($this.$data.param.After_Trigger_Event.ID); |
| | | // else { |
| | | // //刷新 |
| | | // uni.redirectTo({ |
| | | // url: '../modal/ms_classAttr?param=' + JSON.stringify($this.$data.param) + |
| | | // "&titlename=" + $this.$data.title |
| | | // }); |
| | | // } |
| | | } else { |
| | | uni.showModal({ |
| | | title: "错误8", |
| | | content: success.msg, |
| | | showCancel: false, |
| | | confirmText: "取消" |
| | | var data = JSON.parse(success); |
| | | var result = data.result; |
| | | if (eventID != $this.param.After_Trigger_Event.ID) |
| | | $this.scan_TriggerDataObjRunCustomEvent($this.param.After_Trigger_Event.ID); |
| | | else { |
| | | //刷新 |
| | | uni.redirectTo({ |
| | | url: '../modal/ms_classAttr?param=' + JSON.stringify($this.param) + |
| | | "&titlename=" + $this.title |
| | | }); |
| | | } |
| | | |
| | | }).catch(ex => { |
| | | // console.log(ex); |
| | | uni.hideLoading(); |
| | |
| | | margin-top: 50rpx; |
| | | padding: 20rpx; |
| | | line-height: 1.5; |
| | | background: #27A6E1; |
| | | border: none; |
| | | color: #fff; |
| | | /* background: #27A6E1; */ |
| | | /* border: none; */ |
| | | background: #fff; |
| | | color: #000; |
| | | font-size: 38rpx; |
| | | font-weight: bold; |
| | | float: left; |
| | |
| | | .popup-footer { |
| | | float: right; |
| | | position: absolute; |
| | | bottom: 0; |
| | | bottom: 10rpx; |
| | | right: 20rpx; |
| | | } |
| | | |