<template>
|
<view class="content" :class="largeMode?'large-mode':''">
|
<!-- 主数据 -->
|
<view class="v-area" v-for="(classattr,index) in classAttrList">
|
<div class="class_attr_title" style="display: none;">
|
<div class="title_line"></div>
|
<div class="title_icon" :style="{'background-color':classattr.BkColor}">
|
<i class="ace-icon fa" :class="classattr.ImgFontStyle"></i>
|
</div>
|
<span class="title">{{classattr.Name}}</span>
|
<a href="javascript:;" class="arrow" @tap="onarrow(index,classattr.Open)"><i class="ace-icon fa "
|
:class="classattr.Open?'fa-angle-down':'fa-angle-up'"></i></a>
|
</div>
|
<!-- 主数据显示详情区 -->
|
<div class="class_attr_body" :style="{'display':classattr.Open?'block':'none'}">
|
<div class="dv_field_div" v-for="(attr,iindex) in classattr.Attr">
|
<view class="form-group"
|
v-if="attr.Type=='字符串' || attr.Type=='可变长字符串' || attr.Type=='整数' || attr.Type=='浮点数' ||attr.Type=='char' || attr.Type=='varchar' || attr.Type=='int' || attr.Type=='float'"
|
: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>
|
<!-- attr.NotEmpty=='1' -->
|
<div class="text-right" v-if="attr.ext_button==true">
|
<a @tap="classAttr_extButton(index,iindex)"><i
|
class="ace-icon fa fa-plus-circle"></i></a>
|
</div>
|
<!-- <div style='width: 100px;position: relative;'>
|
<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'"
|
: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'"
|
: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'"
|
:data-index="index" :data-iindex="iindex" style="height:90px;"
|
:style="{'width':attr.Width}" :disabled="attr.edit?false:true"></textarea>
|
<!-- </div> -->
|
</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>
|
<!-- <div style='width: 100%;position: relative;'>
|
<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"
|
: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"
|
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"
|
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) +'%'}"
|
:disabled="attr.edit?false:true"></textarea>
|
<!-- </div> -->
|
<div class="text-right2" v-if="attr.ext_button==true">
|
<a @tap="classAttr_extButton(index,iindex)"><i
|
class="ace-icon fa fa-plus-circle"></i></a>
|
</div>
|
</view>
|
</view>
|
<view class="form-group" v-if="attr.Type=='布尔值' || attr.Type=='bool'"
|
:style="{'display':attr.hidden == true?'none':''}">
|
<checkbox-group class="check_rememberPwd" @change="oncheck" :data-ischeck="attr.Value"
|
:data-index="index" :data-iindex="iindex"
|
:style="{'margin-left': classattr.control_style=='左右布局'?classattr.title_p_wdith+2 +'%':'10rpx'}">
|
<label>
|
<checkbox :value="attr.Value" :checked="attr.Value" />
|
<text>{{attr.DispName}}<i class="i_tishi" v-if="attr.notempty==true">*</i></text>
|
</label>
|
</checkbox-group>
|
</view>
|
<view class="form-group"
|
v-if="attr.Type=='日期' || attr.Type=='时间' || attr.Type=='date' || attr.Type=='datetime'"
|
: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 mode="date" :value="attr.Value" @change="ondateTime" class="date_iput"
|
:data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}">
|
<view class="picker">{{attr.Value}}</view>
|
</picker>
|
</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 mode="date" :value="attr.Value" @change="ondateTime" class="date_iput attr_field"
|
:data-index="index" :data-iindex="iindex"
|
:style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) +'%'}">
|
<view class="picker">{{attr.Value}}</view>
|
</picker>
|
</view>
|
</view>
|
<view class="form-group"
|
v-if="attr.Type=='字典' || attr.Type=='字典-字符串' || attr.Type=='字典-整数' || attr.Type=='dict' || attr.Type=='dict-char' || attr.Type=='dict-int'"
|
: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_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_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>
|
<view class="form-group"
|
v-if="attr.Type=='引用对象(单个)' || attr.Type=='引用对象(多个)' ||attr.Type=='obj-ref' || attr.Type=='obj-ref-multi'"
|
: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>
|
<div class="text-right" v-if="attr.Type=='引用对象(单个)' ||attr.Type=='obj-ref'">
|
<a @tap="classAttr_AddRef" :data-classid="attr.RelCls[0].id"
|
:data-classname="attr.RelCls[0].name"><i class="ace-icon fa fa-plus-circle"></i></a>
|
</div>
|
<div class="text-right" v-if="attr.Type=='引用对象(多个)'|| attr.Type=='obj-ref-multi'">
|
<picker class="select" @change="classAttr_AddRef" :range="attr.RelClsList"
|
range-key="name" :data-index="index" :data-iindex="iindex">
|
<label class="">{{ attr.Value }}</label>
|
</picker>
|
<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" :maxlength="-1">
|
</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>
|
<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" :maxlength="-1">
|
<div class="text-right2" v-if="attr.Type=='引用对象(单个)'|| attr.Type=='obj-ref'">
|
<a @tap="classAttr_AddRef" :data-classid="attr.RelCls[0].id"
|
:data-classname="attr.RelCls[0].name"><i class="ace-icon fa fa-plus-circle"></i></a>
|
</div>
|
<div class="text-right2" v-if="attr.Type=='引用对象(多个)'|| attr.Type=='obj-ref-multi'">
|
<picker class="select" @change="classAttr_AddRef" :range="attr.RelClsList"
|
range-key="name" :data-index="index" :data-iindex="iindex">
|
<label class="">{{ attr.Value }}</label>
|
</picker>
|
<a class="class_attr_add_ref"><i class="ace-icon fa fa-plus-circle"></i></a>
|
</div>
|
</view>
|
</view>
|
<view class="form-group" v-if="attr.Type=='引用人员' ||attr.Type=='user' "
|
: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>
|
<div class="text-right">
|
<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"
|
:maxlength="-1">
|
</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>
|
<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" :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>
|
</div>
|
</view>
|
</view>
|
<view class="form-group" v-if="attr.Type=='引用项目' ||attr.Type=='project'"
|
: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>
|
<div class="text-right">
|
<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"
|
:maxlength="-1">
|
</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>
|
<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" :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>
|
</div>
|
</view>
|
</view>
|
<view class="form-group" v-if="attr.Type=='编码' || attr.Type=='code'"
|
: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>
|
<input type="text" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}"
|
:disabled="attr.edit?false:true" :maxlength="-1">
|
</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+'%'}">
|
{{attr.DispName}}:
|
</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" :maxlength="-1">
|
<i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i>
|
</view>
|
</view>
|
<view class="form-group" v-if="attr.Type=='省市区' ||attr.Type=='region'"
|
: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>
|
<pickerAddress class="date_iput" @change="addresschange" :data-index="index"
|
:data-iindex="iindex" :style="{'width':attr.Width}">{{attr.Value}}</pickerAddress>
|
</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>
|
<pickerAddress class="date_iput attr_field" @change="addresschange" :data-index="index"
|
:data-iindex="iindex"
|
:style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true ?10:5) +'%'}">
|
{{attr.Value}}
|
</pickerAddress>
|
</view>
|
</view>
|
</div>
|
</div>
|
</view>
|
|
<!-- 从数据 -->
|
<view class="v-panel">
|
<div class="panel_title">{{param.Sub_Cls.Title}}</div>
|
<!-- 从数据扫码区 -->
|
<view class="v-area class_attr_body" v-if="param.Sub_Cls.Can_Add_Delete == true">
|
<h4 style="margin: 15rpx 0 0 30rpx;font-weight: bold;">
|
{{`${translateSys('add2')}'${param.Sub_Cls.Name}'` }}
|
</h4>
|
<view class="form-group">
|
<!-- 左右布局 -->
|
<p class="tx_title2">{{param.Scan_Code.Name}}:</p>
|
<input type="text" class="attr_field" :value="scanCodeVal" @focus="scan_ontap" @blur="scan_onevent"
|
:style="param.Scan_Code.Have_Select_Button==true?'width: '+(100-(param.Scan_Code.Name.length * 5)-14)+'%;':'width: '+(100-(param.Scan_Code.Name.length * 5)-5)+'%;'"
|
: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>
|
</div>
|
<!-- 上下布局 -->
|
<!-- <text class="tx_title">{{param.Scan_Code.Name}}:</text>
|
<div class="text-right" v-if="param.Scan_Code.Have_Select_Button==true">
|
<a @tap="ms_classAttr_extButton()"><i class="ace-icon fa" :class="param.Scan_Code.Img?param.Scan_Code.Img:'fa-plus-circle'"></i></a>
|
</div>
|
<input type="text" value="" > -->
|
</view>
|
</view>
|
<!-- 从数据显示详情区 -->
|
<view class="v-panellist" v-for="(subpanel,iiindex) in subPanelList">
|
<view class="v-area" v-for="(subclassattr,index) in subpanel.subClassAttr">
|
<div class="class_attr_title" style="display: none;">
|
<div class="title_line"></div>
|
<div class="title_icon" :style="{'background-color':subclassattr.BkColor}">
|
<i class="ace-icon fa" :class="subclassattr.ImgFontStyle"></i>
|
</div>
|
<span class="title">{{subclassattr.Name}}</span>
|
<a href="javascript:;" class="arrow" @tap="onarrow(index,subclassattr.Open)"><i
|
class="ace-icon fa " :class="subclassattr.Open?'fa-angle-down':'fa-angle-up'"></i></a>
|
</div>
|
<div class="subclass_attr_body" :style="{'display':subclassattr.Open?'block':'none'}">
|
<div class="dv_field_div" v-for="(attr,iindex) in subclassattr.Attr">
|
<view class="form-group"
|
v-if="attr.Type=='字符串' || attr.Type=='可变长字符串' || attr.Type=='整数' || attr.Type=='浮点数' ||attr.Type=='char' || attr.Type=='varchar' || attr.Type=='int' || attr.Type=='float'"
|
:style="{'display':attr.hidden == true?'none':''}">
|
<view v-if="subclassattr.control_style=='上下布局'">
|
<text class="tx_title"
|
:style="{'font-family':subclassattr.Font.Name?subclassattr.Font.Name:'initial','font-size':subclassattr.Font.Size?subclassattr.Font.Size:'initial','font-weight':subclassattr.Font.Bold?'bold':'initial','font-style':subclassattr.Font.Tilt?'italic':'initial','text-decoration':subclassattr.Font.Underline?'underline':'initial','background-color':subclassattr.Font.Bk_Color,'color':subclassattr.Font.Text_Color,'width':subclassattr.title_p_wdith +'%'}"><i
|
class="i_tishi" v-if="attr.notempty==true">*</i>{{attr.DispName}}:</text>
|
<!-- attr.NotEmpty=='1' -->
|
<div class="text-right" v-if="attr.ext_button==true">
|
<a @tap="classAttr_extButton(index,iindex)"><i
|
class="ace-icon fa fa-plus-circle"></i></a>
|
</div>
|
<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'"
|
:data-iiindex="iiindex" :data-index="index" :data-iindex="iindex"
|
:style="{'width':attr.Width.split('%')[0] - 2.5 +'%'}"
|
:disabled="attr.edit?false:true"> <!-- =='flase'?true:false -->
|
<textarea :value="attr.Value" @focus="ontap" @blur="onevent"
|
v-else-if="attr.Height=='2'" :data-iiindex="iiindex" :data-index="index"
|
:data-iindex="iindex" style="height:60px;"
|
:style="{'width':attr.Width.split('%')[0] - 2.5 +'%'}"
|
:disabled="attr.edit?false:true"></textarea>
|
<textarea :value="attr.Value" @focus="ontap" @blur="onevent"
|
v-else-if="attr.Height=='3'" :data-iiindex="iiindex" :data-index="index"
|
:data-iindex="iindex" style="height:90px;"
|
:style="{'width':attr.Width.split('%')[0] - 2.5 +'%'}"
|
:disabled="attr.edit?false:true"></textarea>
|
</view>
|
<view v-if="subclassattr.control_style=='左右布局'">
|
<p class="tx_title2"
|
:style="{'font-family':subclassattr.Font.Name?subclassattr.Font.Name:'initial','font-size':subclassattr.Font.Size?subclassattr.Font.Size:'initial','font-weight':subclassattr.Font.Bold?'bold':'initial','font-style':subclassattr.Font.Tilt?'italic':'initial','text-decoration':subclassattr.Font.Underline?'underline':'initial','background-color':subclassattr.Font.Bk_Color,'color':subclassattr.Font.Text_Color,'width':subclassattr.title_p_wdith +'%'}">
|
<i class="i_tishi" v-if="attr.notempty==true">*</i>{{attr.DispName}}:
|
</p>
|
<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-iiindex="iiindex" :data-index="index"
|
:data-iindex="iindex"
|
:style="{'width': attr.Width.split('%')[0] - subclassattr.title_p_wdith - 7 - (attr.ext_button==true?9:0) +'%'}"
|
:disabled="attr.edit?false:true">
|
<textarea class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent"
|
v-else-if="attr.Height=='2'" :data-iiindex="iiindex" :data-index="index"
|
:data-iindex="iindex" style="height:60px;"
|
:style="{'width': attr.Width.split('%')[0] - subclassattr.title_p_wdith - 7 - (attr.ext_button==true?9:0) +'%'}"
|
:disabled="attr.edit?false:true"></textarea>
|
<textarea class="attr_field" :value="attr.Value" @focus="ontap" @blur="onevent"
|
v-else-if="attr.Height=='3'" :data-iiindex="iiindex" :data-index="index"
|
:data-iindex="iindex" style="height:90px;"
|
:style="{'width': attr.Width.split('%')[0] - subclassattr.title_p_wdith - 7 - (attr.ext_button==true?9:0) +'%'}"
|
:disabled="attr.edit?false:true"></textarea>
|
<div class="text-right2" v-if="attr.ext_button==true">
|
<a @tap="classAttr_extButton(index,iindex)"><i
|
class="ace-icon fa fa-plus-circle"></i></a>
|
</div>
|
</view>
|
</view>
|
<view class="form-group" v-if="attr.Type=='布尔值' ||attr.Type=='bool'"
|
:style="{'display':attr.hidden == true?'none':''}">
|
<checkbox-group class="check_rememberPwd" @change="oncheck" :data-ischeck="attr.Value"
|
:data-iiindex="iiindex" :data-index="index" :data-iindex="iindex"
|
:style="{'margin-left': subclassattr.control_style=='左右布局'?subclassattr.title_p_wdith+2 +'%':'10rpx'}">
|
<label>
|
<checkbox :value="attr.Value" :checked="attr.Value" />
|
<text>{{attr.DispName}}<i class="i_tishi"
|
v-if="attr.notempty==true">*</i></text>
|
</label>
|
</checkbox-group>
|
</view>
|
<view class="form-group"
|
v-if="attr.Type=='日期' || attr.Type=='时间' ||attr.Type=='date' || attr.Type=='datetime'"
|
:style="{'display':attr.hidden == true?'none':''}">
|
<view v-if="subclassattr.control_style=='上下布局'">
|
<text class="tx_title"
|
:style="{'font-family':subclassattr.Font.Name?subclassattr.Font.Name:'initial','font-size':subclassattr.Font.Size?subclassattr.Font.Size:'initial','font-weight':subclassattr.Font.Bold?'bold':'initial','font-style':subclassattr.Font.Tilt?'italic':'initial','text-decoration':subclassattr.Font.Underline?'underline':'initial','background-color':subclassattr.Font.Bk_Color,'color':subclassattr.Font.Text_Color,'width':subclassattr.title_p_wdith+'%'}"><i
|
class="i_tishi" v-if="attr.notempty==true">*</i>{{attr.DispName}}:</text>
|
<picker mode="date" :value="attr.Value" @change="ondateTime" class="date_iput"
|
:data-iiindex="iiindex" :data-index="index" :data-iindex="iindex"
|
:style="{'width':attr.Width.split('%')[0] - 2.5 +'%'}">
|
<view class="picker">{{attr.Value}}</view>
|
</picker>
|
</view>
|
<view v-if="subclassattr.control_style=='左右布局'">
|
<p class="tx_title2"
|
:style="{'font-family':subclassattr.Font.Name?subclassattr.Font.Name:'initial','font-size':subclassattr.Font.Size?subclassattr.Font.Size:'initial','font-weight':subclassattr.Font.Bold?'bold':'initial','font-style':subclassattr.Font.Tilt?'italic':'initial','text-decoration':subclassattr.Font.Underline?'underline':'initial','background-color':subclassattr.Font.Bk_Color,'color':subclassattr.Font.Text_Color,'width':subclassattr.title_p_wdith+'%'}">
|
<i class="i_tishi" v-if="attr.notempty==true">*</i>{{attr.DispName}}:
|
</p>
|
<picker mode="date" :value="attr.Value" @change="ondateTime"
|
class="date_iput attr_field" :data-iiindex="iiindex" :data-index="index"
|
:data-iindex="iindex"
|
:style="{'width': attr.Width.split('%')[0] - subclassattr.title_p_wdith - 7 +'%'}">
|
<view class="picker">{{attr.Value}}</view>
|
</picker>
|
</view>
|
</view>
|
<view class="form-group"
|
v-if="attr.Type=='字典' || attr.Type=='字典-字符串' || attr.Type=='字典-整数' ||attr.Type=='dict' || attr.Type=='dict-char' || attr.Type=='dict-int'"
|
:style="{'display':attr.hidden == true?'none':''}">
|
<view v-if="subclassattr.control_style=='上下布局'">
|
<text class="tx_title"
|
:style="{'font-family':subclassattr.Font.Name?subclassattr.Font.Name:'initial','font-size':subclassattr.Font.Size?subclassattr.Font.Size:'initial','font-weight':subclassattr.Font.Bold?'bold':'initial','font-style':subclassattr.Font.Tilt?'italic':'initial','text-decoration':subclassattr.Font.Underline?'underline':'initial','background-color':subclassattr.Font.Bk_Color,'color':subclassattr.Font.Text_Color,'width':subclassattr.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-iiindex="iiindex"
|
:data-index="index" :data-iindex="iindex"
|
:style="{'width':attr.Width.split('%')[0] - 2.5 +'%'}"
|
:disabled="attr.edit?false:true">
|
<label class="">{{ attr.Value }}</label>
|
</picker>
|
<select-cy :value="attr.Value" :name="attr.Name" :options="attr.dictitem"
|
showClearIcon="true" @change="sub_onchange2" v-else-if="attr.select==true"
|
:data-iiindex="iiindex" :data-index="index" :data-iindex="iindex"
|
:style="{'width':attr.Width.split('%')[0] - 2.5 +'%'}"
|
:disabled="attr.edit?false:true"></select-cy>
|
</view>
|
<view v-if="subclassattr.control_style=='左右布局'">
|
<p class="tx_title2"
|
:style="{'font-family':subclassattr.Font.Name?subclassattr.Font.Name:'initial','font-size':subclassattr.Font.Size?subclassattr.Font.Size:'initial','font-weight':subclassattr.Font.Bold?'bold':'initial','font-style':subclassattr.Font.Tilt?'italic':'initial','text-decoration':subclassattr.Font.Underline?'underline':'initial','background-color':subclassattr.Font.Bk_Color,'color':subclassattr.Font.Text_Color,'width':subclassattr.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-iiindex="iiindex"
|
:data-index="index" :data-iindex="iindex"
|
:style="{'width': attr.Width.split('%')[0] - subclassattr.title_p_wdith - 7 +'%'}">
|
<label class="">{{ attr.Value }}</label>
|
</picker>
|
<select-cy :value="attr.Value" :name="attr.Name" :options="attr.dictitem"
|
showClearIcon="true" @change="sub_onchange2" v-else-if="attr.select==true"
|
:data-iiindex="iiindex" :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>
|
<view class="form-group"
|
v-if="attr.Type=='引用对象(单个)' || attr.Type=='引用对象(多个)' || attr.Type=='obj-ref' || attr.Type=='obj-ref-multi'"
|
:style="{'display':attr.hidden == true?'none':''}">
|
<view v-if="subclassattr.control_style=='上下布局'">
|
<text class="tx_title"
|
:style="{'font-family':subclassattr.Font.Name?subclassattr.Font.Name:'initial','font-size':subclassattr.Font.Size?subclassattr.Font.Size:'initial','font-weight':subclassattr.Font.Bold?'bold':'initial','font-style':subclassattr.Font.Tilt?'italic':'initial','text-decoration':subclassattr.Font.Underline?'underline':'initial','background-color':subclassattr.Font.Bk_Color,'color':subclassattr.Font.Text_Color,'width':subclassattr.title_p_wdith+'%'}"><i
|
class="i_tishi" v-if="attr.notempty==true">*</i>{{attr.DispName}}:</text>
|
<div class="text-right" v-if="attr.Type=='引用对象(单个)' || attr.Type=='obj-ref'">
|
<a @tap="classAttr_AddRef" :data-classid="attr.RelCls[0].id"
|
:data-classname="attr.RelCls[0].name"><i
|
class="ace-icon fa fa-plus-circle"></i></a>
|
</div>
|
<div class="text-right" v-if="attr.Type=='引用对象(多个)' || attr.Type=='obj-ref-multi'">
|
<picker class="select" @change="classAttr_AddRef" :range="attr.RelClsList"
|
range-key="name" :data-iiindex="iiindex" :data-index="index"
|
:data-iindex="iindex">
|
<label class="">{{ attr.Value }}</label>
|
</picker>
|
<a class="class_attr_add_ref"><i class="ace-icon fa fa-plus-circle"></i></a>
|
</div>
|
<input type="text" :data-iiindex="iiindex" :data-index="index" :data-iindex="iindex"
|
:style="{'width':attr.Width}" disabled="true" :maxlength="-1">
|
</view>
|
<view v-if="subclassattr.control_style=='左右布局'">
|
<p class="tx_title2"
|
:style="{'font-family':subclassattr.Font.Name?subclassattr.Font.Name:'initial','font-size':subclassattr.Font.Size?subclassattr.Font.Size:'initial','font-weight':subclassattr.Font.Bold?'bold':'initial','font-style':subclassattr.Font.Tilt?'italic':'initial','text-decoration':subclassattr.Font.Underline?'underline':'initial','background-color':subclassattr.Font.Bk_Color,'color':subclassattr.Font.Text_Color,'width':subclassattr.title_p_wdith+'%'}">
|
<i class="i_tishi" v-if="attr.notempty==true">*</i>{{attr.DispName}}:
|
</p>
|
<input type="text" class="attr_field" :data-iiindex="iiindex" :data-index="index"
|
:data-iindex="iindex"
|
:style="{'width': attr.Width.split('%')[0] - subclassattr.title_p_wdith - 16 +'%'}"
|
disabled="true" :maxlength="-1">
|
<div class="text-right2" v-if="attr.Type=='引用对象(单个)' || attr.Type=='obj-ref'">
|
<a @tap="classAttr_AddRef" :data-classid="attr.RelCls[0].id"
|
:data-classname="attr.RelCls[0].name"><i
|
class="ace-icon fa fa-plus-circle"></i></a>
|
</div>
|
<div class="text-right2" v-if="attr.Type=='引用对象(多个)' || attr.Type=='obj-ref-multi'">
|
<picker class="select" @change="classAttr_AddRef" :range="attr.RelClsList"
|
range-key="name" :data-iiindex="iiindex" :data-index="index"
|
:data-iindex="iindex">
|
<label class="">{{ attr.Value }}</label>
|
</picker>
|
<a class="class_attr_add_ref"><i class="ace-icon fa fa-plus-circle"></i></a>
|
</div>
|
</view>
|
</view>
|
<view class="form-group" v-if="attr.Type=='引用人员' ||attr.Type=='user'"
|
:style="{'display':attr.hidden == true?'none':''}">
|
<view v-if="subclassattr.control_style=='上下布局'">
|
<text class="tx_title"
|
:style="{'font-family':subclassattr.Font.Name?subclassattr.Font.Name:'initial','font-size':subclassattr.Font.Size?subclassattr.Font.Size:'initial','font-weight':subclassattr.Font.Bold?'bold':'initial','font-style':subclassattr.Font.Tilt?'italic':'initial','text-decoration':subclassattr.Font.Underline?'underline':'initial','background-color':subclassattr.Font.Bk_Color,'color':subclassattr.Font.Text_Color,'width':subclassattr.title_p_wdith+'%'}"><i
|
class="i_tishi" v-if="attr.notempty==true">*</i>{{attr.DispName}}:</text>
|
<div class="text-right">
|
<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"
|
:maxlength="-1">
|
</view>
|
<view v-if="subclassattr.control_style=='左右布局'">
|
<p class="tx_title2"
|
:style="{'font-family':subclassattr.Font.Name?subclassattr.Font.Name:'initial','font-size':subclassattr.Font.Size?subclassattr.Font.Size:'initial','font-weight':subclassattr.Font.Bold?'bold':'initial','font-style':subclassattr.Font.Tilt?'italic':'initial','text-decoration':subclassattr.Font.Underline?'underline':'initial','background-color':subclassattr.Font.Bk_Color,'color':subclassattr.Font.Text_Color,'width':subclassattr.title_p_wdith+'%'}">
|
<i class="i_tishi" v-if="attr.notempty==true">*</i>{{attr.DispName}}:
|
</p>
|
<input type="text" class="attr_field" :value="attr.Value"
|
:style="{'width': attr.Width.split('%')[0] - subclassattr.title_p_wdith - 16 +'%'}"
|
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>
|
</div>
|
</view>
|
</view>
|
<view class="form-group" v-if="attr.Type=='引用项目' || attr.Type=='project'"
|
:style="{'display':attr.hidden == true?'none':''}">
|
<view v-if="subclassattr.control_style=='上下布局'">
|
<text class="tx_title"
|
:style="{'font-family':subclassattr.Font.Name?subclassattr.Font.Name:'initial','font-size':subclassattr.Font.Size?subclassattr.Font.Size:'initial','font-weight':subclassattr.Font.Bold?'bold':'initial','font-style':subclassattr.Font.Tilt?'italic':'initial','text-decoration':subclassattr.Font.Underline?'underline':'initial','background-color':subclassattr.Font.Bk_Color,'color':subclassattr.Font.Text_Color,'width':subclassattr.title_p_wdith+'%'}"><i
|
class="i_tishi" v-if="attr.notempty==true">*</i>{{attr.DispName}}:</text>
|
<div class="text-right">
|
<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"
|
:maxlength="-1">
|
</view>
|
<view v-if="subclassattr.control_style=='左右布局'">
|
<p class="tx_title2"
|
:style="{'font-family':subclassattr.Font.Name?subclassattr.Font.Name:'initial','font-size':subclassattr.Font.Size?subclassattr.Font.Size:'initial','font-weight':subclassattr.Font.Bold?'bold':'initial','font-style':subclassattr.Font.Tilt?'italic':'initial','text-decoration':subclassattr.Font.Underline?'underline':'initial','background-color':subclassattr.Font.Bk_Color,'color':subclassattr.Font.Text_Color,'width':subclassattr.title_p_wdith+'%'}">
|
<i class="i_tishi" v-if="attr.notempty==true">*</i>{{attr.DispName}}:
|
</p>
|
<input type="text" class="attr_field" :value="attr.Value"
|
:style="{'width': attr.Width.split('%')[0] - subclassattr.title_p_wdith - 16 +'%'}"
|
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>
|
</div>
|
</view>
|
</view>
|
<view class="form-group" v-if="attr.Type=='编码' ||attr.Type=='code'"
|
:style="{'display':attr.hidden == true?'none':''}">
|
<view v-if="subclassattr.control_style=='上下布局'">
|
<text class="tx_title"
|
:style="{'font-family':subclassattr.Font.Name?subclassattr.Font.Name:'initial','font-size':subclassattr.Font.Size?subclassattr.Font.Size:'initial','font-weight':subclassattr.Font.Bold?'bold':'initial','font-style':subclassattr.Font.Tilt?'italic':'initial','text-decoration':subclassattr.Font.Underline?'underline':'initial','background-color':subclassattr.Font.Bk_Color,'color':subclassattr.Font.Text_Color,'width':subclassattr.title_p_wdith+'%'}"><i
|
class="i_tishi" v-if="attr.notempty==true">*</i>{{attr.DispName}}:</text>
|
<input type="text" :data-iiindex="iiindex" :data-index="index" :data-iindex="iindex"
|
:style="{'width':attr.Width}" :disabled="attr.edit?false:true" :maxlength="-1">
|
</view>
|
<view v-if="subclassattr.control_style=='左右布局'">
|
<p class="tx_title2"
|
:style="{'font-family':subclassattr.Font.Name?subclassattr.Font.Name:'initial','font-size':subclassattr.Font.Size?subclassattr.Font.Size:'initial','font-weight':subclassattr.Font.Bold?'bold':'initial','font-style':subclassattr.Font.Tilt?'italic':'initial','text-decoration':subclassattr.Font.Underline?'underline':'initial','background-color':subclassattr.Font.Bk_Color,'color':subclassattr.Font.Text_Color,'width':subclassattr.title_p_wdith+'%'}">
|
<i class="i_tishi" v-if="attr.notempty==true">*</i>{{attr.DispName}}:
|
</p>
|
<input type="text" class="attr_field" :data-iiindex="iiindex" :data-index="index"
|
:data-iindex="iindex"
|
:style="{'width': attr.Width.split('%')[0] - subclassattr.title_p_wdith - 7 +'%'}"
|
:disabled="attr.edit?false:true" :maxlength="-1">
|
</view>
|
</view>
|
<view class="form-group" v-if="attr.Type=='省市区' ||attr.Type=='region'"
|
:style="{'display':attr.hidden == true?'none':''}">
|
<view v-if="subclassattr.control_style=='上下布局'">
|
<text class="tx_title"
|
:style="{'font-family':subclassattr.Font.Name?subclassattr.Font.Name:'initial','font-size':subclassattr.Font.Size?subclassattr.Font.Size:'initial','font-weight':subclassattr.Font.Bold?'bold':'initial','font-style':subclassattr.Font.Tilt?'italic':'initial','text-decoration':subclassattr.Font.Underline?'underline':'initial','background-color':subclassattr.Font.Bk_Color,'color':subclassattr.Font.Text_Color,'width':subclassattr.title_p_wdith+'%'}"><i
|
class="i_tishi" v-if="attr.notempty==true">*</i>{{attr.DispName}}:</text>
|
<pickerAddress class="date_iput" @change="addresschange" :data-iiindex="iiindex"
|
:data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}">
|
{{attr.Value}}
|
</pickerAddress>
|
</view>
|
<view v-if="subclassattr.control_style=='左右布局'">
|
<p class="tx_title2"
|
:style="{'font-family':subclassattr.Font.Name?subclassattr.Font.Name:'initial','font-size':subclassattr.Font.Size?subclassattr.Font.Size:'initial','font-weight':subclassattr.Font.Bold?'bold':'initial','font-style':subclassattr.Font.Tilt?'italic':'initial','text-decoration':subclassattr.Font.Underline?'underline':'initial','background-color':subclassattr.Font.Bk_Color,'color':subclassattr.Font.Text_Color,'width':subclassattr.title_p_wdith+'%'}">
|
<i class="i_tishi" v-if="attr.notempty==true">*</i>{{attr.DispName}}:
|
</p>
|
<pickerAddress class="date_iput attr_field" @change="addresschange"
|
:data-iiindex="iiindex" :data-index="index" :data-iindex="iindex"
|
:style="{'width': attr.Width.split('%')[0] - subclassattr.title_p_wdith - 7 +'%'}">
|
{{attr.Value}}
|
</pickerAddress>
|
</view>
|
</view>
|
</div>
|
</div>
|
</view>
|
|
<view class="v-paneldel" v-if="param.Sub_Cls.Can_Add_Delete == true">
|
<a href="javascript:;" class="panel_del" @tap="panel_del(iiindex)"><i
|
class="ace-icon fu-delete"></i></a>
|
</view>
|
</view>
|
</view>
|
|
<button type="default" @tap="cancel" class="btn_cancel"
|
v-if="param.Sub_Cls.Can_Add_Delete == true">{{translateSys('cancel')}}</button>
|
<button type="default" @tap="onSave" class="btn_add"
|
v-if="param.Sub_Cls.Can_Add_Delete == true">{{title}}</button>
|
<button type="default" @tap="onSave" class="btn_sava"
|
v-else-if="param.Sub_Cls.Can_Add_Delete == false">{{title}}</button>
|
|
<!-- 普通弹窗 top bottom center left right -->
|
<view>
|
<uni-popup class="view-popup" ref="popup" background-color="#fff" @change="popupChange">
|
<view class="popup-header">{{check_list.title}}</view>
|
<view class="popup-content" :class="{ 'popup-height': popupType === 'left' || popupType === 'right' }"
|
:style="{'width':check_list.width?check_list.width+'px':'375rpx','height':check_list.height?check_list.height+'px':popupType =='center'?'60vh':'88vh'}">
|
<view class="popup-cont"
|
:style="{'height':check_list.height?check_list.height-45+'px':popupType =='center'?'50vh':'80vh'}">
|
<view class="view_popup_CheckList" v-for="(item,index) in check_list.items">
|
<checkbox-group class="check_list" @change="checkChange" :data-ischeck="item.check"
|
:data-index="index" :style="{'margin-left': '10rpx'}">
|
<label>
|
<checkbox :value="item.check" :checked="item.check" />
|
<text>{{item.name}}</text>
|
</label>
|
</checkbox-group>
|
</view>
|
</view>
|
<view class="popup-footer">
|
<button type="default" @tap="popup_sava" class="btn_popup_add">{{translateSys('ok')}}</button>
|
<button type="default" @tap="popup_cancel"
|
class="btn_popup_cancel">{{translateSys('cancel')}}</button>
|
</view>
|
</view>
|
</uni-popup>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
import {
|
Base64
|
} from '@/js/Base64.js';
|
import pickerAddress from '../../js/pickerAddress/pickerAddress.vue'
|
import utils from "@/js/utils.js"
|
import {
|
appGetInfo,
|
dictGetInfo,
|
dictItemGetInfo
|
} from "@/api/mobox.js"
|
import {
|
getUIStyleInfo,
|
runCustomEvent,
|
dataObjCreate,
|
dataObjDel
|
} from "@/api/data.js"
|
import {
|
classAttrList,
|
} from "@/api/index.js"
|
import buttonClickMixin from '@/mixins/button-click.js';
|
|
|
export default {
|
mixins: [buttonClickMixin],
|
components: {
|
pickerAddress
|
},
|
data() {
|
return {
|
largeMode: getApp().globalData.largeMode || false,
|
title: '新增',
|
param: {},
|
classAttrList: [],
|
classGridStyle: [],
|
edit_inital_event: "", //弹窗初始化事件ID
|
edit_ok_event: "", //弹窗点击OK 触发事件ID
|
edit_select_compose_event: "", //选择组成对象时调用
|
edit_compose_cls_id: "",
|
global_attr: [],
|
refdatastore: [], //引用数据存储区// {attr:'G_PRJ_' + bindattr + '_ID', value:info.id}
|
scanCodeVal: "",
|
subClassAttrList: [],
|
subPanelList: [],
|
subClassGridStyle: [],
|
popupType: "center",
|
check_list: {},
|
}
|
},
|
onLoad(options) {
|
// console.log(options);
|
uni.setNavigationBarTitle({
|
title: options.titlename
|
}); //设置顶部标题
|
var param = JSON.parse(options.param);
|
this.title = param.Add_BtnName ? param.Add_BtnName : options.titlename; //设置按钮文字
|
console.log(param);
|
if (!param.Master_Cls.View_Style) {
|
uni.showModal({
|
title: this.translateSys('tip') + "",
|
content: "该功能点未配置界面窗口,请重新配置!",
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
return;
|
}
|
if (!param.Master_Cls.View_Style.Name) {
|
uni.showModal({
|
title: this.translateSys('tip') + "",
|
content: "该功能点未配置窗口样式,请重新配置!",
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
return;
|
}
|
this.param = param;
|
// var edit_dlg = {
|
// Model: param.EditDlgMode,
|
// Name: param.Master_Cls.View_Style.Name
|
// }
|
this.loadData()
|
|
},
|
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() {
|
//主数据类获取
|
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.viewParam('Mast');
|
this.classAttrList = await this.classAttrGetList(param.Sub_Cls?.ID)
|
this.classGridStyle = await this.classGridStyleInfo(param.Sub_Cls?.ID, param.Sub_Cls?.View_Style
|
?.Name)
|
this.viewParam('Sub');
|
},
|
async DictItemGetList(attr) { //Mobox3得到字典项列表
|
try {
|
this.data = [];
|
var $this = this;
|
var dataInfo = {
|
dict_id: attr.dict_id,
|
dict_name: attr.dict_name
|
};
|
const result = await dictItemGetInfo(dataInfo)
|
return result?.dict_item_list || []
|
|
} catch (ex) {
|
uni.showModal({
|
title: this.translateSys('error') + " 1.2",
|
content: ex.errMsg,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
return []
|
}
|
|
},
|
async classAttrGetList(clsid) {
|
try {
|
|
var $this = this;
|
var dataInfo = {
|
class_id: clsid,
|
};
|
const result = await classAttrList(dataInfo) || []
|
for (let index in result) {
|
const group = result[index]
|
for (let key in group.attr_list) {
|
const attr = group.attr_list[key]
|
if (utils.classUtils.attrTypeIsDict(attr.type)) {
|
attr.dictitem = await $this.DictItemGetList(attr);
|
}
|
}
|
}
|
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: this.translateSys("error") + " 1.1",
|
content: tip,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
return []
|
};
|
},
|
|
async classGridStyleInfo(clsid, styleName) {
|
try {
|
|
var $this = this;
|
var gridstyleInfo = {
|
class_id: clsid,
|
ui_style_type: 2,
|
ui_style_name: styleName
|
};
|
const result = await getUIStyleInfo(gridstyleInfo)
|
var styledef = Base64.decode(result.style_def || "");
|
result.style_def = JSON.parse(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: this.translateSys("error") + " 1.2",
|
content: tip,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
return {}
|
};
|
},
|
viewParam(type) { //将mobox3小写参数转换为mobox2大写参数
|
var classGridStyle = '';
|
var classAttrList = '';
|
if (type == 'Mast') {
|
classGridStyle = this.classGridStyle;
|
classAttrList = this.classAttrList;
|
} else if (type == 'Sub') {
|
classGridStyle = this.subClassGridStyle;
|
classAttrList = this.subClassAttrList;
|
}
|
var class_gridStyle = {
|
ID: classGridStyle.id,
|
Name: classGridStyle.name,
|
Type: classGridStyle.type,
|
IsDefault: classGridStyle.is_defaul,
|
StyleDef: classGridStyle.style_def,
|
};
|
var class_attrList = [];
|
classAttrList.forEach(data => {
|
var attrs = [];
|
if (data.attr_list) {
|
data.attr_list.forEach(attr => {
|
var dictitems = [];
|
if (attr.dictitem) {
|
attr.dictitem.forEach(dict => {
|
dictitems.push({
|
ID: dict.id,
|
Name: dict.name,
|
Note: dict.note,
|
Order: dict.order,
|
ImgUrl: null,
|
Code: dict.code,
|
HasSub: null,
|
ParentID: null,
|
ParentName: null,
|
Lvl: dict.lvl,
|
IsDefault: dict.is_default,
|
Value: dict.value,
|
CN_G_ID: dict.id,
|
CN_G_DICT_ID: null,
|
CN_S_NAME: dict.name,
|
CN_S_NOTE: dict.note,
|
CN_N_ORDER: dict.order,
|
CN_S_IMG_URL: null,
|
CN_S_CODE: dict.code,
|
CN_C_HAS_SUB: null,
|
CN_G_PARENT_ITEM_ID: null,
|
CN_G_PARENT_ITEM_NAME: null,
|
CN_N_LVL: dict.lvl,
|
CN_C_IS_DEFAULT: dict.is_default,
|
CN_S_VALUE: dict.value
|
});
|
});
|
}
|
attrs.push({
|
ID: attr.id,
|
Name: attr.name,
|
Type: attr.type,
|
Size: attr.size,
|
NotEmpty: attr.not_empty,
|
DefValue: attr.def_value,
|
Order: attr.order,
|
DictName: attr.dict_name,
|
DictID: attr.dict_id,
|
CodeDefName: attr.code_def_name,
|
CodeDefID: attr.code_def_id,
|
RelClsID: null,
|
RelCls: attr.ref_cls,
|
Width: attr.width,
|
Height: attr.height,
|
CtrlStyle: attr.ctrl_style,
|
HasAce: attr.has_ace,
|
CanShow: attr.can_show,
|
CanQuery: attr.can_query,
|
ReadOnly: attr.read_only,
|
IsKey: attr.is_key,
|
IsFixed: attr.is_fixed,
|
DispName: attr.disp_name,
|
LuaAttr: attr.lua_attr,
|
Desc: attr.desc,
|
ActionDef: attr.action_def ? Base64.decode(attr.action_def) : '',
|
Multilingual: attr.multilingual,
|
RefCondition: attr.ref_condition,
|
GroupName: data.group,
|
Value: null,
|
dictitem: dictitems
|
});
|
});
|
}
|
class_attrList.push({
|
Name: data.group,
|
Order: data.order,
|
HasAce: data.has_ace,
|
BkColor: data.bk_color,
|
ImgFontStyle: data.img_font_style,
|
Attr: attrs
|
});
|
});
|
|
if (type == 'Mast') {
|
this.classGridStyle = class_gridStyle;
|
this.classAttrList = class_attrList;
|
// console.log('------Mast--------');
|
// console.log(this.classGridStyle);
|
// console.log(this.classAttrList);
|
this.class_attr_init();
|
} else if (type == 'Sub') {
|
this.subClassGridStyle = class_gridStyle;
|
this.subClassAttrList = class_attrList;
|
// console.log('------Sub--------');
|
// console.log(this.subClassGridStyle);
|
// console.log(this.subClassAttrList);
|
this.subClass_attr_init();
|
}
|
},
|
class_attr_init() {
|
var attrlist = this.classGridStyle.StyleDef.show_style;
|
var newattrlist = [];
|
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.classAttrList.length; s++) {
|
var clsattr = this.classAttrList[s];
|
// if (name == clsattr.Name) {
|
var attr = [];
|
for (var j = 0; j < attrs.length; j++) {
|
for (var l = 0; l < clsattr.Attr.length; l++) {
|
var ca = clsattr.Attr[l];
|
if (attrs[j].attr == ca.Name) {
|
ca.action = attrs[j].action;
|
ca.edit = attrs[j].edit;
|
ca.notempty = attrs[j].notempty;
|
ca.ext_button = attrs[j].ext_button;
|
ca.button_img = attrs[j].button_img;
|
ca.button_tooltip = attrs[j].button_tooltip;
|
ca.before_click_button = attrs[j].before_click_button;
|
ca.button_callback = attrs[j].button_callback;
|
ca.hidden = attrs[j].hidden;
|
ca.select = attrs[j].select == undefined ? false : attrs[j].select;
|
ca.Value = "";
|
if (ca.dictitem.length > 0) {
|
if (ca.select == true)
|
ca.Value = []; //ca.dictitem[0].CN_S_NAME;
|
else
|
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_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') {
|
ca.Label = ca.dictitem[d].CN_S_VALUE;
|
ca.Value = ca.dictitem[d].CN_S_NAME;
|
}
|
}
|
// console.log(ca.dictitem);
|
}
|
if (utils.classUtils.attrTypeIsDateTime(ca
|
.Type
|
)) // if(ca.Type=='日期' || ca.Type=='时间' ||ca.Type=='date' || ca.Type=='datetime')
|
{
|
var nowDate = new Date();
|
var date = {
|
year: nowDate.getFullYear(),
|
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);
|
}
|
if (utils.classUtils.attrTypeIsObjRefMulti(ca
|
.Type)) // if(ca.Type=='引用对象(多个)' || ca.Type=='obj-ref-multi'){
|
{
|
ca.RelClsList = ca.RelCls;
|
ca.Value = '请选择';
|
}
|
if (utils.classUtils.attrTypeIsRegion(ca
|
.Type)) //if(ca.Type=='省市区'|| ca.Type=='region')
|
ca.Value = '请选择';
|
if (utils.classUtils.attrTypeIsBool(ca
|
.Type)) //if(ca.Type=='布尔值'|| ca.Type=='bool')
|
ca.Value = false;
|
|
attr.push(ca);
|
}
|
}
|
}
|
newattrlist.push({
|
BkColor: clsattr.BkColor,
|
HasAce: clsattr.HasAce,
|
ImgFontStyle: clsattr.ImgFontStyle,
|
Name: clsattr.Name,
|
Order: clsattr.Order,
|
Open: open,
|
Attr: attr,
|
control_style: this.classGridStyle.StyleDef.control_style,
|
title_p_wdith: this.classGridStyle.StyleDef.title_p_wdith,
|
Font: this.classGridStyle.StyleDef.Font ? this.classGridStyle.StyleDef
|
.Font : {},
|
Bk_Color: this.classGridStyle.StyleDef.Bk_Color ? this.classGridStyle
|
.StyleDef.Bk_Color : '#FFFFFF',
|
Text_Color: this.classGridStyle.StyleDef.Text_Color ? this.classGridStyle.StyleDef
|
.Text_Color : '#000000'
|
});
|
// }
|
}
|
}
|
if (newattrlist.length > 0) {
|
this.classAttrList = newattrlist;
|
}
|
var req = [];
|
if (this.classGridStyle.StyleDef) {
|
if (this.classGridStyle.StyleDef.show_style.length > 0) {
|
var attrlist = this.classGridStyle.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 : ''
|
});
|
}
|
}
|
}
|
}
|
|
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.edit_ok_event = eventlist[i];
|
} else if (eventlist[i].event_id == 'initial') {
|
this.edit_inital_event = eventlist[i];
|
} else if (eventlist[i].event_id == 'before_select_compose') {
|
this.edit_select_compose_event = eventlist[i].scrip_id;
|
this.edit_compose_cls_id = eventlist[i].compose_cls_id;
|
}
|
}
|
}
|
}
|
// console.log(req);
|
if (this.edit_inital_event) {
|
var eventid = this.edit_inital_event.scrip_id;
|
var info = {
|
eventid: eventid,
|
edtype: "0",
|
projectid: '',
|
rclsid: '',
|
robjid: '',
|
userlogin: '',
|
clsid: this.param.Master_Cls.ID,
|
objid: "",
|
attr: req,
|
}
|
this.ini_DataObjRunCustomEvent(info);
|
}
|
console.log(this.classGridStyle);
|
console.log(this.classAttrList);
|
|
} else {
|
uni.showModal({
|
title: this.translateSys('tip') + "",
|
content: "未找到可显示的的属性",
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
}
|
},
|
subClass_attr_init() {
|
var attrlist = this.subClassGridStyle.StyleDef.show_style;
|
var newattrlist = [];
|
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.subClassAttrList.length; s++) {
|
var clsattr = this.subClassAttrList[s];
|
// if (name == clsattr.Name) {
|
var attr = [];
|
for (var j = 0; j < attrs.length; j++) {
|
for (var l = 0; l < clsattr.Attr.length; l++) {
|
var ca = clsattr.Attr[l];
|
if (attrs[j].attr == ca.Name) {
|
ca.action = attrs[j].action;
|
ca.edit = attrs[j].edit;
|
ca.notempty = attrs[j].notempty;
|
ca.ext_button = attrs[j].ext_button;
|
ca.button_img = attrs[j].button_img;
|
ca.button_tooltip = attrs[j].button_tooltip;
|
ca.before_click_button = attrs[j].before_click_button;
|
ca.button_callback = attrs[j].button_callback;
|
ca.hidden = attrs[j].hidden;
|
ca.select = attrs[j].select == undefined ? false : attrs[j].select;
|
ca.Value = "";
|
if (ca.dictitem.length > 0) {
|
if (ca.select == true)
|
ca.Value = []; //ca.dictitem[0].CN_S_NAME;
|
else
|
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_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') {
|
ca.Label = ca.dictitem[d].CN_S_VALUE;
|
ca.Value = ca.dictitem[d].CN_S_NAME;
|
}
|
}
|
}
|
if (utils.classUtils.attrTypeIsDateTime(ca
|
.Type)) //if(ca.Type=='日期' || ca.Type=='时间')
|
{
|
var nowDate = new Date();
|
var date = {
|
year: nowDate.getFullYear(),
|
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);
|
}
|
if (utils.classUtils.attrTypeIsObjRefMulti(ca.Type)) //if(ca.Type=='引用对象(多个)')
|
{
|
ca.RelClsList = ca.RelCls;
|
ca.Value = '请';
|
}
|
if (utils.classUtils.attrTypeIsRegion(ca
|
.Type)) //if(ca.Type=='省市区'||ca.Type=='region')
|
ca.Value = '请选择';
|
if (utils.classUtils.attrTypeIsBool(ca.Type)) //if(ca.Type=='布尔值'||ca.Type=='bool')
|
ca.Value = false;
|
|
attr.push(ca);
|
}
|
}
|
}
|
newattrlist.push({
|
BkColor: clsattr.BkColor,
|
HasAce: clsattr.HasAce,
|
ImgFontStyle: clsattr.ImgFontStyle,
|
Name: clsattr.Name,
|
Order: clsattr.Order,
|
Open: open,
|
Attr: attr,
|
control_style: this.subClassGridStyle.StyleDef.control_style,
|
title_p_wdith: this.subClassGridStyle.StyleDef.title_p_wdith,
|
Font: this.subClassGridStyle.StyleDef.Font ? this.subClassGridStyle
|
.StyleDef.Font : {},
|
Bk_Color: this.subClassGridStyle.StyleDef.Bk_Color ? this.subClassGridStyle
|
.StyleDef.Bk_Color : '#FFFFFF',
|
Text_Color: this.subClassGridStyle.StyleDef.Text_Color ? this.subClassGridStyle
|
.StyleDef.Text_Color : '#000000'
|
});
|
// }
|
}
|
}
|
if (newattrlist.length > 0) {
|
this.subClassAttrList = newattrlist;
|
}
|
var req = [];
|
if (this.subClassGridStyle.StyleDef) {
|
if (this.subClassGridStyle.StyleDef.show_style.length > 0) {
|
var attrlist = this.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 : ''
|
});
|
}
|
}
|
}
|
}
|
|
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.edit_ok_event = eventlist[i];
|
} else if (eventlist[i].event_id == 'initial') {
|
this.edit_inital_event = eventlist[i];
|
} else if (eventlist[i].event_id == 'before_select_compose') {
|
this.edit_select_compose_event = eventlist[i].scrip_id;
|
this.edit_compose_cls_id = eventlist[i].compose_cls_id;
|
}
|
}
|
}
|
}
|
// console.log(req);
|
if (this.edit_inital_event) {
|
var eventid = this.edit_inital_event.scrip_id;
|
var info = {
|
eventid: eventid,
|
edtype: "0",
|
projectid: '',
|
rclsid: '',
|
robjid: '',
|
userlogin: '',
|
clsid: this.param.Sub_Cls.ID,
|
objid: "",
|
attr: req,
|
}
|
this.scan_ini_DataObjRunCustomEvent(info);
|
}
|
console.log(this.subClassGridStyle);
|
console.log(this.subClassAttrList);
|
|
} else {
|
uni.showModal({
|
title: this.translateSys('tip') + "",
|
content: "未找到可显示的的属性",
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
}
|
},
|
scan_classAttr_extButton(e) { //选择按钮前
|
var $this = this;
|
var Before_Select_Event = $this.param.Scan_Code.Before_Select_Event;
|
if (!Before_Select_Event) {
|
uni.showModal({
|
title: this.translateSys('tip') + "",
|
content: "选择前事件为空!",
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
return;
|
}
|
var mast_attr = [];
|
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 ar = attr[j];
|
if (ar.Value == '请选择') {
|
uni.showModal({
|
title: this.translateSys('tip') + "",
|
content: ar.DispName + "未选择数据!",
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
return;
|
}
|
mast_attr.push(this.formatAttr(ar))
|
}
|
}
|
|
var objects = [];
|
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 attr = subPanelList[s].subClassAttr[i].Attr;
|
for (var j = 0; j < attr.length; j++) {
|
var ar = attr[j];
|
if (ar.Value == '请选择' || ar.Value == '——请选择——') ar.Value = '';
|
if (utils.classUtils.attrTypeIsDict(ar
|
.Type)) //if (ar.Type == '字典' || ar.Type == '字典-字符串' || ar.Type == '字典-整数' ) {
|
if (ar.select == true) { //判断下拉是否多选
|
var valStr = "";
|
for (var v in ar.Value) {
|
if (valStr)
|
valStr += ";";
|
valStr += ar.Value[v];
|
}
|
sub_req.push({
|
attr: ar.Name,
|
value: valStr
|
});
|
} else
|
sub_req.push({
|
attr: ar.Name,
|
value: ar.Value
|
});
|
else {
|
sub_req.push(this.formatAttr(ar))
|
}
|
} else
|
sub_req.push({
|
attr: ar.Name,
|
value: ar.Value ? ar.Value : ''
|
});
|
|
if (ar.notempty == true && !ar.Value) {
|
// if(ar.NotEmpty=='1'){
|
uni.hideLoading();
|
// uni.showToast({title:ar.DispName+'不能为空!',icon:"success",duration:3000});
|
uni.showModal({
|
title: this.translateSys('tip') + "",
|
content: ar.DispName + '不能为空!',
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
return;
|
}
|
}
|
objects.push({
|
obj_id: subPanelList[s].scanCodeVal,
|
obj_attrs: sub_req
|
});
|
}
|
var enviroment = {
|
'function': '3000', // 功能点编号
|
cls_id: 'MBOX', //this.param.Sub_Cls.ID, // 功能点从数据类标识
|
'button': 'top', // top/bottom
|
button_name: '新增',
|
edit_dlg: {
|
type: 'small', //小窗口
|
class_id: 'MBOX', //this.param.Sub_Cls.ID,//当前数据类id
|
},
|
master_cls: {
|
cls_name: 'MBOX', //$this.param.Master_Cls.Name,
|
obj_attrs: req
|
},
|
sub_cls: {
|
cls_name: 'MBOX', //$this.param.Sub_Cls.Name,
|
objects: objects
|
}
|
|
};
|
var req = [];
|
var req = [];
|
var info = {
|
eventid: Before_Select_Event.ID,
|
edtype: "7", //"0",
|
projectid: '',
|
rclsid: '',
|
robjid: '',
|
userlogin: '',
|
clsid: 'MBOX', //this.param.Sub_Cls.ID,
|
objid: "",
|
attr: [],
|
global_attr: req,
|
mast_attr: mast_attr,
|
inputParamter: mast_attr,
|
enviroment: enviroment
|
}
|
// console.log(info);
|
this.scan_DataObjRunCustomEvent(info, "");
|
},
|
popupChange(e) {
|
console.log('当前模式:' + e.type + ',状态:' + e.show);
|
},
|
checkChange(e) { //弹框check选择
|
// console.log(e.target.dataset);
|
var index = e.target.dataset.index;
|
var ischeck = e.target.dataset.ischeck;
|
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.check_list.items = data;
|
|
},
|
popup_cancel(e) { //弹框取消
|
this.$refs.popup.close();
|
},
|
popup_sava(e) { //弹框确定 选择按钮后
|
var $this = this;
|
var After_Select_Event = $this.param.Scan_Code.After_Select_Event;
|
if (!After_Select_Event) {
|
uni.showModal({
|
title: this.translateSys('tip') + "",
|
content: "选择后事件为空!",
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
return;
|
}
|
var items = $this.check_list.items;
|
var data = [];
|
var name = "";
|
for (var i = 0; i < items.length; i++) {
|
if (items[i].check == true) {
|
if (name)
|
name += ';';
|
name += items[i].name;
|
data.push({
|
id: items[i].id,
|
name: items[i].name
|
});
|
}
|
}
|
if (data.length == 0) {
|
uni.showModal({
|
title: this.translateSys('tip') + "",
|
content: "未选择数据!",
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
return;
|
}
|
var mast_attr = [];
|
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 ar = attr[j];
|
if (ar.Value == '请选择') {
|
uni.showModal({
|
title: this.translateSys('tip') + "",
|
content: ar.DispName + "未选择数据!",
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
return;
|
}
|
mast_attr.push(this.formatAttr(ar))
|
}
|
}
|
|
$this.scanCodeVal = name;
|
var info = {
|
eventid: After_Select_Event.ID,
|
edtype: "7",
|
projectid: '',
|
rclsid: '',
|
robjid: '',
|
userlogin: '',
|
clsid: 'MBOX',
|
objid: "",
|
attr: [{
|
attr: 'mast_input_3037',
|
value: name
|
}],
|
global_attr: mast_attr,
|
inputParamter: data,
|
enviroment: ''
|
}
|
// console.log(info);
|
this.scan_DataObjRunCustomEvent(info, "");
|
this.$refs.popup.close();
|
},
|
|
cancel(e) {
|
uni.navigateBack({
|
delta: 1 //返回层数,2则上上页
|
});
|
},
|
panel_del(index) {
|
var $this = this;
|
if (this.subPanelList[index].scanCodeVal == this.scanCodeVal) {
|
this.scanCodeVal = '';
|
}
|
if (!this.subPanelList[index].ObjID)
|
this.subPanelList.splice(index, 1);
|
else {
|
var dataInfo = {
|
class_id: this.param.Sub_Cls.ID,
|
class_name: '',
|
obj_id: this.subPanelList[index].ObjID
|
};
|
// console.log(dataInfo);
|
// return;
|
uni.showLoading({
|
title: "加载中..."
|
});
|
dataObjDel(dataInfo).then(success => {
|
// console.log(success);
|
uni.hideLoading();
|
$this.subPanelList.splice(index, 1);
|
uni.showModal({
|
title: this.translateSys('tip') + "",
|
content: "删除成功!",
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
|
}).catch(ex => {
|
console.log(ex);
|
uni.hideLoading();
|
uni.showModal({
|
title: this.translateSys('tip') + "9.1",
|
content: ex.errMsg,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
});
|
}
|
},
|
ontap(e) { //扫码功能
|
//console.log(e.target)
|
getApp().onScan((result) => {
|
//console.log(result);
|
var isVal = this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[
|
'iindex']].Value;
|
// if(!isVal){
|
// this.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=result;
|
// var isVald =this.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value;
|
// return;
|
// }
|
//主数据类扫码查询数据
|
if (isVal != result) {
|
this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset[
|
'iindex']].Value = result;
|
uni.hideKeyboard();
|
//子数据类扫码区事件脚本
|
var eventid = this.param.Scan_Code.Input_Change_Event.ID;
|
if (eventid) {
|
var req = [];
|
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 ar = attr[j];
|
req.push(this.formatAttr(ar))
|
}
|
}
|
var info = {
|
eventid: eventid,
|
edtype: "7", //"0",
|
projectid: '',
|
rclsid: '',
|
robjid: '',
|
userlogin: '',
|
clsid: 'MBOX', //this.param.Sub_Cls.ID,
|
objid: "",
|
attr: req,
|
mast_attr: [],
|
inputParamter: [{
|
attr: 'mast_input_3037',
|
value: result
|
}]
|
}
|
|
this.scan_DataObjRunCustomEvent(info, "");
|
}
|
}
|
})
|
},
|
subontap(e) { //扫码功能
|
//console.log(e.target)
|
getApp().onScan((result) => {
|
//console.log(result);
|
var isVal = this.subClassAttrList[e.target.dataset['index']].Attr[e
|
.target.dataset['iindex']].Value;
|
//主数据类扫码查询数据
|
if (isVal != result) {
|
this.subClassAttrList[e.target.dataset['index']].Attr[e.target
|
.dataset['iindex']].Value = result;
|
uni.hideKeyboard();
|
//子数据类扫码区事件脚本
|
var eventid = this.param.Scan_Code.Input_Change_Event.ID;
|
if (eventid) {
|
var req = [];
|
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++) {
|
var ar = attr[j];
|
req.push(this.formatAttr(ar))
|
}
|
}
|
var info = {
|
eventid: eventid,
|
edtype: "7", //"0",
|
projectid: '',
|
rclsid: '',
|
robjid: '',
|
userlogin: '',
|
clsid: 'MBOX', //this.param.Sub_Cls.ID,
|
objid: "",
|
attr: req,
|
mast_attr: [],
|
inputParamter: [{
|
attr: 'mast_input_3037',
|
value: result
|
}]
|
}
|
|
this.scan_DataObjRunCustomEvent(info, "");
|
}
|
}
|
})
|
},
|
scan_ontap(e) { //扫码区扫码功能
|
//console.log(e.target)
|
getApp().onScan((result) => {
|
console.log(result);
|
var isflag = true;
|
for (var i in this.subPanelList) {
|
if (this.subPanelList[i].scanCodeVal == result)
|
isflag = false;
|
}
|
//子数据类扫码查询数据
|
if (isflag) {
|
uni.hideKeyboard();
|
this.scanCodeVal = result;
|
var eventid = this.param.Scan_Code.Input_Change_Event.ID;
|
if (eventid) {
|
var mast_req = [];
|
//主数据类属性
|
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 ar = attr[j];
|
req.push(this.formatAttr(ar))
|
}
|
}
|
var req = [];
|
//子数据类属性
|
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++) {
|
var ar = attr[j];
|
req.push(this.formatAttr(ar))
|
|
}
|
}
|
var info = {
|
eventid: eventid,
|
edtype: '7', //"0",
|
projectid: '',
|
rclsid: '',
|
robjid: '',
|
userlogin: '',
|
clsid: 'MBOX', //this.param.Sub_Cls.ID,
|
objid: "",
|
attr: mast_req,
|
sub_attr: req,
|
inputParamter: [{
|
attr: 'input_3037',
|
value: this.scanCodeVal
|
}]
|
}
|
|
this.scan_DataObjRunCustomEvent(info, "");
|
}
|
}
|
})
|
},
|
scan_onevent(e) {
|
// console.log(e.target);
|
if (e.detail.value) {
|
var isflag = true;
|
for (var i in this.subPanelList) {
|
if (this.subPanelList[i].scanCodeVal == e.detail.value)
|
isflag = false;
|
}
|
//子数据类扫码查询数据
|
if (isflag) {
|
uni.hideKeyboard();
|
this.scanCodeVal = e.detail.value;
|
var eventid = this.param.Scan_Code.Input_Change_Event.ID;
|
if (eventid) {
|
var mast_req = [];
|
//主数据类属性
|
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 ar = attr[j];
|
req.push(this.formatAttr(ar))
|
}
|
}
|
var req = [];
|
//子数据类属性
|
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++) {
|
var ar = attr[j];
|
req.push(this.formatAttr(ar))
|
|
}
|
}
|
var info = {
|
eventid: eventid,
|
edtype: '7', //"0",
|
projectid: '',
|
rclsid: '',
|
robjid: '',
|
userlogin: '',
|
clsid: 'MBOX', //this.param.Sub_Cls.ID,
|
objid: "",
|
attr: mast_req,
|
sub_attr: req,
|
inputParamter: [{
|
attr: 'input_3037',
|
value: this.scanCodeVal
|
}]
|
}
|
|
this.scan_DataObjRunCustomEvent(info, "");
|
}
|
}
|
}
|
},
|
onarrow(index, open) {
|
// console.log(index+'--'+open);
|
var data_attr = this.classAttrList[e.target.dataset[
|
'index']].Attr[e.target.dataset['iindex']].Open;
|
if (!data_attr) {
|
this.subPanelList[e.target.dataset['iiindex']]
|
.subClassAttr[e.target.dataset['index']].Attr[e
|
.target.dataset['iindex']].Value = open ==
|
true ? false : true;
|
return;
|
}
|
this.classAttrList[e.target.dataset['iiindex']]
|
.subClassAttr[index].Open = open == true ? false :
|
true;
|
},
|
ondateTime(e) {
|
//console.log(e.target)
|
var data_attr = this.classAttrList[e.target.dataset[
|
'index']].Attr[e.target.dataset['iindex']].Value;
|
if (!data_attr) {
|
this.subPanelList[e.target.dataset['iiindex']]
|
.subClassAttr[e.target.dataset['index']].Attr[e
|
.target.dataset['iindex']].Value = e.target
|
.value;
|
return;
|
}
|
this.classAttrList[e.target.dataset['index']].Attr[e
|
.target.dataset['iindex']].Value = e.detail.value;
|
|
},
|
onchange(e) {
|
console.log(e.target);
|
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.classAttrList[e.target.dataset['index']]
|
.Attr[e.target.dataset['iindex']].Value = value
|
.Name;
|
// console.log(this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value);
|
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.classAttrList;
|
for (var i = 0; i < attrlist.length; i++) {
|
var attr = attrlist[i].Attr;
|
for (var j = 0; j < attr.length; j++) {
|
var ar = attr[j];
|
req.push(this.formatAttr(ar))
|
|
}
|
}
|
var info = {
|
eventid: eventid,
|
edtype: "0",
|
projectid: '',
|
rclsid: '',
|
robjid: '',
|
userlogin: '',
|
clsid: this.param.Master_Cls.ID,
|
objid: "",
|
attr: req,
|
}
|
this.DataObjRunCustomEvent(info);
|
}
|
}
|
|
},
|
onchange2(item, value, delvalue) {
|
// console.log(item);
|
// console.log(value);
|
// console.log(delvalue);
|
if (item.length == 0) { //为空时,清空属性value
|
var index, iindex, dindex = 0;
|
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.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.classAttrList[index]
|
.Attr[iindex];
|
|
console.log(data_attr);
|
if (itemvalue.Name != data_attr.Value) {
|
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.classAttrList;
|
for (var i = 0; i < attrlist
|
.length; i++) {
|
var attr = attrlist[i].Attr;
|
for (var j = 0; j < attr
|
.length; j++) {
|
var ar = attr[j];
|
if (utils.classUtils.attrTypeIsDict(
|
ar.Type
|
)) //if(ar.Type=='字典' || ar.Type=='字典-字符串' || ar.Type=='字典-整数')
|
req.push({
|
attr: ar.Name,
|
value: itemvalue.Name
|
});
|
else
|
req.push(this.formatAttr(ar))
|
}
|
}
|
var info = {
|
eventid: eventid,
|
edtype: "0",
|
projectid: '',
|
rclsid: '',
|
robjid: '',
|
userlogin: '',
|
clsid: this.param
|
.Master_Cls.ID,
|
objid: "",
|
attr: req,
|
}
|
this.DataObjRunCustomEvent(info);
|
}
|
}
|
}
|
},
|
sub_onchange(e) {
|
console.log(e.target);
|
var value = this.subPanelList[e
|
.target.dataset['iiindex']]
|
.subClassAttr[e.target.dataset[
|
'index']].Attr[e.target.dataset[
|
'iindex']].dictitem[e.target
|
.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.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.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.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++) {
|
var ar = attr[j];
|
|
req.push(this.formatAttr(ar))
|
}
|
}
|
var info = {
|
eventid: eventid,
|
edtype: "0",
|
projectid: '',
|
rclsid: '',
|
robjid: '',
|
userlogin: '',
|
clsid: this.param
|
.Sub_Cls.ID,
|
objid: "",
|
attr: req,
|
}
|
this.DataObjRunCustomEvent(info);
|
}
|
}
|
|
},
|
sub_onchange2(item, value, delvalue) {
|
// console.log(item);
|
// console.log(value);
|
// console.log(delvalue);
|
var subClassAttr = this.subPanelList[
|
e.target.dataset['iiindex']]
|
.subClassAttr;
|
if (item.length == 0) { //为空时,清空属性value
|
var index, iindex, dindex = 0;
|
for (var i in subClassAttr) {
|
for (var j in subClassAttr[i]
|
.Attr) {
|
for (var d in subClassAttr[i]
|
.Attr[j].dictitem) {
|
if (delvalue[0].Name ==
|
subClassAttr[i].Attr[j]
|
.dictitem[d].Name) {
|
subClassAttr[i].Attr[j]
|
.Value = "";
|
}
|
}
|
}
|
}
|
}
|
|
for (var v in item) {
|
var index, iindex, dindex = 0;
|
for (var i in subClassAttr) {
|
for (var j in subClassAttr[i]
|
.Attr) {
|
for (var d in subClassAttr[i]
|
.Attr[j].dictitem) {
|
if (item[v].Name ==
|
subClassAttr[i].Attr[j]
|
.dictitem[d].Name) {
|
index = i;
|
iindex = j;
|
dindex = d;
|
}
|
}
|
}
|
}
|
var itemvalue = item[v];
|
var data_attr = subClassAttr[index]
|
.Attr[iindex];
|
|
console.log(data_attr);
|
if (itemvalue.Name != data_attr
|
.Value) {
|
subClassAttr[index].Attr[iindex]
|
.Value = value;
|
// console.log(subClassAttr[index].Attr[iindex].Value);
|
var eventid = subClassAttr[index]
|
.Attr[iindex].action;
|
if (eventid) {
|
// self.event_no_sub = 1;
|
var req = [];
|
var attrlist = subClassAttr;
|
for (var i = 0; i < attrlist
|
.length; i++) {
|
var attr = attrlist[i]
|
.Attr;
|
for (var j = 0; j < attr
|
.length; j++) {
|
var ar = attr[j];
|
|
if (classUtils
|
.attrTypeIsDict(ar
|
.Type)
|
)
|
req.push({
|
attr: ar
|
.Name,
|
value: itemvalue
|
.Name
|
});
|
else
|
req.push(this.formatAttr(ar))
|
}
|
}
|
var info = {
|
eventid: eventid,
|
edtype: "0",
|
projectid: '',
|
rclsid: '',
|
robjid: '',
|
userlogin: '',
|
clsid: this.param
|
.Sub_Cls.ID,
|
objid: "",
|
attr: req,
|
}
|
this.DataObjRunCustomEvent(
|
info);
|
}
|
}
|
}
|
},
|
onevent(e) {
|
// console.log(e.target);
|
var data_attr = this.classAttrList[e
|
.target.dataset['index']].Attr[e
|
.target.dataset['iindex']];
|
if (!data_attr) {
|
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.detail.value != data_attr.Value) {
|
this.classAttrList[e.target
|
.dataset['index']].Attr[e
|
.target.dataset['iindex']]
|
.Value = e.detail.value;
|
// var eventid = this.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].action;
|
//子数据类扫码区事件脚本
|
var eventid = this.param
|
.Scan_Code.Input_Change_Event.ID;
|
if (eventid) {
|
// self.event_no_sub = 1;
|
var req = [];
|
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 ar = attr[j];
|
req.push(this.formatAttr(ar))
|
|
}
|
}
|
var info = {
|
eventid: eventid,
|
edtype: "7", //"0",
|
projectid: '',
|
rclsid: '',
|
robjid: '',
|
userlogin: '',
|
clsid: 'MBOX', //this.param.Sub_Cls.ID,
|
objid: "",
|
attr: req,
|
mast_attr: [],
|
inputParamter: [{
|
attr: 'mast_input_3037',
|
value: e.target
|
.value
|
}]
|
}
|
|
this.scan_DataObjRunCustomEvent(
|
info, "");
|
}
|
}
|
|
},
|
|
oncheck(e) {
|
// console.log(e.target);
|
var ischecked = e.target.dataset.ischeck ?
|
false : true;
|
var data_attr = this.classAttrList[e
|
.target.dataset['index']].Attr[e
|
.target.dataset['iindex']];
|
if (!data_attr) {
|
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.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.classAttrList;
|
for (var i = 0; i < attrlist
|
.length; i++) {
|
var attr = attrlist[i].Attr;
|
for (var j = 0; j < attr
|
.length; j++) {
|
var ar = attr[j];
|
req.push(this.formatAttr(ar));
|
}
|
}
|
var info = {
|
eventid: eventid,
|
edtype: "0",
|
projectid: '',
|
rclsid: '',
|
robjid: '',
|
userlogin: '',
|
clsid: this.param
|
.Master_Cls.ID,
|
objid: "",
|
attr: req,
|
}
|
this.DataObjRunCustomEvent(info);
|
}
|
}
|
|
},
|
inputValListIsDel(index) {
|
// console.log(index);
|
this.inputValList.splice(index,
|
1); //删除tabPagejson的内容
|
// console.log(this.inputValList);
|
},
|
addresschange(e) {
|
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.classAttrList[index].Attr[iindex]
|
.before_click_button;
|
var button_callback = $this.classAttrList[index].Attr[iindex]
|
.button_callback;
|
if (!before_click_button) {
|
uni.showModal({
|
title: this.translateSys('tip') + "",
|
content: "before_click_button-event_id为空!",
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
return;
|
}
|
if (!button_callback) {
|
uni.showModal({
|
title: this.translateSys('tip') + "",
|
content: "button_callback-event_id为空!",
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
return;
|
}
|
var data_attr = this.classAttrList[
|
index].Attr[iindex];
|
this.DataObjRunCustomEvent_Return(
|
before_click_button, data_attr,
|
button_callback, index, iindex);
|
},
|
classAttr_AddPer(index, iindex) {
|
var param = {
|
index: index,
|
iindex: iindex
|
};
|
var $this = this;
|
uni.navigateTo({
|
url: '../selpsn/index?mulit=false¶m=' +
|
JSON.stringify(param),
|
events: {
|
AddPer(data, param) {
|
// console.log(param);
|
console.log(data);
|
$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.classAttrList[
|
param.index]
|
.Attr[param.iindex]
|
.action;
|
if (eventid) {
|
eventid = eventid
|
.trim();
|
if (eventid) {
|
var info = {
|
eventid: eventid,
|
edtype: "4",
|
projectid: "",
|
rclsid: "",
|
robjid: "",
|
userlogin: data[
|
0
|
]
|
.Login,
|
clsid: $this.param
|
.Master_Cls
|
.ID,
|
objid: "",
|
attr: [],
|
}
|
|
// var data_attr = $this.classAttrList[param.index].Attr[param.iindex];
|
$this
|
.DataObjRunCustomEvent(
|
info);
|
}
|
}
|
}
|
}
|
});
|
},
|
classAttr_AddRef(e) {
|
console.log(e.target);
|
uni.showModal({
|
title: this.translateSys('tip') + "",
|
content: "此功能还未实现!",
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
// 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 = {
|
index: index,
|
iindex: iindex
|
};
|
var $this = this;
|
uni.navigateTo({
|
url: '../selPrj/index?relation=-1¶m=' +
|
JSON.stringify(param),
|
events: {
|
AddPer(data, param) {
|
// console.log(param);
|
// console.log(data);
|
$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.classAttrList[
|
param.index]
|
.Attr[param.iindex]
|
.action;
|
if (eventid) {
|
eventid = eventid
|
.trim();
|
if (eventid) {
|
var info = {
|
eventid: eventid,
|
edtype: "2",
|
projectid: data[
|
0
|
]
|
.ID,
|
rclsid: "",
|
robjid: "",
|
userlogin: "",
|
clsid: $this.param
|
.Master_Cls
|
.ID,
|
objid: "",
|
attr: [],
|
}
|
|
// var data_attr = $this.classAttrList[param.index].Attr[param.iindex];
|
$this
|
.DataObjRunCustomEvent(
|
info);
|
}
|
}
|
}
|
}
|
});
|
},
|
onSave() {
|
this.handleButtonClick((done) => {
|
this.sava()
|
setTimeout(() => {
|
done(); // 重置状态
|
}, 1000);
|
});
|
},
|
sava() {
|
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则上上页
|
},
|
add() {
|
uni.showLoading({
|
title: "加载中...",
|
mask: true
|
});
|
var req = [];
|
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 ar = attr[j];
|
if (ar.Value == '请选择' || ar
|
.Value == '——请选择——') ar.Value =
|
'';
|
if (utils.classUtils.attrTypeIsDict(ar.Type)) {
|
if (ar.select ==
|
true) { //判断下拉是否多选
|
var valStr = "";
|
for (var v in ar.Value) {
|
if (valStr)
|
valStr += ";";
|
valStr += ar.Value[v];
|
}
|
req.push({
|
name: ar.Name,
|
value: valStr
|
});
|
} else
|
req.push({
|
name: ar.Name,
|
value: ar.Value
|
});
|
} else {
|
const node = this.formatAttr(ar)
|
req.push({
|
name: node.attr,
|
value: node.value
|
});
|
}
|
|
|
if (ar.notempty == true && !ar
|
.Value) {
|
// if(ar.NotEmpty=='1'){
|
uni.hideLoading();
|
// uni.showToast({title:ar.DispName+'不能为空!',icon:"success",duration:3000});
|
uni.showModal({
|
title: this.translateSys('tip') + "",
|
content: ar
|
.DispName +
|
'不能为空!',
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
return;
|
}
|
}
|
}
|
var enviroment = {
|
'function': '3000', // 功能点编号
|
cls_id: this.param.Master_Cls
|
.ID, // 功能点主数据类标识
|
'button': 'top', // top/bottom
|
button_name: '新增',
|
master: {
|
cls_id: this.param
|
.Master_Cls.ID,
|
}
|
};
|
|
// var dataInfo={
|
// class_id: this.param.Master_Cls.ID, data_obj_id: '', masterclsid: '',
|
// req: JSON.stringify(req), upfile: JSON.stringify([]), post_data: JSON.stringify({}),
|
// compose: JSON.stringify([]), refdatastore: JSON.stringify([]), extinfo: JSON.stringify(enviroment),
|
// not_trigger_sys_event: ''
|
// };
|
enviroment = Base64.encode(JSON.stringify(
|
enviroment)); //将字符串转换为base64编码
|
var obj_attr = {};
|
req.forEach(item => {
|
obj_attr[item.name] = item
|
.value;
|
});
|
var dataInfo = {
|
class_id: this.param
|
.Master_Cls.ID,
|
class_name: '',
|
master_cls_id: '',
|
master_obj_id: '',
|
creator: '',
|
creator_name: '',
|
not_trigger_event: '',
|
update_exist: '',
|
post_process: '',
|
ext_info: enviroment,
|
obj_attr: obj_attr
|
};
|
console.log(dataInfo);
|
// return
|
dataObjCreate(dataInfo).then(result => {
|
console.log(result);
|
uni.hideLoading();
|
if (success.result
|
.action) {
|
var action = JSON
|
.parse(success
|
.result.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":""}"
|
}
|
} else
|
uni.showToast({
|
title: "创建成功!",
|
icon: "success",
|
duration: 3000
|
});
|
//刷新
|
uni.redirectTo({
|
url: '../modal/3037?param=' +
|
JSON
|
.stringify(
|
this.param
|
) +
|
"&titlename=" +
|
this.title
|
});
|
// this.class_attr_init();
|
|
}).catch(ex => {
|
console.log(ex);
|
uni.hideLoading();
|
uni.showModal({
|
title: this.translateSys('tip') + "",
|
content: ex.errMsg,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
});
|
},
|
ini_DataObjRunCustomEvent(info) {
|
var param = {
|
EditStyle: this.param
|
.Master_Cls.View_Style.Name,
|
ViewStyle: this.param
|
.Master_Cls.View_Style.Name,
|
NotTriggerSysEvent: 0,
|
enviroment: {
|
'function': '3000', // 功能点编号
|
cls_id: this.param
|
.Master_Cls
|
.ID, // 功能点主数据类标识
|
'button': 'top', // top/bottom
|
button_name: '新增',
|
master: {
|
cls_id: this.param
|
.Master_Cls
|
.ID, // button=bottom时 master的cls_id
|
//obj_id: '' // button=bottom时 master的obj_id
|
}
|
}
|
}
|
var inputparameter = '';
|
var global_attr = '';
|
|
// var dataInfo = {
|
// edtype: info.edtype, eventid: info.eventid, projectid: info.projectid,
|
// rclsid: info.rclsid, robjid: info.robjid, userlogin: info.userlogin, clsid: info.clsid, objid: info.objid,
|
// attr: JSON.stringify(info.attr), extinfo: JSON.stringify(param), inputparameter: inputparameter, global_attr: global_attr
|
// }
|
param.enviroment = Base64.encode(JSON
|
.stringify(param.enviroment)
|
); //将字符串转换为base64编码
|
var obj_attr = {};
|
info.attr.forEach(item => {
|
obj_attr[item.attr] = item.value;
|
});
|
if (!info.eventid.includes('{')) info
|
.eventid = '{' + info.eventid + '}';
|
var dataInfo = {
|
ed_type: info.edtype,
|
start_transaction: '',
|
class_id: info.clsid,
|
class_name: '',
|
event_id: info.eventid,
|
event_name: '',
|
data_obj_id: info.objid,
|
obj_attr: obj_attr,
|
prj_id: info.projectid,
|
ref_cls_id: info.rclsid,
|
rel_obj_id: info.robjid,
|
user_login: info.userlogin,
|
data_json: '',
|
compose_info: '',
|
ext_info: param.enviroment,
|
global_attr: global_attr,
|
input_param: inputparameter,
|
};
|
console.log(dataInfo);
|
// return;
|
runCustomEvent(
|
dataInfo).then(data => {
|
console.log(data);
|
if (data.ret != 0) {
|
var tip = data
|
.err_info ?
|
typeof data
|
.err_info ==
|
'string' ? data
|
.err_info : data
|
.err_info.join(
|
'<br/>') : '';
|
if (data.ret == 801)
|
uni.showModal({
|
title: this.translateSys('tip'),
|
content: tip,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
else uni.showModal({
|
title: this.translateSys('tip'),
|
content: tip +
|
',提示:' +
|
data
|
.ret,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
return false
|
} else {
|
var tip = data.info ?
|
typeof data.info ==
|
'string' ? data
|
.info : data.info
|
.join('<br/>') :
|
'';
|
if (tip) uni
|
.showModal({
|
title: this.translateSys('tip'),
|
content: tip,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
|
if (data.action) {
|
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,
|
"CN_S_VALUE": val,
|
"Name": val,
|
"label": val,
|
"value": val
|
});
|
|
}
|
ca.dictitem =
|
dictItemList;
|
// attr[j].dictitem = val[i].choice_list;
|
} else {
|
// ca.value = val[i].value;
|
}
|
}
|
}
|
}
|
|
}
|
}
|
}
|
if (action_type ==
|
'open_select_userdlg'
|
) {
|
uni.showModal({
|
title: this.translateSys('error') + " 2.2",
|
content: "open_select_userdlg这个action_type还未处理!",
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
}
|
}
|
}
|
}
|
}
|
|
}).catch(ex => {
|
// console.log(ex);
|
uni.showModal({
|
title: this.translateSys('error') + " 2.1",
|
content: ex.errMsg,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
});
|
},
|
DataObjRunCustomEvent(info, data_attr) {
|
var $this = this;
|
var enviroment = {
|
'function': '3000', // 功能点编号
|
cls_id: this.param.Master_Cls
|
.ID, // 功能点主数据类标识
|
'button': 'top', // top/bottom
|
button_name: '新增',
|
master: {
|
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.param
|
.Master_Cls.ID, //当前数据类id
|
}
|
if (data_attr) {
|
enviroment.edit_dlg
|
.form_control = { //所属的表单控件
|
name: data_attr.Name, //字段属性
|
text: data_attr
|
.DispName, //显示文本
|
group_name: data_attr
|
.GroupName, //属性组
|
type: data_attr.Type, //字段类型
|
readonly: data_attr
|
.ReadOnly, //是否只读
|
button_img: data_attr
|
.button_img, //引用按钮的图标
|
button_tooltip: data_attr
|
.button_tooltip //引用按钮的tooltip
|
}
|
}
|
// var dataInfo = {
|
// edtype: info.edtype, eventid: info.eventid, projectid: info.projectid.replace('{','').replace('}',''),
|
// rclsid: info.rclsid, robjid: info.robjid, userlogin: info.userlogin, clsid: info.clsid, objid: info.objid,
|
// attr: JSON.stringify(info.attr), extinfo: JSON.stringify(enviroment), inputparameter: '', global_attr: JSON.stringify(this.global_attr)
|
// }
|
enviroment = Base64.encode(JSON.stringify(
|
enviroment)); //将字符串转换为base64编码
|
var global_attr = Base64.encode(JSON
|
.stringify(this.global_attr)
|
); //将字符串转换为base64编码
|
if (info.dataJson)
|
info.dataJson = Base64.encode(JSON
|
.stringify(info.dataJson)
|
); //将字符串转换为base64编码
|
var obj_attr = {};
|
info.attr.forEach(item => {
|
obj_attr[item.attr] = item.value;
|
});
|
if (!info.eventid.includes('{')) info
|
.eventid = '{' + info.eventid + '}';
|
var dataInfo = {
|
ed_type: info.edtype,
|
start_transaction: '',
|
class_id: info.clsid,
|
class_name: '',
|
event_id: info.eventid,
|
event_name: '',
|
data_obj_id: info.objid,
|
obj_attr: obj_attr,
|
prj_id: info.projectid,
|
ref_cls_id: info.rclsid,
|
rel_obj_id: info.robjid,
|
user_login: info.userlogin,
|
data_json: info.dataJson,
|
compose_info: '',
|
ext_info: enviroment,
|
global_attr: global_attr,
|
input_param: '',
|
};
|
console.log(dataInfo);
|
// return;
|
runCustomEvent(
|
dataInfo).then(data => {
|
console.log(data);
|
if (data.ret != 0) {
|
var tip = data
|
.err_info ?
|
typeof data
|
.err_info ==
|
'string' ? data
|
.err_info : data
|
.err_info.join(
|
'<br/>') : '';
|
if (data.ret == 801)
|
uni.showModal({
|
title: this.translateSys('tip'),
|
content: tip,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
else uni.showModal({
|
title: this.translateSys('tip'),
|
content: tip +
|
',提示:' +
|
data
|
.ret,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
return false
|
} else {
|
var tip = data.info ?
|
typeof data.info ==
|
'string' ? data
|
.info : data.info
|
.join('<br/>') :
|
'';
|
if (tip) uni
|
.showModal({
|
title: this.translateSys('tip'),
|
content: tip,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
|
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.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,
|
"CN_S_VALUE": val,
|
"Name": val,
|
"label": val,
|
"value": val
|
});
|
}
|
attr[
|
j]
|
.dictitem =
|
dictItemList;
|
// attr[j].dictitem = 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++
|
) {
|
console
|
.log(
|
attr[
|
j
|
]
|
.Name +
|
'==' +
|
result[
|
i
|
]
|
.attr
|
);
|
if (attr[
|
j
|
]
|
.Name ==
|
result[
|
i
|
]
|
.attr
|
) {
|
attr[
|
j]
|
.Value =
|
result[
|
i
|
]
|
.value;
|
}
|
}
|
}
|
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 (data
|
.action[i]
|
.action_type ==
|
'set_global_attr'
|
) {
|
$this.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.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({
|
title: this.translateSys('error') + " 3.1",
|
content: ex.errMsg,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
});
|
},
|
OKDataObjRunCustomEvent() {
|
var enviroment = {
|
'function': '3000', // 功能点编号
|
cls_id: this.param.Master_Cls
|
.ID, // 功能点主数据类标识
|
'button': 'top', // top/bottom
|
button_name: '新增',
|
master: {
|
cls_id: this.param
|
.Master_Cls
|
.ID, // button=bottom时 master的cls_id
|
|
}
|
};
|
var eventid = this.edit_ok_event
|
.scrip_id;
|
var req = [];
|
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 ar = attr[j];
|
|
|
if (ar.Value == '请选择' || ar
|
.Value == '——请选择——') ar.Value =
|
'';
|
req.push(this.formatAttr(ar));
|
}
|
}
|
if (this.refdatastore.length > 0) {
|
for (var i = 0; i < this.refdatastore.length; i++) {
|
if (!req.filter(function(s) {
|
return this.refdatastore[i]
|
.attr == s.name
|
}).length) {
|
length = 1;
|
req.push({
|
'attr': this.refdatastore[
|
i].attr,
|
'value': this.refdatastore[
|
i].value
|
});
|
}
|
}
|
}
|
var info = {
|
eventid: eventid,
|
edtype: "0",
|
projectid: '',
|
rclsid: '',
|
robjid: '',
|
userlogin: '',
|
clsid: this.param.Master_Cls
|
.ID,
|
objid: "",
|
attr: req,
|
}
|
// var dataInfo = {
|
// edtype: info.edtype, eventid: info.eventid, projectid: info.projectid,rclsid: info.rclsid,
|
// robjid: info.robjid, userlogin: info.userlogin, clsid: info.clsid, objid: info.objid,
|
// attr: JSON.stringify(info.attr), extinfo: JSON.stringify(enviroment), global_attr: JSON.stringify(this.global_attr)
|
// }
|
enviroment = Base64.encode(JSON.stringify(
|
enviroment)); //将字符串转换为base64编码
|
var global_attr = Base64.encode(JSON
|
.stringify(this.global_attr)
|
); //将字符串转换为base64编码
|
var obj_attr = {};
|
info.attr.forEach(item => {
|
obj_attr[item.attr] = item.value;
|
});
|
if (!eventid.includes('{')) eventid = '{' +
|
eventid + '}';
|
var dataInfo = {
|
ed_type: info.edtype,
|
start_transaction: '',
|
class_id: info.clsid,
|
class_name: '',
|
event_id: eventid,
|
event_name: '',
|
data_obj_id: info.objid,
|
obj_attr: obj_attr,
|
prj_id: info.projectid,
|
ref_cls_id: info.rclsid,
|
rel_obj_id: info.robjid,
|
user_login: info.userlogin,
|
data_json: '',
|
compose_info: '',
|
ext_info: enviroment,
|
global_attr: global_attr,
|
input_param: '',
|
};
|
console.log(dataInfo);
|
// return;
|
runCustomEvent(dataInfo).then(data => {
|
console.log(data);
|
|
if (data.ret != 0) {
|
var tip = data
|
.err_info ?
|
typeof data
|
.err_info ==
|
'string' ? data
|
.err_info : data
|
.err_info.join(
|
'<br/>') : '';
|
if (data.ret == 801)
|
uni.showModal({
|
title: this.translateSys('tip'),
|
content: tip,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
else uni.showModal({
|
title: this.translateSys('tip'),
|
content: tip +
|
',提示:' +
|
data
|
.ret,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
return false
|
} else {
|
var tip = data.info ?
|
typeof data.info ==
|
'string' ? data
|
.info : data.info
|
.join('<br/>') :
|
'';
|
if (tip) uni
|
.showModal({
|
title: this.translateSys('tip'),
|
content: tip,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
if (data.result) {
|
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();
|
}
|
}
|
|
}).catch(ex => {
|
// console.log(ex);
|
uni.showModal({
|
title: this.translateSys('error') + " 4.1",
|
content: ex.errMsg,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
});
|
},
|
DataObjRunCustomEvent_Return(eventid,
|
data_attr, button_callback, index, iindex
|
) {
|
var enviroment = {
|
'function': '3000', // 功能点编号
|
cls_id: this.param.Master_Cls
|
.ID, // 功能点主数据类标识
|
'button': 'top', // top/bottom
|
button_name: '新增',
|
master: {
|
cls_id: this.param
|
.Master_Cls
|
.ID, // button=bottom时 master的cls_id
|
//obj_id: '' // button=bottom时 master的obj_id
|
}
|
};
|
var req = [];
|
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 ar = attr[j];
|
req.push(this.formatAttr(ar));
|
}
|
}
|
if (this.refdatastore.length > 0) {
|
for (var i = 0; i < this.refdatastore.length; i++) {
|
if (!req.filter(function(s) {
|
return this.refdatastore[i]
|
.attr == s.name
|
}).length) {
|
length = 1;
|
req.push({
|
'attr': this.refdatastore[
|
i].attr,
|
'value': this.refdatastore[
|
i].value
|
});
|
}
|
}
|
}
|
var extinfo = enviroment;
|
extinfo.edit_dlg = {
|
type: 'small', //小窗口
|
class_id: this.param
|
.Master_Cls.ID, //当前数据类id
|
}
|
if (data_attr) {
|
extinfo.edit_dlg
|
.form_control = { //所属的表单控件
|
name: data_attr.Name, //字段属性
|
text: data_attr
|
.DispName, //显示文本
|
group_name: data_attr
|
.GroupName, //属性组
|
type: data_attr.Type, //字段类型
|
readonly: data_attr
|
.ReadOnly, //是否只读
|
button_img: data_attr
|
.button_img, //引用按钮的图标
|
button_tooltip: data_attr
|
.button_tooltip //引用按钮的tooltip
|
}
|
}
|
// var dataInfo = {
|
// edtype: "0", eventid: eventid, projectid: '',rclsid: '', robjid: '', userlogin: '',
|
// clsid: this.param.Master_Cls.ID, objid: '',attr: JSON.stringify(req),
|
// extinfo: JSON.stringify(extinfo), global_attr: JSON.stringify(this.global_attr)
|
// }
|
extinfo = Base64.encode(JSON.stringify(
|
extinfo)); //将字符串转换为base64编码
|
var global_attr = Base64.encode(JSON
|
.stringify(this.global_attr)
|
); //将字符串转换为base64编码
|
var obj_attr = {};
|
req.forEach(item => {
|
obj_attr[item.attr] = item.value;
|
});
|
if (!eventid.includes('{')) eventid = '{' +
|
eventid + '}';
|
var dataInfo = {
|
ed_type: "0",
|
start_transaction: '',
|
class_id: this.param.clsid,
|
class_name: '',
|
event_id: eventid,
|
event_name: '',
|
data_obj_id: '',
|
obj_attr: obj_attr,
|
prj_id: '',
|
ref_cls_id: '',
|
rel_obj_id: '',
|
user_login: '',
|
data_json: '',
|
compose_info: '',
|
ext_info: extinfo,
|
global_attr: global_attr,
|
input_param: '',
|
};
|
console.log(dataInfo);
|
// return;
|
runCustomEvent(dataInfo).then(data => {
|
console.log(data);
|
if (data.ret != 0) {
|
var tip = data
|
.err_info ?
|
typeof data
|
.err_info ==
|
'string' ? data
|
.err_info : data
|
.err_info.join(
|
'<br/>') : '';
|
if (data.ret == 801)
|
uni.showModal({
|
title: this.translateSys('tip'),
|
content: tip,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
else uni.showModal({
|
title: this.translateSys('tip'),
|
content: tip +
|
',提示:' +
|
data
|
.ret,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
return false
|
} else {
|
var tip = data.info ?
|
typeof data.info ==
|
'string' ? data
|
.info : data.info
|
.join('<br/>') :
|
'';
|
if (tip) uni
|
.showModal({
|
title: this.translateSys('tip'),
|
content: tip,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
|
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
|
);
|
|
if (action
|
.action_type ==
|
'open_panel'
|
) {
|
var d =
|
dialog({
|
title: '<i class="ace-icon fa fa-info-circle"></i> ' +
|
this.translateSys('tip'),
|
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
|
);
|
}
|
}
|
});
|
} 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> ' +
|
this.translateSys('tip'),
|
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: "2",
|
projectid: data[
|
0
|
]
|
.ID,
|
rclsid: "",
|
robjid: "",
|
userlogin: "",
|
clsid: $this
|
.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> ' +
|
this.translateSys('tip'),
|
content: action
|
.action_type +
|
'此action尚未处理!'
|
});
|
d
|
.show();
|
}
|
}
|
}
|
} else {
|
uni.showModal({
|
title: this.translateSys('tip') + "5.2",
|
content: '调用 before_click_button 脚本返回空,event_id' +
|
eventid,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
}
|
}
|
|
}).catch(ex => {
|
// console.log(ex);
|
uni.showModal({
|
title: this.translateSys('tip') + "5.1",
|
content: ex.errMsg,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
});
|
},
|
scan_ini_DataObjRunCustomEvent(info) {
|
var obj_attr = {};
|
info.attr.forEach(item => {
|
obj_attr[item.attr] = item
|
.value;
|
});
|
var param = {
|
EditStyle: this.param.Sub_Cls
|
.View_Style.Name,
|
ViewStyle: this.param.Sub_Cls
|
.View_Style.Name,
|
NotTriggerSysEvent: 0,
|
enviroment: {
|
'function': '3000', // 功能点编号
|
cls_id: this.param
|
.Sub_Cls.ID, // 功能点主数据类标识
|
'button': 'top', // top/bottom
|
button_name: '新增',
|
master: {
|
cls_id: this.param
|
.Sub_Cls
|
.ID, // button=bottom时 master的cls_id
|
//obj_id: '' // button=bottom时 master的obj_id
|
obj_attrs: obj_attr,
|
}
|
}
|
}
|
var inputparameter = '';
|
var global_attr = '';
|
// var dataInfo = {
|
// edtype: info.edtype, eventid: info.eventid, projectid: info.projectid,
|
// rclsid: info.rclsid, robjid: info.robjid, userlogin: info.userlogin, clsid: info.clsid, objid: info.objid,
|
// attr: JSON.stringify(info.attr), extinfo: JSON.stringify(param), inputparameter: inputparameter, global_attr: global_attr
|
// }
|
param = Base64.encode(JSON.stringify(
|
param)); //将字符串转换为base64编码
|
|
if (!info.eventid.includes('{')) info
|
.eventid = '{' + info.eventid + '}';
|
var dataInfo = {
|
ed_type: info.edtype,
|
start_transaction: '',
|
class_id: info.clsid,
|
class_name: '',
|
event_id: info.eventid,
|
event_name: '',
|
data_obj_id: info.objid,
|
obj_attr: obj_attr,
|
prj_id: info.projectid,
|
ref_cls_id: info.rclsid,
|
rel_obj_id: info.robjid,
|
user_login: info.userlogin,
|
data_json: '',
|
compose_info: '',
|
ext_info: param,
|
global_attr: '',
|
input_param: '',
|
};
|
console.log(dataInfo);
|
// return;
|
runCustomEvent(dataInfo).then(data => {
|
console.log(data);
|
if (data.ret != 0) {
|
var tip = data
|
.err_info ?
|
typeof data
|
.err_info ==
|
'string' ? data
|
.err_info : data
|
.err_info.join(
|
'<br/>') : '';
|
if (data.ret == 801)
|
uni.showModal({
|
title: this.translateSys('tip'),
|
content: tip,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
else uni.showModal({
|
title: this.translateSys('tip'),
|
content: tip +
|
',提示:' +
|
data
|
.ret,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
return false
|
} else {
|
var tip = data.info ?
|
typeof data.info ==
|
'string' ? data
|
.info : data.info
|
.join('<br/>') :
|
'';
|
if (tip) uni
|
.showModal({
|
title: this.translateSys('tip'),
|
content: tip,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
|
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 == .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,
|
"CN_S_VALUE": val,
|
"Name": val,
|
"label": val,
|
"value": val
|
});
|
|
}
|
ca.dictitem = dictItemList;
|
}
|
|
}
|
}
|
}
|
}
|
}
|
}
|
}
|
if (action_type ==
|
'open_select_userdlg'
|
) {
|
uni.showModal({
|
title: this.translateSys('error') + " 6.2",
|
content: "open_select_userdlg这个action_type还未处理!",
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
}
|
}
|
}
|
}
|
|
}).catch(ex => {
|
// console.log(ex);
|
uni.showModal({
|
title: this.translateSys('error') + " 6.1",
|
content: ex.errMsg,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
});
|
},
|
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;
|
} else {
|
enviroment = {
|
'function': '3000', // 功能点编号
|
cls_id: 'MBOX', //this.param.Sub_Cls.ID, // 功能点从数据类标识
|
'button': 'top', // top/bottom
|
button_name: '新增',
|
edit_dlg: {
|
type: 'small', //小窗口
|
class_id: 'MBOX', //this.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,
|
}
|
};
|
|
}
|
var global_attr = this.global_attr;
|
if (info.global_attr) {
|
global_attr = info.global_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.global_attr)
|
); //将字符串转换为base64编码
|
|
if (!info.eventid.includes('{')) info
|
.eventid = '{' + info.eventid + '}';
|
var dataInfo = {
|
ed_type: info.edtype,
|
start_transaction: '',
|
class_id: info.clsid,
|
class_name: '',
|
event_id: info.eventid,
|
event_name: '',
|
data_obj_id: info.objid,
|
obj_attr: obj_attr,
|
prj_id: info.projectid.replace('{',
|
'').replace('}', ''),
|
ref_cls_id: info.rclsid,
|
rel_obj_id: info.robjid,
|
user_login: info.userlogin,
|
data_json: '',
|
compose_info: '',
|
ext_info: enviroment,
|
global_attr: global_attr,
|
input_param: info.inputParamter,
|
};
|
console.log(dataInfo);
|
// return;
|
runCustomEvent(dataInfo).then(data => {
|
console.log(data);
|
if (data.ret != 0) {
|
var tip = data
|
.err_info ?
|
typeof data
|
.err_info ==
|
'string' ? data
|
.err_info : data
|
.err_info.join(
|
'<br/>') : '';
|
if (data.ret == 801)
|
uni.showModal({
|
title: this.translateSys('tip'),
|
content: tip,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
else uni.showModal({
|
title: this.translateSys('tip'),
|
content: tip +
|
',提示:' +
|
data
|
.ret,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
return false
|
} else {
|
var tip = data.info ?
|
typeof data.info ==
|
'string' ? data
|
.info : data.info
|
.join('<br/>') :
|
'';
|
if (tip) uni
|
.showModal({
|
title: this.translateSys('tip'),
|
content: tip,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
|
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.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++
|
) {
|
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,
|
"CN_S_VALUE": val,
|
"Name": val,
|
"label": val,
|
"value": val
|
});
|
}
|
attr[
|
j]
|
.dictitem =
|
dictItemList;
|
// attr[j].dictitem = 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
|
.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;
|
}
|
}
|
}
|
}
|
}
|
} 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;
|
var 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 (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.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;
|
}
|
}
|
}
|
|
// $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;
|
}
|
}
|
}
|
}
|
}
|
}
|
}
|
|
if (data.result) {
|
var 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 (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.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({
|
title: this.translateSys('error') + " 7.1",
|
content: ex.errMsg,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
});
|
},
|
scan_OKDataObjRunCustomEvent(eventID) {
|
uni.showLoading({
|
title: "加载中...",
|
mask: true
|
});
|
var $this = this;
|
var req = [];
|
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 ar = attr[j];
|
if (ar.Value == '请选择' || ar
|
.Value == '——请选择——') ar.Value =
|
'';
|
if (utils.classUtils.attrTypeIsDict(ar.Type)) {
|
if (ar.select ==
|
true) { //判断下拉是否多选
|
var valStr = "";
|
for (var v in ar.Value) {
|
if (valStr)
|
valStr += ";";
|
valStr += ar.Value[v];
|
}
|
req.push({
|
attr: ar.Name,
|
value: valStr
|
});
|
} else
|
req.push({
|
attr: ar.Name,
|
value: ar.Value
|
});
|
} else
|
req.push(this.formatAttr(ar));
|
|
if (ar.notempty == true && !ar
|
.Value) {
|
// if(ar.NotEmpty=='1'){
|
uni.hideLoading();
|
// uni.showToast({title:ar.DispName+'不能为空!',icon:"success",duration:3000});
|
uni.showModal({
|
title: this.translateSys('tip') + "",
|
content: ar
|
.DispName +
|
'不能为空!',
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
return;
|
}
|
}
|
}
|
var objects = [];
|
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 attr = subPanelList[s]
|
.subClassAttr[i].Attr;
|
for (var j = 0; j < attr
|
.length; j++) {
|
var ar = attr[j];
|
if (ar.Value == '请选择' || ar
|
.Value == '——请选择——') ar
|
.Value = '';
|
if (utils.classUtils.attrTypeIsDict(ar.Type)) {
|
if (ar.select ==
|
true) { //判断下拉是否多选
|
var valStr = "";
|
for (var v in ar
|
.Value) {
|
if (valStr)
|
valStr += ";";
|
valStr += ar.Value[
|
v];
|
}
|
sub_req.push({
|
attr: ar
|
.Name,
|
value: valStr
|
});
|
} else
|
sub_req.push({
|
attr: ar.Name,
|
value: ar.Value
|
});
|
} else
|
sub_req.push(this.formatAttr(ar));
|
|
if (ar.notempty == true && !ar
|
.Value) {
|
// if(ar.NotEmpty=='1'){
|
uni.hideLoading();
|
// uni.showToast({title:ar.DispName+'不能为空!',icon:"success",duration:3000});
|
uni.showModal({
|
title: this.translateSys('tip') + "",
|
content: ar
|
.DispName +
|
'不能为空!',
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
return;
|
}
|
}
|
}
|
objects.push({
|
obj_id: subPanelList[s]
|
.scanCodeVal,
|
obj_attrs: sub_req
|
});
|
}
|
var dataJson = {
|
master_cls: {
|
cls_name: 'MBOX', //$this.param.Master_Cls.Name,
|
obj_attrs: req
|
},
|
input_3037: $this.scanCodeVal, //扫码内容
|
op_type: $this.param
|
.OperationType, //作业类型定义
|
sub_cls: {
|
cls_name: 'MBOX', //$this.param.Sub_Cls.Name,
|
objects: objects
|
}
|
};
|
// console.log(JSON.stringify(dataJson));
|
// var dataInfo = {
|
// edtype: "7", eventid: eventID, projectid: '',rclsid: '', robjid: '', userlogin: '',
|
// clsid: 'MBOX', objid: '',attr: JSON.stringify([]), extinfo: JSON.stringify([]),
|
// global_attr: JSON.stringify($this.global_attr),dataJson:JSON.stringify(dataJson)
|
// }
|
// console.log(JSON.stringify(dataInfo));
|
var dataJson = Base64.encode(JSON
|
.stringify(dataJson)
|
); //将字符串转换为base64编码
|
var global_attr = Base64.encode(JSON
|
.stringify(this.global_attr)
|
); //将字符串转换为base64编码
|
if (!eventID.includes('{')) eventID = '{' +
|
eventID + '}';
|
var dataInfo = {
|
ed_type: "7",
|
start_transaction: '',
|
class_id: 'MBOX',
|
class_name: '',
|
event_id: eventID,
|
event_name: '',
|
data_obj_id: '',
|
obj_attr: '',
|
prj_id: '',
|
ref_cls_id: '',
|
rel_obj_id: '',
|
user_login: '',
|
data_json: dataJson,
|
compose_info: '',
|
ext_info: '',
|
global_attr: global_attr,
|
input_param: '',
|
};
|
console.log(dataInfo);
|
// return;
|
runCustomEvent(dataInfo).then(data => {
|
console.log(data);
|
uni.hideLoading();
|
if (data.ret != 0) {
|
var tip = data
|
.err_info ?
|
typeof data
|
.err_info ==
|
'string' ? data
|
.err_info : data
|
.err_info.join(
|
'<br/>') : '';
|
if (data.ret == 801)
|
uni.showModal({
|
title: this.translateSys('tip'),
|
content: tip,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
else uni.showModal({
|
title: this.translateSys('tip'),
|
content: tip +
|
',提示:' +
|
data
|
.ret,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
return false
|
} else {
|
var tip = data.info ?
|
typeof data.info ==
|
'string' ? data
|
.info : data.info
|
.join('<br/>') :
|
'';
|
if (tip) uni
|
.showModal({
|
title: this.translateSys('tip'),
|
content: tip,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
|
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/3037?param=' +
|
JSON
|
.stringify(
|
$this.param
|
) +
|
"&titlename=" +
|
$this.title
|
});
|
}
|
}
|
|
}).catch(ex => {
|
// console.log(ex);
|
uni.hideLoading();
|
uni.showModal({
|
title: this.translateSys('error') + " 8.1",
|
content: ex.errMsg,
|
showCancel: false,
|
confirmText: this.translateSys('close')
|
});
|
});
|
},
|
|
formatAttr(attr) {
|
if (utils.classUtils.attrTypeIsObjRefMulti(attr.Type)) //if(ar.Type=='引用对象(多个)')
|
if (attr.Value == '请') ar.Value = '';
|
if (utils.classUtils.attrTypeIsUser(attr.Type) || utils.classUtils.attrTypeIsProject(attr
|
.Type)) //if(ar.Type=='引用人员' || ar.Type=='引用项目')
|
return {
|
attr: attr.Name,
|
value: attr.ValID ? attr.ValID : ''
|
};
|
else if (utils.classUtils.attrTypeIsBool(attr.Type)) //if(ar.Type=='布尔值')
|
return {
|
attr: attr.Name,
|
value: attr.Value ? '1' : '0'
|
};
|
else
|
return {
|
attr: attr.Name,
|
value: attr.Value ? attr.Value : ''
|
};
|
},
|
translate(t) {
|
if (typeof this.$t == "function") return this.$t(`page.${t}`)
|
else return t;
|
},
|
translateSys(t) {
|
if (typeof this.$t == "function") return this.$t(`sys.${t}`)
|
else return t;
|
},
|
}
|
}
|
</script>
|
<style>
|
.class_attr_title {
|
font-size: 44rpx;
|
padding-bottom: 22rpx;
|
position: relative;
|
}
|
|
.class_attr_title .title_line {
|
border-bottom: 2rpx solid #aaa;
|
position: relative;
|
bottom: -50rpx;
|
width: calc(100% - 290rpx);
|
margin-left: 100px;
|
}
|
|
.class_attr_title .title_icon {
|
border-radius: 50%;
|
width: 100rpx;
|
line-height: 64rpx;
|
display: inline-block;
|
vertical-align: middle;
|
padding-top: 10rpx;
|
padding-left: 20rpx;
|
text-align: center;
|
color: #fff;
|
}
|
|
.class_attr_title i {
|
color: #2c6aa0 !important;
|
}
|
|
.class_attr_title .title_icon i {
|
font-size: 80rpx;
|
}
|
|
.class_attr_title .title {
|
padding-right: 22rpx;
|
display: inline-block;
|
background-color: #fff;
|
position: relative;
|
bottom: -8rpx;
|
}
|
|
.class_attr_title .arrow {
|
position: absolute;
|
top: 6rpx;
|
right: 30rpx;
|
font-size: 60rpx;
|
}
|
|
input::-webkit-input-placeholder {
|
font-size: 12rpx;
|
}
|
|
textarea {
|
width: 98%;
|
border: 1px solid #d5d5d5;
|
padding: 10rpx 8rpx 12rpx;
|
background: #FFF;
|
border-radius: 0 !important;
|
font-size: 34rpx;
|
font-family: inherit;
|
box-shadow: none !important;
|
transition-duration: 0.1s;
|
color: #046db3;
|
margin-top: 4px;
|
}
|
|
input {
|
border: 1px solid #d5d5d5;
|
width: 98%;
|
height: 52rpx;
|
background: #FFF;
|
border-radius: 0 !important;
|
color: #046db3;
|
padding: 10rpx 8rpx 12rpx;
|
font-size: 34rpx;
|
font-family: inherit;
|
box-shadow: none !important;
|
transition-duration: 0.1s;
|
margin-top: 4rpx;
|
}
|
|
.select {
|
width: 20px;
|
position: absolute;
|
opacity: 0;
|
}
|
|
.class_attr_body .form-group {
|
margin: 20rpx 30rpx;
|
/* margin-left: -12px;
|
margin-right: -12px; */
|
}
|
|
.subclass_attr_body .form-group {
|
margin: 20rpx 10rpx;
|
/* margin-left: -12px;
|
margin-right: -12px; */
|
}
|
|
.form-group>label[class*="col-"] {
|
margin-bottom: 8rpx;
|
font-size: 32rpx;
|
}
|
|
.form-group label {
|
vertical-align: middle;
|
line-height: 60rpx;
|
}
|
|
.no-padding-right {
|
padding-right: 0 !important;
|
}
|
|
.col-xs-12 {
|
width: 100%;
|
}
|
|
.tx_title {
|
font-size: 32rpx;
|
}
|
|
.tx_title2 {
|
font-size: 32rpx;
|
text-align: right;
|
display: inline-block;
|
vertical-align: -2px;
|
}
|
|
.text-right {
|
margin-right: 20rpx;
|
margin-top: -6rpx;
|
display: inline-block;
|
float: right;
|
font-size: 44rpx;
|
}
|
|
.text-right2 {
|
margin: 0;
|
vertical-align: -4px;
|
margin-left: 9px;
|
float: none;
|
font-size: 44rpx;
|
display: inline-block;
|
}
|
|
.section_iput {
|
border: 1px solid #d5d5d5;
|
width: 98%;
|
height: 62rpx;
|
background: #FFF;
|
border-radius: 0 !important;
|
color: #046db3;
|
padding: 10rpx 8rpx 10rpx;
|
font-size: 34rpx;
|
font-family: inherit;
|
box-shadow: none !important;
|
transition-duration: 0.1s;
|
}
|
|
.date_iput {
|
border: 1px solid #d5d5d5;
|
/* width: 98%; */
|
height: 62rpx;
|
background: #FFF;
|
border-radius: 0 !important;
|
color: #046db3;
|
padding: 10rpx 8rpx 4rpx;
|
font-size: 34rpx;
|
font-family: inherit;
|
box-shadow: none !important;
|
transition-duration: 0.1s;
|
}
|
|
button.btn_add {
|
width: 49.5%;
|
margin-top: 50rpx;
|
padding: 20rpx;
|
line-height: 1.5;
|
background: #27A6E1;
|
border: none;
|
color: #fff;
|
font-size: 38rpx;
|
font-weight: bold;
|
float: right;
|
display: inline-block;
|
}
|
|
button.btn_cancel {
|
width: 49.5%;
|
margin-top: 50rpx;
|
padding: 20rpx;
|
line-height: 1.5;
|
/* background: #27A6E1;
|
border: none;
|
color: #fff; */
|
background: #fff;
|
color: #000;
|
font-size: 38rpx;
|
font-weight: bold;
|
float: left;
|
display: inline-block;
|
}
|
|
button.btn_sava {
|
width: 100%;
|
margin-top: 50rpx;
|
padding: 20rpx;
|
line-height: 1.5;
|
background: #27A6E1;
|
border: none;
|
color: #fff;
|
font-size: 38rpx;
|
font-weight: bold;
|
float: left;
|
display: inline-block;
|
}
|
|
.i_tishi {
|
color: red;
|
vertical-align: sub;
|
font-style: initial;
|
margin-left: 20rpx;
|
font-size: 17px;
|
}
|
|
.attr_field {
|
display: inline-block;
|
vertical-align: middle;
|
margin-left: 8px;
|
/* width: 71%; */
|
}
|
|
.input_vallist {
|
max-height: 350rpx;
|
overflow-y: auto;
|
display: none;
|
}
|
|
.input_vallist ul {
|
/* border: 1px solid red; */
|
padding: 0 20rpx;
|
}
|
|
.input_vallist ul li {
|
list-style: none;
|
padding: 20rpx;
|
border-bottom: 1px solid #ccc;
|
}
|
|
.input_vallist ul li a {
|
float: right;
|
}
|
|
.input_vallist ul li a i {
|
font-size: 45rpx;
|
}
|
|
.panel_title {
|
font-size: 38rpx;
|
background-color: #27A6E1;
|
line-height: 80rpx;
|
color: #fff;
|
text-align: center;
|
font-weight: bold;
|
}
|
|
.v-panel {
|
min-height: 788rpx;
|
}
|
|
.v-panellist {
|
border: 4rpx solid #aaa;
|
border-radius: 10rpx;
|
margin: 10rpx 20rpx 0rpx 20rpx;
|
}
|
|
.v-paneldel {
|
text-align: right;
|
}
|
|
.panel_del {
|
font-size: 44rpx;
|
text-decoration: initial;
|
margin-top: 10rpx;
|
margin-right: 20rpx;
|
}
|
|
.divX {
|
width: 20px;
|
height: 20px;
|
border-radius: 60%;
|
position: absolute;
|
top: -10px;
|
right: -10px;
|
z-index: 100;
|
}
|
|
.view-popup {
|
position: relative;
|
}
|
|
.popup-content {
|
@include flex;
|
align-items: center;
|
justify-content: center;
|
padding: 30rpx;
|
background-color: #fff;
|
/* height: 150px; */
|
/* border: 1px solid red; */
|
}
|
|
.popup-cont {
|
overflow-y: auto;
|
/* border: 1px solid red; */
|
}
|
|
.popup-height {
|
@include height;
|
/* width: 200px; */
|
}
|
|
.popup-header {
|
font-size: 42rpx;
|
font-weight: bold;
|
margin: 20rpx 20rpx 0px 20rpx;
|
}
|
|
.view_popup_CheckList {
|
margin-bottom: 20rpx;
|
}
|
|
.popup-footer {
|
float: right;
|
position: absolute;
|
bottom: 10rpx;
|
right: 20rpx;
|
}
|
|
button.btn_popup_add {
|
width: 180rpx;
|
margin-top: 50rpx;
|
margin-right: 20rpx;
|
padding: 15rpx;
|
line-height: 1.5;
|
background: #27A6E1;
|
border: none;
|
color: #fff;
|
font-size: 38rpx;
|
font-weight: bold;
|
/* float: left; */
|
display: inline-block;
|
}
|
|
button.btn_popup_cancel {
|
width: 180rpx;
|
margin-top: 50rpx;
|
padding: 15rpx;
|
line-height: 1.5;
|
/* background: #27A6E1;
|
border: none;
|
color: #fff; */
|
background: #fff;
|
color: #000;
|
font-size: 38rpx;
|
font-weight: bold;
|
/* float: right; */
|
display: inline-block;
|
}
|
</style>
|