| | |
| | | <view class="form-group" v-if="attr.Type=='字典' || attr.Type=='字典-字符串' || attr.Type=='字典-整数'" :style="{'display':attr.hidden == true?'none':''}"> |
| | | <view v-if="classattr.control_style=='上下布局'"> |
| | | <text class="tx_title" :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> |
| | | <picker class="section_iput" @change="onchange" :range="attr.dictitem" range-key="CN_S_NAME" v-if="attr.select==false" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" :disabled="attr.edit?false:true"> |
| | | <label class="">{{ attr.Value }}</label> |
| | | <!-- 单选 --> |
| | | <picker class="section_iput" @change="onchange" :range="attr.dictitem" range-key="CN_S_VALUE" v-if="attr.select==false" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" :disabled="attr.edit?false:true"> |
| | | <label class="">{{ attr.Label }}</label> |
| | | </picker> |
| | | <!-- 多选 --> |
| | | <select-cy :value="attr.Value" :name="attr.Name" :options="attr.dictitem" showClearIcon="true" @change="onchange2" v-else-if="attr.select==true" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" :disabled="attr.edit?false:true"></select-cy> |
| | | </view> |
| | | <view v-if="classattr.control_style=='左右布局'"> |
| | | <p class="tx_title2" :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}}:</p> |
| | | <picker class="section_iput attr_field" @change="onchange" :range="attr.dictitem" range-key="CN_S_NAME" v-if="attr.select==false" :data-index="index" :data-iindex="iindex" :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) +'%'}"> |
| | | <label class="">{{ attr.Value }}</label> |
| | | <!-- 单选 --> |
| | | <picker class="section_iput attr_field" @change="onchange" :range="attr.dictitem" range-key="CN_S_VALUE" v-if="attr.select==false" :data-index="index" :data-iindex="iindex" :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) +'%'}"> |
| | | <label class="">{{ attr.Label }}</label> |
| | | </picker> |
| | | <!-- 多选 --> |
| | | <select-cy :value="attr.Value" :name="attr.Name" :options="attr.dictitem" showClearIcon="true" @change="onchange2" v-else-if="attr.select==true" :data-index="index" :data-iindex="iindex" :style="{'display':'inline-block','margin-left':'8px','width':attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) +'%'}"></select-cy> |
| | | </view> |
| | | </view> |
| | |
| | | } |
| | | }, |
| | | class_attr_init(){ |
| | | var attrlist = this.$data.classGridStyle.StyleDef.show_style |
| | | var attrlist = this.$data.classGridStyle.StyleDef.show_style; |
| | | var newattrlist = []; |
| | | if (this.$data.classAttrList.length > 0) { |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | |
| | | var attrs = attrlist[i].attrs; |
| | | for (var s = 0; s < this.$data.classAttrList.length; s++) { |
| | | var clsattr = this.$data.classAttrList[s]; |
| | | if (name == clsattr.Name) { |
| | | // if (name == clsattr.Name) { |
| | | var attr = []; |
| | | for (var j = 0; j < attrs.length; j++) { |
| | | for (var l = 0; l < clsattr.Attr.length; l++) { |
| | |
| | | ca.Value = '请选择';//ca.dictitem[0].CN_S_NAME; |
| | | var dictitemlist=[]; |
| | | for (var d = 0; d < ca.dictitem.length; d++) { |
| | | ca.dictitem[d].label=ca.dictitem[d].CN_S_NAME; |
| | | ca.dictitem[d].label=ca.dictitem[d].CN_S_VALUE; |
| | | ca.dictitem[d].value=ca.dictitem[d].CN_S_NAME; |
| | | ca.dictitem[d].attr=ca.Name; |
| | | if(ca.dictitem[d].CN_C_IS_DEFAULT=='1') |
| | | if(ca.dictitem[d].CN_C_IS_DEFAULT=='1'){ |
| | | ca.Label=ca.dictitem[d].CN_S_VALUE; |
| | | ca.Value=ca.dictitem[d].CN_S_NAME; |
| | | } |
| | | } |
| | | console.log(ca.dictitem); |
| | | } |
| | | if(ca.Type=='日期' || ca.Type=='时间'){ |
| | | var nowDate = new Date(); |
| | |
| | | Font:this.$data.classGridStyle.StyleDef.Font?this.$data.classGridStyle.StyleDef.Font:{}, |
| | | Bk_Color:this.$data.classGridStyle.StyleDef.Bk_Color?this.$data.classGridStyle.StyleDef.Bk_Color:'#FFFFFF', |
| | | Text_Color:this.$data.classGridStyle.StyleDef.Text_Color?this.$data.classGridStyle.StyleDef.Text_Color:'#000000' |
| | | }) |
| | | } |
| | | }); |
| | | // } |
| | | } |
| | | } |
| | | if (newattrlist.length > 0) { |
| | |
| | | } |
| | | }, |
| | | subClass_attr_init(){ |
| | | var attrlist = this.$data.subClassGridStyle.StyleDef.show_style |
| | | var attrlist = this.$data.subClassGridStyle.StyleDef.show_style; |
| | | var newattrlist = []; |
| | | if (this.$data.subClassAttrList.length > 0) { |
| | | for (var i = 0; i < attrlist.length; i++) { |
| | |
| | | var attrs = attrlist[i].attrs; |
| | | for (var s = 0; s < this.$data.subClassAttrList.length; s++) { |
| | | var clsattr = this.$data.subClassAttrList[s]; |
| | | if (name == clsattr.Name) { |
| | | // if (name == clsattr.Name) { |
| | | var attr = []; |
| | | for (var j = 0; j < attrs.length; j++) { |
| | | for (var l = 0; l < clsattr.Attr.length; l++) { |
| | |
| | | ca.Value = '请选择';//ca.dictitem[0].CN_S_NAME; |
| | | var dictitemlist=[]; |
| | | for (var d = 0; d < ca.dictitem.length; d++) { |
| | | ca.dictitem[d].label=ca.dictitem[d].CN_S_NAME; |
| | | ca.dictitem[d].label=ca.dictitem[d].CN_S_VALUE; |
| | | ca.dictitem[d].value=ca.dictitem[d].CN_S_NAME; |
| | | ca.dictitem[d].attr=ca.Name; |
| | | if(ca.dictitem[d].CN_C_IS_DEFAULT=='1') |
| | | if(ca.dictitem[d].CN_C_IS_DEFAULT=='1'){ |
| | | ca.Label=ca.dictitem[d].CN_S_VALUE; |
| | | ca.Value=ca.dictitem[d].CN_S_NAME; |
| | | } |
| | | } |
| | | } |
| | | if(ca.Type=='日期' || ca.Type=='时间'){ |
| | |
| | | Font:this.$data.subClassGridStyle.StyleDef.Font?this.$data.subClassGridStyle.StyleDef.Font:{}, |
| | | Bk_Color:this.$data.subClassGridStyle.StyleDef.Bk_Color?this.$data.subClassGridStyle.StyleDef.Bk_Color:'#FFFFFF', |
| | | Text_Color:this.$data.subClassGridStyle.StyleDef.Text_Color?this.$data.subClassGridStyle.StyleDef.Text_Color:'#000000' |
| | | }) |
| | | } |
| | | }); |
| | | // } |
| | | } |
| | | } |
| | | if (newattrlist.length > 0) { |
| | |
| | | userlogin: '', |
| | | clsid: 'MBOX',//this.$data.param.Sub_Cls.ID, |
| | | objid: "", |
| | | attr: req, |
| | | mast_attr: mast_req, |
| | | attr: mast_req, |
| | | sub_attr: req, |
| | | inputParamter:[{ attr: 'input_3037', value: this.$data.scanCodeVal }] |
| | | } |
| | | |
| | |
| | | userlogin: '', |
| | | clsid: 'MBOX',//this.$data.param.Sub_Cls.ID, |
| | | objid: "", |
| | | attr: req, |
| | | mast_attr: mast_req, |
| | | attr: mast_req, |
| | | sub_attr: req, |
| | | inputParamter:[{ attr: 'input_3037', value: this.$data.scanCodeVal }] |
| | | } |
| | | |
| | |
| | | else uni.showModal({title:'提示',content:tip+',提示:'+data.ret,showCancel:false,confirmText:"取消"}); |
| | | return false |
| | | }else{ |
| | | let tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join('<br/>') : ''; |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join('<br/>') : ''; |
| | | if (tip) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"}); |
| | | |
| | | if(data.action){ |
| | |
| | | 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}); |
| | | dictItemList.push({"CN_S_NAME":val,"CN_S_VALUE":val,"Name":val,"label":val,"value":val}); |
| | | |
| | | } |
| | | ca.dictitem = dictItemList; |
| | |
| | | else uni.showModal({title:'提示',content:tip+',提示:'+data.ret,showCancel:false,confirmText:"取消"}); |
| | | return false |
| | | }else{ |
| | | let tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join('<br/>') : ''; |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join('<br/>') : ''; |
| | | if (tip) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"}); |
| | | |
| | | var actionlist = data.action; |
| | |
| | | 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}); |
| | | dictItemList.push({"CN_S_NAME":val,"CN_S_VALUE":val,"Name":val,"label":val,"value":val}); |
| | | } |
| | | attr[j].dictitem = dictItemList; |
| | | // attr[j].dictitem = result[i].choice_list; |
| | |
| | | else uni.showModal({title:'提示',content:tip+',提示:'+data.ret,showCancel:false,confirmText:"取消"}); |
| | | return false |
| | | }else{ |
| | | let tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join('<br/>') : ''; |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join('<br/>') : ''; |
| | | if (tip) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"}); |
| | | |
| | | var result = data.result; |
| | |
| | | else uni.showModal({title:'提示',content:tip+',提示:'+data.ret,showCancel:false,confirmText:"取消"}); |
| | | return false |
| | | }else{ |
| | | let tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join('<br/>') : ''; |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join('<br/>') : ''; |
| | | if (tip) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"}); |
| | | |
| | | if (data != "") { |
| | |
| | | }); |
| | | }, |
| | | scan_ini_DataObjRunCustomEvent(info){ |
| | | var obj_attr={}; |
| | | info.attr.forEach(item=>{ |
| | | obj_attr[item.attr] = item.value; |
| | | }); |
| | | var param = { |
| | | EditStyle: this.$data.param.Sub_Cls.View_Style.Name, |
| | | ViewStyle: this.$data.param.Sub_Cls.View_Style.Name, |
| | |
| | | master: { |
| | | cls_id: this.$data.param.Sub_Cls.ID, // button=bottom时 master的cls_id |
| | | //obj_id: '' // button=bottom时 master的obj_id |
| | | obj_attrs:obj_attr, |
| | | } |
| | | } |
| | | } |
| | |
| | | // attr: JSON.stringify(info.attr), extinfo: JSON.stringify(param), inputparameter: inputparameter, global_attr: global_attr |
| | | // } |
| | | param = Base64.encode(JSON.stringify(param));//将字符串转换为base64编码 |
| | | var obj_attr={}; |
| | | info.attr.forEach(item=>{ |
| | | obj_attr[item.attr] = item.val; |
| | | }); |
| | | |
| | | if(!info.eventid.includes('{')) info.eventid= '{'+ info.eventid +'}'; |
| | | var dataInfo={ |
| | | ed_type: info.edtype, |
| | |
| | | else uni.showModal({title:'提示',content:tip+',提示:'+data.ret,showCancel:false,confirmText:"取消"}); |
| | | return false |
| | | }else{ |
| | | let tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join('<br/>') : ''; |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join('<br/>') : ''; |
| | | if (tip) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"}); |
| | | |
| | | var actionlist = data.action; |
| | |
| | | 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}); |
| | | dictItemList.push({"CN_S_NAME":val,"CN_S_VALUE":val,"Name":val,"label":val,"value":val}); |
| | | |
| | | } |
| | | ca.dictitem = dictItemList; |
| | |
| | | }, |
| | | scan_DataObjRunCustomEvent(info,data_attr){ |
| | | var $this = this; |
| | | var obj_attr={}; |
| | | info.attr.forEach(item=>{ |
| | | obj_attr[item.attr] = item.value; |
| | | }); |
| | | var enviroment = {}; |
| | | if(info.enviroment){ |
| | | enviroment = info.enviroment; |
| | |
| | | type: 'small', //小窗口 |
| | | class_id: 'MBOX', //this.$data.param.Sub_Cls.ID,//当前数据类id |
| | | }, |
| | | master: { |
| | | cls_id: info.clsid, // button=bottom时 master的cls_id |
| | | //obj_id: '' // button=bottom时 master的obj_id |
| | | obj_attrs:obj_attr, |
| | | } |
| | | }; |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | enviroment = Base64.encode(JSON.stringify(enviroment));//将字符串转换为base64编码 |
| | | var inputParamter=info.inputParamter; |
| | | if(info.inputParamter){ |
| | | info.inputParamter = Base64.encode(JSON.stringify(info.inputParamter));//将字符串转换为base64编码 |
| | | } |
| | | var global_attr = Base64.encode(JSON.stringify(this.$data.global_attr));//将字符串转换为base64编码 |
| | | |
| | | var obj_attr={}; |
| | | info.attr.forEach(item=>{ |
| | | obj_attr[item.attr] = item.val; |
| | | }); |
| | | if(!info.eventid.includes('{')) info.eventid= '{'+ info.eventid +'}'; |
| | | var dataInfo={ |
| | | ed_type: info.edtype, |
| | |
| | | else uni.showModal({title:'提示',content:tip+',提示:'+data.ret,showCancel:false,confirmText:"取消"}); |
| | | return false |
| | | }else{ |
| | | let tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join('<br/>') : ''; |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join('<br/>') : ''; |
| | | if (tip) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"}); |
| | | |
| | | var actionlist = data.action; |
| | |
| | | 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}); |
| | | dictItemList.push({"CN_S_NAME":val,"CN_S_VALUE":val,"Name":val,"label":val,"value":val}); |
| | | } |
| | | attr[j].dictitem = dictItemList; |
| | | // attr[j].dictitem = result[i].choice_list; |
| | |
| | | } 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 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") //判断是主数据类扫码查询数据 |
| | | if (inputParamter[0].attr) { |
| | | if (inputParamter[0].attr == "mast_input_3037") //判断是主数据类扫码查询数据 |
| | | scanCodeVal = "mast_input_3037-" + rand; |
| | | } |
| | | if (info.attr[0].attr) { |
| | |
| | | // $this.$data.subPanelList[s].subClassAttr=list_1; |
| | | } |
| | | } |
| | | |
| | | var length = 0; |
| | | if (!$this.$data.refdatastore.filter(function (s) { |
| | | return result[i].attr == s.attr |
| | |
| | | } |
| | | |
| | | if (data.result) { |
| | | let list_1 = JSON.parse(JSON.stringify(this.$data.subClassAttrList)); |
| | | var 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; |
| | | var rand = ''; |
| | | for (var i = 0; i < 5; i++) { //生成5位随机数 |
| | | rand += Math.floor(Math.random() * 10); |
| | | } |
| | | if (inputParamter[0].attr) { |
| | | if (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 |
| | |
| | | else uni.showModal({title:'提示',content:tip+',提示:'+data.ret,showCancel:false,confirmText:"取消"}); |
| | | return false |
| | | }else{ |
| | | let tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join('<br/>') : ''; |
| | | var tip = data.info ? typeof data.info == 'string' ? data.info : data.info.join('<br/>') : ''; |
| | | if (tip) uni.showModal({title:'提示',content:tip,showCancel:false,confirmText:"取消"}); |
| | | |
| | | var result = data.result; |