From 8b47a6acff1683df5764c5df1b2460110255f544 Mon Sep 17 00:00:00 2001
From: jt <jt@activesoft.com.cn>
Date: 星期一, 29 四月 2024 17:16:33 +0800
Subject: [PATCH] 登录时将获取的mac地址例如:78b8d67511ca 作为client_info传进api/user/ace/VerifyPassword接口里
---
pages/modal/ms_classAttr.vue | 5070 +++++++++++++++++++++++++++++++++++++++++------------------
1 files changed, 3,516 insertions(+), 1,554 deletions(-)
diff --git a/pages/modal/ms_classAttr.vue b/pages/modal/ms_classAttr.vue
index 4c2deb3..d95414f 100644
--- a/pages/modal/ms_classAttr.vue
+++ b/pages/modal/ms_classAttr.vue
@@ -1,50 +1,58 @@
<style>
.class_attr_title {
font-size: 44rpx;
- padding-bottom: 22rpx;
- position: relative;
+ 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;
+ 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;
+ border-radius: 50%;
+ width: 100rpx;
line-height: 64rpx;
- display: inline-block;
- vertical-align: middle;
- padding-top: 10rpx;
+ display: inline-block;
+ vertical-align: middle;
+ padding-top: 10rpx;
padding-left: 20rpx;
- text-align: center;
- color: #fff;
+ text-align: center;
+ color: #fff;
}
+
.class_attr_title i {
- color: #2c6aa0!important;
+ color: #2c6aa0 !important;
}
+
.class_attr_title .title_icon i {
- font-size: 80rpx;
+ font-size: 80rpx;
}
+
.class_attr_title .title {
- padding-right: 22rpx;
- display: inline-block;
- background-color: #fff;
- position: relative;
- bottom: -8rpx;
+ padding-right: 22rpx;
+ display: inline-block;
+ background-color: #fff;
+ position: relative;
+ bottom: -8rpx;
}
+
.class_attr_title .arrow {
- position: absolute;
+ position: absolute;
top: 6rpx;
right: 30rpx;
font-size: 60rpx;
}
+
input::-webkit-input-placeholder {
font-size: 12rpx;
}
- textarea{
+
+ textarea {
width: 98%;
border: 1px solid #d5d5d5;
padding: 10rpx 8rpx 12rpx;
@@ -57,7 +65,8 @@
color: #046db3;
margin-top: 4px;
}
- input{
+
+ input {
border: 1px solid #d5d5d5;
width: 98%;
height: 52rpx;
@@ -71,46 +80,62 @@
transition-duration: 0.1s;
margin-top: 4rpx;
}
- .select{
+
+ .select {
width: 20px;
position: absolute;
opacity: 0;
}
+
.class_attr_body .form-group {
margin: 20rpx 30rpx;
- /* margin-left: -12px;
+ /* margin-left: -12px;
margin-right: -12px; */
}
- .form-group > label[class*="col-"] {
- margin-bottom: 8rpx;
+
+ .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;
+ vertical-align: middle;
+ line-height: 60rpx;
}
+
.no-padding-right {
- padding-right: 0 !important;
+ padding-right: 0 !important;
}
+
.col-xs-12 {
- width: 100%;
+ width: 100%;
}
- .tx_title{
- font-size: 36rpx;
+
+ .tx_title {
+ font-size: 32rpx;
}
- .tx_title2{
- font-size: 36rpx;
+
+ .tx_title2 {
+ font-size: 32rpx;
text-align: right;
display: inline-block;
vertical-align: -2px;
}
- .text-right{
+
+ .text-right {
margin-right: 20rpx;
margin-top: -6rpx;
display: inline-block;
float: right;
font-size: 44rpx;
}
+
.text-right2 {
margin: 0;
vertical-align: -4px;
@@ -119,7 +144,8 @@
font-size: 44rpx;
display: inline-block;
}
- .section_iput{
+
+ .section_iput {
border: 1px solid #d5d5d5;
width: 98%;
height: 62rpx;
@@ -132,7 +158,8 @@
box-shadow: none !important;
transition-duration: 0.1s;
}
- .date_iput{
+
+ .date_iput {
border: 1px solid #d5d5d5;
/* width: 98%; */
height: 62rpx;
@@ -145,459 +172,878 @@
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-size: 38rpx;
font-weight: bold;
+ float: right;
+ display: inline-block;
}
- .i_tishi{
+
+ button.btn_cancel {
+ 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: 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;
+ }
+
+ button.btn_trigger {
+ width: 100%;
+ margin-top: 20rpx;
+ 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{
+
+ .attr_field {
display: inline-block;
vertical-align: middle;
margin-left: 8px;
/* width: 71%; */
}
-
+
.input_vallist {
max-height: 350rpx;
- overflow-y:auto;
+ overflow-y: auto;
display: none;
}
- .input_vallist ul{
+
+ .input_vallist ul {
/* border: 1px solid red; */
padding: 0 20rpx;
}
- .input_vallist ul li{
+
+ .input_vallist ul li {
list-style: none;
padding: 20rpx;
border-bottom: 1px solid #ccc;
}
- .input_vallist ul li a{
+
+ .input_vallist ul li a {
float: right;
}
+
.input_vallist ul li a i {
- font-size: 45rpx;
+ font-size: 45rpx;
}
- .panel_title{
- font-size: 38rpx;
+
+ .panel_title {
+ font-size: 38rpx;
background-color: #27A6E1;
line-height: 80rpx;
color: #fff;
text-align: center;
font-weight: bold;
}
- .v-panellist{
- border:4rpx solid #aaa;
+
+ .v-panel {
+ min-height: 788rpx;
+ }
+
+ .v-panellist {
+ border: 4rpx solid #aaa;
border-radius: 10rpx;
- margin-bottom: 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: 0;
+ 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;
+ font-size: 38rpx;
+ font-weight: bold;
+ /* float: right; */
+ display: inline-block;
}
</style>
<template>
<view class="content">
+ <!-- 涓绘暟鎹�-->
<view class="v-area" v-for="(classattr,index) in classAttrList">
<div class="class_attr_title" style="display: none;">
<div class="title_line"></div>
- <div class="title_icon" :style="{'background-color':classattr.BkColor}">
+ <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>
+ <a href="javascript:;" class="arrow" @tap="onarrow(index,classattr.Open)"><i class="ace-icon fa "
+ :class="classattr.Open?'fa-angle-down':'fa-angle-up'"></i></a>
</div>
+ <!-- 涓绘暟鎹樉绀鸿鎯呭尯 -->
<div class="class_attr_body" :style="{'display':classattr.Open?'block':'none'}">
<div class="dv_field_div" v-for="(attr,iindex) in classattr.Attr">
- <view class="form-group" v-if="attr.Type=='瀛楃涓� || attr.Type=='鍙彉闀垮瓧绗︿覆' || attr.Type=='鏁存暟' || attr.Type=='娴偣鏁�" :style="{'display':attr.hidden == 'True'?'none':''}">
+ <view class="form-group"
+ v-if="attr.Type=='瀛楃涓� || attr.Type=='鍙彉闀垮瓧绗︿覆' || attr.Type=='鏁存暟' || attr.Type=='娴偣鏁�"
+ :style="{'display':attr.hidden == true?'none':''}">
<view v-if="classattr.control_style=='涓婁笅甯冨眬'">
- <text class="tx_title" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:<i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i></text> <!-- attr.NotEmpty=='1' -->
+ <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>
+ <a @tap="classAttr_extButton(index,iindex)"><i
+ class="ace-icon fa fa-plus-circle"></i></a>
</div>
- <input type="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 style='width: 100px;position: relative;'>
+ <image class="divX" src="../../images/msg_50_new.png"></image>-->
+ <input :type="attr.Type=='鏁存暟' || attr.Type=='娴偣鏁�?'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="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:</p>
- <input type="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 || attr.NotEmpty=='1'?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 || attr.NotEmpty=='1'?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 || attr.NotEmpty=='1'?10:5) - (attr.ext_button==true?9:0) +'%'}" :disabled="attr.edit?false:true"></textarea>
+ <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=='娴偣鏁�?'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>
+ <a @tap="classAttr_extButton(index,iindex)"><i
+ class="ace-icon fa fa-plus-circle"></i></a>
</div>
- <i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i>
</view>
</view>
- <view class="form-group" v-if="attr.Type=='甯冨皵鍊�" :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'}">
+ <view class="form-group" v-if="attr.Type=='甯冨皵鍊�" :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 || attr.NotEmpty=='1'">*</i></text>
+ <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=='鏃堕棿'" :style="{'display':attr.hidden == 'True'?'none':''}">
+ <view class="form-group" v-if="attr.Type=='鏃ユ湡' || attr.Type=='鏃堕棿'"
+ :style="{'display':attr.hidden == true?'none':''}">
<view v-if="classattr.control_style=='涓婁笅甯冨眬'">
- <text class="tx_title" :style="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:<i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i></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>
+ <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="{'width':classattr.title_p_wdith+'%'}">{{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 || attr.NotEmpty=='1'?10:5) +'%'}">
- <view class="picker">{{attr.Value}}</view>
+ <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>
- <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=='瀛楀吀-瀛楃涓�" :style="{'display':attr.hidden == 'True'?'none':''}">
+ <view class="form-group" v-if="attr.Type=='瀛楀吀' || attr.Type=='瀛楀吀-瀛楃涓� || attr.Type=='瀛楀吀-鏁存暟'"
+ :style="{'display':attr.hidden == true?'none':''}">
<view v-if="classattr.control_style=='涓婁笅甯冨眬'">
- <text class="tx_title">{{attr.DispName}}:<i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i></text>
- <picker class="section_iput" @change="onchange" :range="attr.dictitem" range-key="CN_S_NAME" v-if="attr.select==false" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" :disabled="attr.edit?false:true">
+ <text class="tx_title"
+ :style="{'font-family':classattr.Font.Name?classattr.Font.Name:'initial','font-size':classattr.Font.Size?classattr.Font.Size:'initial','font-weight':classattr.Font.Bold?'bold':'initial','font-style':classattr.Font.Tilt?'italic':'initial','text-decoration':classattr.Font.Underline?'underline':'initial','background-color':classattr.Font.Bk_Color,'color':classattr.Font.Text_Color,'width':classattr.title_p_wdith+'%'}"><i
+ class="i_tishi" v-if="attr.notempty==true">*</i>{{attr.DispName}}:</text>
+ <picker class="section_iput" @change="onchange" :range="attr.dictitem" range-key="CN_S_NAME"
+ v-if="attr.select==false" :data-index="index" :data-iindex="iindex"
+ :style="{'width':attr.Width}" :disabled="attr.edit?false:true">
<label class="">{{ attr.Value }}</label>
</picker>
- <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>
+ <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="{'width':classattr.title_p_wdith+'%'}">{{attr.DispName}}:</p>
- <picker class="section_iput attr_field" @change="onchange" :range="attr.dictitem" range-key="CN_S_NAME" v-if="attr.select==false" :data-index="index" :data-iindex="iindex" :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true || attr.NotEmpty=='1'?10:5) +'%'}">
+ <p class="tx_title2"
+ :style="{'font-family':classattr.Font.Name?classattr.Font.Name:'initial','font-size':classattr.Font.Size?classattr.Font.Size:'initial','font-weight':classattr.Font.Bold?'bold':'initial','font-style':classattr.Font.Tilt?'italic':'initial','text-decoration':classattr.Font.Underline?'underline':'initial','background-color':classattr.Font.Bk_Color,'color':classattr.Font.Text_Color,'width':classattr.title_p_wdith+'%'}">
+ <i class="i_tishi" v-if="attr.notempty==true">*</i>{{attr.DispName}}:</p>
+ <picker class="section_iput attr_field" @change="onchange" :range="attr.dictitem"
+ range-key="CN_S_NAME" v-if="attr.select==false" :data-index="index"
+ :data-iindex="iindex"
+ :style="{'width': attr.Width.split('%')[0] - classattr.title_p_wdith - (attr.notempty==true?10:5) +'%'}">
<label class="">{{ attr.Value }}</label>
</picker>
- <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}"></select-cy>
- <i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i>
+ <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=='寮曠敤瀵硅薄(澶氫釜)'" :style="{'display':attr.hidden == 'True'?'none':''}">
+ <view class="form-group" v-if="attr.Type=='寮曠敤瀵硅薄(鍗曚釜)' || attr.Type=='寮曠敤瀵硅薄(澶氫釜)'"
+ :style="{'display':attr.hidden == true?'none':''}">
<view v-if="classattr.control_style=='涓婁笅甯冨眬'">
- <text class="tx_title">{{attr.DispName}}:<i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i></text>
+ <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=='寮曠敤瀵硅薄(鍗曚釜)'">
- <a @tap="classAttr_AddRef" :data-classid="attr.RelCls.split('|')[0]" :data-classname="attr.RelCls.split('|')[1]" ><i class="ace-icon fa fa-plus-circle"></i></a>
+ <a @tap="classAttr_AddRef" :data-classid="attr.RelCls.split('|')[0]"
+ :data-classname="attr.RelCls.split('|')[1]"><i
+ class="ace-icon fa fa-plus-circle"></i></a>
</div>
<div class="text-right" v-if="attr.Type=='寮曠敤瀵硅薄(澶氫釜)'">
- <picker class="select" @change="classAttr_AddRef" :range="attr.RelClsList" range-key="name" :data-index="index" :data-iindex="iindex">
+ <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" >
+ <input type="text" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}"
+ disabled="true">
</view>
<view v-if="classattr.control_style=='宸﹀彸甯冨眬'">
- <p class="tx_title2" :style="{'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 || attr.NotEmpty=='1'?10:5) - 9 +'%'}" disabled="true" >
+ <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">
<div class="text-right2" v-if="attr.Type=='寮曠敤瀵硅薄(鍗曚釜)'">
- <a @tap="classAttr_AddRef" :data-classid="attr.RelCls.split('|')[0]" :data-classname="attr.RelCls.split('|')[1]" ><i class="ace-icon fa fa-plus-circle"></i></a>
+ <a @tap="classAttr_AddRef" :data-classid="attr.RelCls.split('|')[0]"
+ :data-classname="attr.RelCls.split('|')[1]"><i
+ class="ace-icon fa fa-plus-circle"></i></a>
</div>
<div class="text-right2" v-if="attr.Type=='寮曠敤瀵硅薄(澶氫釜)'">
- <picker class="select" @change="classAttr_AddRef" :range="attr.RelClsList" range-key="name" :data-index="index" :data-iindex="iindex">
+ <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>
- <i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i>
</view>
</view>
- <view class="form-group" v-if="attr.Type=='寮曠敤浜哄憳'" :style="{'display':attr.hidden == 'True'?'none':''}">
+ <view class="form-group" v-if="attr.Type=='寮曠敤浜哄憳'"
+ :style="{'display':attr.hidden == true?'none':''}">
<view v-if="classattr.control_style=='涓婁笅甯冨眬'">
- <text class="tx_title">{{attr.DispName}}:<i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i></text>
+ <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>
+ <a class="class_attr_add_per" @tap="classAttr_AddPer(index,iindex)"><i
+ class="ace-icon fa fa-plus-circle"></i></a>
</div>
- <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true" >
+ <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true">
</view>
<view v-if="classattr.control_style=='宸﹀彸甯冨眬'">
- <p class="tx_title2" :style="{'width':classattr.title_p_wdith+'%'}">{{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 || attr.NotEmpty=='1'?10:5) - 9 +'%'}" disabled="true" >
+ <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">
<div class="text-right2">
- <a class="class_attr_add_per" @tap="classAttr_AddPer(index,iindex)"><i class="ace-icon fa fa-plus-circle"></i></a>
+ <a class="class_attr_add_per" @tap="classAttr_AddPer(index,iindex)"><i
+ class="ace-icon fa fa-plus-circle"></i></a>
</div>
- <i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i>
</view>
</view>
- <view class="form-group" v-if="attr.Type=='寮曠敤椤圭洰'" :style="{'display':attr.hidden == 'True'?'none':''}">
+ <view class="form-group" v-if="attr.Type=='寮曠敤椤圭洰'"
+ :style="{'display':attr.hidden == true?'none':''}">
<view v-if="classattr.control_style=='涓婁笅甯冨眬'">
- <text class="tx_title">{{attr.DispName}}:<i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i></text>
+ <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>
+ <a href="#" class="class_attr_add_prj" @tap="classAttr_AddPrj(index,iindex)"><i
+ class="ace-icon fa fa-plus-circle"></i></a>
</div>
- <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true" >
+ <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true">
</view>
<view v-if="classattr.control_style=='宸﹀彸甯冨眬'">
- <p class="tx_title2" :style="{'width':classattr.title_p_wdith+'%'}">{{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 || attr.NotEmpty=='1'?10:5) - 9 +'%'}" disabled="true" >
+ <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">
<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>
+ <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=='缂栫爜'" :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">
+ </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">
<i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i>
</view>
</view>
- <view class="form-group" v-if="attr.Type=='缂栫爜'" :style="{'display':attr.hidden == 'True'?'none':''}">
+ <view class="form-group" v-if="attr.Type=='鐪佸競鍖�" :style="{'display':attr.hidden == true?'none':''}">
<view v-if="classattr.control_style=='涓婁笅甯冨眬'">
- <text class="tx_title">{{attr.DispName}}:<i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i></text>
- <input type="text" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" :disabled="attr.edit?false:true" >
+ <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="{'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 || attr.NotEmpty=='1'?10:5) +'%'}" :disabled="attr.edit?false:true" >
- <i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i>
- </view>
- </view>
- <view class="form-group" v-if="attr.Type=='鐪佸競鍖�" :style="{'display':attr.hidden == 'True'?'none':''}">
- <view v-if="classattr.control_style=='涓婁笅甯冨眬'">
- <text class="tx_title">{{attr.DispName}}:<i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i></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="{'width':classattr.title_p_wdith+'%'}">{{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 || attr.NotEmpty=='1'?10:5) +'%'}">{{attr.Value}}</pickerAddress>
- <i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i>
+ <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-area class_attr_body">
- <view class="form-group">
- <!-- 宸﹀彸甯冨眬 -->
- <p class="tx_title2" >{{param.Scan_Code.Name}}:</p>
- <input type="text" class="attr_field" :value="scanCodeVal" @focus="scan_ontap" :style="param.Scan_Code.Have_Select_Button==true?'width: '+(100-(param.Scan_Code.Name.length * 5)-16)+'%;':'width: '+(100-(param.Scan_Code.Name.length * 5)-7)+'%;'">
- <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="" > -->
- <!-- 鎵爜鍚庝簨浠惰繑鍥�-->
- <!-- <div class="input_vallist" >
- <ul v-for="(inputval,vindex) in inputValList">
- <li><span>{{inputval.Name}}</span><a href="javascript:;" @tap="inputValListIsDel(vindex)"><i class="ace-icon fa fa-times"></i></a></li>
- </ul>
- </div> -->
- </view>
- </view>
-
+
+ <!-- 浠庢暟鎹�-->
<view class="v-panel">
<div class="panel_title">{{param.Sub_Cls.Title}}</div>
- <view class="v-panellist" v-for="(subpanel,index) in subPanelList">
- <view class="v-area" v-for="(subclassattr,index) in subpanel.subClassAttrList">
+ <!-- 浠庢暟鎹壂鐮佸尯 -->
+ <view class="v-area class_attr_body" v-if="param.Sub_Cls.Can_Add_Delete == true">
+ <h4 style="margin: 15rpx 0 0 30rpx;font-weight: bold;">鏂板{{param.Sub_Cls.Name }}</h4>
+ <view class="form-group">
+ <!-- 宸﹀彸甯冨眬 -->
+ <p class="tx_title2">{{param.Scan_Code.Name}}:</p>
+ <input type="text" class="attr_field" :value="scanCodeVal" @focus="scan_ontap" @blur="scan_onevent"
+ :style="param.Scan_Code.Have_Select_Button==true?'width: '+(100-(param.Scan_Code.Name.length * 5)-14)+'%;':'width: '+(100-(param.Scan_Code.Name.length * 5)-5)+'%;'">
+ <div class="text-right2" v-if="param.Scan_Code.Have_Select_Button==true">
+ <a @tap="scan_classAttr_extButton()"><i class="ace-icon fa"
+ :class="param.Scan_Code.Img?param.Scan_Code.Img:'fa-plus-circle'"></i></a>
+ </div>
+ <!-- 涓婁笅甯冨眬 -->
+ <!-- <text class="tx_title">{{param.Scan_Code.Name}}锛�/text>
+ <div class="text-right" v-if="param.Scan_Code.Have_Select_Button==true">
+ <a @tap="ms_classAttr_extButton()"><i class="ace-icon fa" :class="param.Scan_Code.Img?param.Scan_Code.Img:'fa-plus-circle'"></i></a>
+ </div>
+ <input type="text" value="" > -->
+ </view>
+ </view>
+ <!-- 浠庢暟鎹樉绀鸿鎯呭尯 -->
+ <view class="v-panellist" v-for="(subpanel,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}">
+ <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>
+ <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="class_attr_body" :style="{'display':subclassattr.Open?'block':'none'}">
+ <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=='娴偣鏁�" :style="{'display':attr.hidden == 'True'?'none':''}">
+ <view class="form-group"
+ v-if="attr.Type=='瀛楃涓� || attr.Type=='鍙彉闀垮瓧绗︿覆' || attr.Type=='鏁存暟' || attr.Type=='娴偣鏁�"
+ :style="{'display':attr.hidden == true?'none':''}">
<view v-if="subclassattr.control_style=='涓婁笅甯冨眬'">
- <text class="tx_title" :style="{'width':subclassattr.title_p_wdith+'%'}">{{attr.DispName}}:<i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i></text> <!-- attr.NotEmpty=='1' -->
+ <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>
+ <a @tap="classAttr_extButton(index,iindex)"><i
+ class="ace-icon fa fa-plus-circle"></i></a>
</div>
- <input type="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>
-
+ <input :type="attr.Type=='鏁存暟' || attr.Type=='娴偣鏁�?'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="{'width':subclassattr.title_p_wdith+'%'}">{{attr.DispName}}:</p>
- <input type="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] - subclassattr.title_p_wdith - (attr.notempty==true || attr.NotEmpty=='1'?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] - subclassattr.title_p_wdith - (attr.notempty==true || attr.NotEmpty=='1'?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] - subclassattr.title_p_wdith - (attr.notempty==true || attr.NotEmpty=='1'?10:5) - (attr.ext_button==true?9:0) +'%'}" :disabled="attr.edit?false:true"></textarea>
+ <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=='娴偣鏁�?'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>
+ <a @tap="classAttr_extButton(index,iindex)"><i
+ class="ace-icon fa fa-plus-circle"></i></a>
</div>
- <i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i>
</view>
</view>
- <view class="form-group" v-if="attr.Type=='甯冨皵鍊�" :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': subclassattr.control_style=='宸﹀彸甯冨眬'?subclassattr.title_p_wdith+2 +'%':'10rpx'}">
+ <view class="form-group" v-if="attr.Type=='甯冨皵鍊�"
+ :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 || attr.NotEmpty=='1'">*</i></text>
+ <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=='鏃堕棿'" :style="{'display':attr.hidden == 'True'?'none':''}">
+ <view class="form-group" v-if="attr.Type=='鏃ユ湡' || attr.Type=='鏃堕棿'"
+ :style="{'display':attr.hidden == true?'none':''}">
<view v-if="subclassattr.control_style=='涓婁笅甯冨眬'">
- <text class="tx_title" :style="{'width':subclassattr.title_p_wdith+'%'}">{{attr.DispName}}:<i class="i_tishi" v-if="attr.notempty==true">*</i></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>
+ <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="{'width':subclassattr.title_p_wdith+'%'}">{{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] - subclassattr.title_p_wdith - (attr.notempty==true || attr.NotEmpty=='1'?10:5) +'%'}">
- <view class="picker">{{attr.Value}}</view>
+ <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>
- <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=='瀛楀吀-瀛楃涓�" :style="{'display':attr.hidden == 'True'?'none':''}">
+ <view class="form-group" v-if="attr.Type=='瀛楀吀' || attr.Type=='瀛楀吀-瀛楃涓� || attr.Type=='瀛楀吀-鏁存暟'"
+ :style="{'display':attr.hidden == true?'none':''}">
<view v-if="subclassattr.control_style=='涓婁笅甯冨眬'">
- <text class="tx_title">{{attr.DispName}}:<i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i></text>
- <picker class="section_iput" @change="onchange" :range="attr.dictitem" range-key="CN_S_NAME" v-if="attr.select==false" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" :disabled="attr.edit?false:true">
+ <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="onchange2" v-else-if="attr.select==true" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" :disabled="attr.edit?false:true"></select-cy>
+ <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="{'width':subclassattr.title_p_wdith+'%'}">{{attr.DispName}}:</p>
- <picker class="section_iput attr_field" @change="onchange" :range="attr.dictitem" range-key="CN_S_NAME" v-if="attr.select==false" :data-index="index" :data-iindex="iindex" :style="{'width': attr.Width.split('%')[0] - subclassattr.title_p_wdith - (attr.notempty==true || attr.NotEmpty=='1'?10:5) +'%'}">
+ <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="onchange2" v-else-if="attr.select==true" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}"></select-cy>
- <i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i>
+ <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=='寮曠敤瀵硅薄(澶氫釜)'" :style="{'display':attr.hidden == 'True'?'none':''}">
+ <view class="form-group" v-if="attr.Type=='寮曠敤瀵硅薄(鍗曚釜)' || attr.Type=='寮曠敤瀵硅薄(澶氫釜)'"
+ :style="{'display':attr.hidden == true?'none':''}">
<view v-if="subclassattr.control_style=='涓婁笅甯冨眬'">
- <text class="tx_title">{{attr.DispName}}:<i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i></text>
+ <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=='寮曠敤瀵硅薄(鍗曚釜)'">
- <a @tap="classAttr_AddRef" :data-classid="attr.RelCls.split('|')[0]" :data-classname="attr.RelCls.split('|')[1]" ><i class="ace-icon fa fa-plus-circle"></i></a>
+ <a @tap="classAttr_AddRef" :data-classid="attr.RelCls.split('|')[0]"
+ :data-classname="attr.RelCls.split('|')[1]"><i
+ class="ace-icon fa fa-plus-circle"></i></a>
</div>
<div class="text-right" v-if="attr.Type=='寮曠敤瀵硅薄(澶氫釜)'">
- <picker class="select" @change="classAttr_AddRef" :range="attr.RelClsList" range-key="name" :data-index="index" :data-iindex="iindex">
+ <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-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" disabled="true" >
+ <input type="text" :data-iiindex="iiindex" :data-index="index" :data-iindex="iindex"
+ :style="{'width':attr.Width}" disabled="true">
</view>
<view v-if="subclassattr.control_style=='宸﹀彸甯冨眬'">
- <p class="tx_title2" :style="{'width':subclassattr.title_p_wdith+'%'}">{{attr.DispName}}:</p>
- <input type="text" class="attr_field" :data-index="index" :data-iindex="iindex" :style="{'width': attr.Width.split('%')[0] - subclassattr.title_p_wdith - (attr.notempty==true || attr.NotEmpty=='1'?10:5) - 9 +'%'}" disabled="true" >
+ <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">
<div class="text-right2" v-if="attr.Type=='寮曠敤瀵硅薄(鍗曚釜)'">
- <a @tap="classAttr_AddRef" :data-classid="attr.RelCls.split('|')[0]" :data-classname="attr.RelCls.split('|')[1]" ><i class="ace-icon fa fa-plus-circle"></i></a>
+ <a @tap="classAttr_AddRef" :data-classid="attr.RelCls.split('|')[0]"
+ :data-classname="attr.RelCls.split('|')[1]"><i
+ class="ace-icon fa fa-plus-circle"></i></a>
</div>
<div class="text-right2" v-if="attr.Type=='寮曠敤瀵硅薄(澶氫釜)'">
- <picker class="select" @change="classAttr_AddRef" :range="attr.RelClsList" range-key="name" :data-index="index" :data-iindex="iindex">
+ <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>
- <i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i>
</view>
</view>
- <view class="form-group" v-if="attr.Type=='寮曠敤浜哄憳'" :style="{'display':attr.hidden == 'True'?'none':''}">
+ <view class="form-group" v-if="attr.Type=='寮曠敤浜哄憳'"
+ :style="{'display':attr.hidden == true?'none':''}">
<view v-if="subclassattr.control_style=='涓婁笅甯冨眬'">
- <text class="tx_title">{{attr.DispName}}:<i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i></text>
+ <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>
+ <a class="class_attr_add_per" @tap="classAttr_AddPer(index,iindex)"><i
+ class="ace-icon fa fa-plus-circle"></i></a>
</div>
- <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true" >
+ <input type="text" :value="attr.Value" :style="{'width':attr.Width}"
+ disabled="true">
</view>
<view v-if="subclassattr.control_style=='宸﹀彸甯冨眬'">
- <p class="tx_title2" :style="{'width':subclassattr.title_p_wdith+'%'}">{{attr.DispName}}:</p>
- <input type="text" class="attr_field" :value="attr.Value" :style="{'width': attr.Width.split('%')[0] - subclassattr.title_p_wdith - (attr.notempty==true || attr.NotEmpty=='1'?10:5) - 9 +'%'}" disabled="true" >
+ <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">
<div class="text-right2">
- <a class="class_attr_add_per" @tap="classAttr_AddPer(index,iindex)"><i class="ace-icon fa fa-plus-circle"></i></a>
+ <a class="class_attr_add_per" @tap="classAttr_AddPer(index,iindex)"><i
+ class="ace-icon fa fa-plus-circle"></i></a>
</div>
- <i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i>
</view>
</view>
- <view class="form-group" v-if="attr.Type=='寮曠敤椤圭洰'" :style="{'display':attr.hidden == 'True'?'none':''}">
+ <view class="form-group" v-if="attr.Type=='寮曠敤椤圭洰'"
+ :style="{'display':attr.hidden == true?'none':''}">
<view v-if="subclassattr.control_style=='涓婁笅甯冨眬'">
- <text class="tx_title">{{attr.DispName}}:<i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i></text>
+ <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>
+ <a href="#" class="class_attr_add_prj" @tap="classAttr_AddPrj(index,iindex)"><i
+ class="ace-icon fa fa-plus-circle"></i></a>
</div>
- <input type="text" :value="attr.Value" :style="{'width':attr.Width}" disabled="true" >
+ <input type="text" :value="attr.Value" :style="{'width':attr.Width}"
+ disabled="true">
</view>
<view v-if="subclassattr.control_style=='宸﹀彸甯冨眬'">
- <p class="tx_title2" :style="{'width':subclassattr.title_p_wdith+'%'}">{{attr.DispName}}:</p>
- <input type="text" class="attr_field" :value="attr.Value" :style="{'width': attr.Width.split('%')[0] - subclassattr.title_p_wdith - (attr.notempty==true || attr.NotEmpty=='1'?10:5) - 9 +'%'}" disabled="true" >
+ <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">
<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>
+ <a class="class_attr_add_prj" @tap="classAttr_AddPrj(index,iindex)"><i
+ class="ace-icon fa fa-plus-circle"></i></a>
</div>
- <i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i>
</view>
</view>
- <view class="form-group" v-if="attr.Type=='缂栫爜'" :style="{'display':attr.hidden == 'True'?'none':''}">
+ <view class="form-group" v-if="attr.Type=='缂栫爜'"
+ :style="{'display':attr.hidden == true?'none':''}">
<view v-if="subclassattr.control_style=='涓婁笅甯冨眬'">
- <text class="tx_title">{{attr.DispName}}:<i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i></text>
- <input type="text" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" :disabled="attr.edit?false:true" >
+ <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">
</view>
<view v-if="subclassattr.control_style=='宸﹀彸甯冨眬'">
- <p class="tx_title2" :style="{'width':subclassattr.title_p_wdith+'%'}">{{attr.DispName}}:</p>
- <input type="text" class="attr_field" :data-index="index" :data-iindex="iindex" :style="{'width': attr.Width.split('%')[0] - subclassattr.title_p_wdith - (attr.notempty==true || attr.NotEmpty=='1'?10:5) +'%'}" :disabled="attr.edit?false:true" >
- <i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i>
+ <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">
</view>
</view>
- <view class="form-group" v-if="attr.Type=='鐪佸競鍖�" :style="{'display':attr.hidden == 'True'?'none':''}">
+ <view class="form-group" v-if="attr.Type=='鐪佸競鍖�"
+ :style="{'display':attr.hidden == true?'none':''}">
<view v-if="subclassattr.control_style=='涓婁笅甯冨眬'">
- <text class="tx_title">{{attr.DispName}}:<i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i></text>
- <pickerAddress class="date_iput" @change="addresschange" :data-index="index" :data-iindex="iindex" :style="{'width':attr.Width}" >{{attr.Value}}</pickerAddress>
+ <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="{'width':subclassattr.title_p_wdith+'%'}">{{attr.DispName}}:</p>
- <pickerAddress class="date_iput attr_field" @change="addresschange" :data-index="index" :data-iindex="iindex" :style="{'width': attr.Width.split('%')[0] - subclassattr.title_p_wdith - (attr.notempty==true || attr.NotEmpty=='1'?10:5) +'%'}">{{attr.Value}}</pickerAddress>
- <i class="i_tishi" v-if="attr.notempty==true || attr.NotEmpty=='1'">*</i>
+ <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="sava" class="btn_add">{{title}}</button>
+
+ <button type="default" @tap="cancel" class="btn_cancel" v-if="param.Sub_Cls.Can_Add_Delete == true">鍙栨秷</button>
+ <button type="default" @tap="sava" class="btn_add"
+ v-if="param.Sub_Cls.Can_Add_Delete == true">{{title}}</button>
+ <button type="default" @tap="sava" class="btn_sava"
+ v-else-if="param.Sub_Cls.Can_Add_Delete == false">{{title}}</button>
+
+ <button type="default" @tap="trigger" class="btn_trigger"
+ v-if="param.After_Trigger_Event">绾垎鎷�/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':'200px','height':check_list.height?check_list.height+'px':'88%'}">
+ <view class="popup-cont" :style="{'height':check_list.height?check_list.height-45+'px':'415px'}">
+ <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">纭畾</button>
+ <button type="default" @tap="popup_cancel" class="btn_popup_cancel">鍙栨秷</button>
+ </view>
+ </view>
+ </uni-popup>
+ </view>
</view>
-</template>
+</template>
<script>
import pickerAddress from '../../js/pickerAddress/pickerAddress.vue'
export default {
components: {
- pickerAddress
- },
+ pickerAddress
+ },
data() {
return {
title: '鏂板',
- param:{},
- classAttrList:[],
- classGridStyle:[],
- edit_inital_event:"", //寮圭獥鍒濆鍖栦簨浠禝D
- edit_ok_event:"", //寮圭獥鐐瑰嚮OK 瑙﹀彂浜嬩欢ID
- edit_select_compose_event:"", //閫夋嫨缁勬垚瀵硅薄鏃惰皟鐢�- edit_compose_cls_id:"",
- global_attr:[],
- refdatastore: [], //寮曠敤鏁版嵁瀛樺偍鍖�/ {attr:'G_PRJ_' + bindattr + '_ID', value:info.id}
- // inputValList:[{Name:"test"},{Name:"test2"},{Name:"test3"},{Name:"test4"},{Name:"test5"},{Name:"test6"},{Name:"test7"}],
- scanCodeVal:"",
- subClassAttrList:[],
- subPanelList:[],
- subClassGridStyle:[],
+ param: {},
+ classAttrList: [],
+ classGridStyle: [],
+ edit_inital_event: "", //寮圭獥鍒濆鍖栦簨浠禝D
+ 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}); //璁剧疆椤堕儴鏍囬
+ uni.setNavigationBarTitle({
+ title: options.titlename
+ }); //璁剧疆椤堕儴鏍囬
var param = JSON.parse(options.param);
- this.$data.title = param.Add_BtnName?param.Add_BtnName:options.titlename; //璁剧疆鎸夐挳鏂囧瓧
+ this.$data.title = param.Add_BtnName ? param.Add_BtnName : options.titlename; //璁剧疆鎸夐挳鏂囧瓧
console.log(param);
- if(!param.Master_Cls.View_Style){
- uni.showModal({title:"鎻愮ず",content:"璇ュ姛鑳界偣鏈厤缃晫闈㈢獥鍙o紝璇烽噸鏂伴厤缃紒",showCancel:false,confirmText:"鍙栨秷"});
+ if (!param.Master_Cls.View_Style) {
+ uni.showModal({
+ title: "鎻愮ず",
+ content: "璇ュ姛鑳界偣鏈厤缃晫闈㈢獥鍙o紝璇烽噸鏂伴厤缃紒",
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
return;
}
- if(!param.Master_Cls.View_Style.Name){
- uni.showModal({title:"鎻愮ず",content:"璇ュ姛鑳界偣鏈厤缃獥鍙f牱寮忥紝璇烽噸鏂伴厤缃紒",showCancel:false,confirmText:"鍙栨秷"});
+ if (!param.Master_Cls.View_Style.Name) {
+ uni.showModal({
+ title: "鎻愮ず",
+ content: "璇ュ姛鑳界偣鏈厤缃獥鍙f牱寮忥紝璇烽噸鏂伴厤缃紒",
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
return;
}
this.$data.param = param;
@@ -612,991 +1058,1961 @@
var $this = this;
$this.$store.state.thisareaFuncID = param.Master_Cls.ID;
// console.log($this.$store.getters.getclassAttrList);
- if($this.$store.getters.getclassAttrList){
- $this.$data.classAttrList = $this.$store.getters.getclassAttrList.data;
- $this.classGridStyleInfo(param.Master_Cls.ID,$this.$data.param.Master_Cls.View_Style.Name,'Mast');
- }else{
- $this.$store.dispatch('classAttrList',dataInfo).then(success=>{
+ if ($this.$store.getters.getclassAttrList) {
+ $this.$data.classAttrList = $this.$store.getters.getclassAttrList.data;
+ $this.classGridStyleInfo(param.Master_Cls.ID, $this.$data.param.Master_Cls.View_Style.Name, 'Mast');
+ } else {
+ $this.$store.dispatch('classAttrList', dataInfo).then(success => {
// console.log(success);
- if (success.code=='00000') {
+ if (success.code == '00000') {
$this.$data.classAttrList = success.data;
-
- $this.classGridStyleInfo(param.Master_Cls.ID,$this.$data.param.Master_Cls.View_Style.Name,'Mast');
- }else{
- uni.showModal({title:"閿欒1",content:success.msg,showCancel:false,confirmText:"鍙栨秷"});
+
+ $this.classGridStyleInfo(param.Master_Cls.ID, $this.$data.param.Master_Cls.View_Style.Name,
+ 'Mast');
+ } else {
+ uni.showModal({
+ title: "閿欒1",
+ content: success.msg,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
}
- }).catch(ex=>{
+ }).catch(ex => {
// console.log(ex);
- uni.showModal({title:"閿欒1.1",content:ex.errMsg,showCancel:false,confirmText:"鍙栨秷"});
+ uni.showModal({
+ title: "閿欒1.1",
+ content: ex.errMsg,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
});
}
-
+
//浠庢暟鎹被鑾峰彇
var subdataInfo = {
class_id: param.Sub_Cls.ID
};
$this.$store.state.thisareaFuncSubID = param.Sub_Cls.ID;
- if($this.$store.getters.getSubClassAttrList){
- $this.$data.subClassAttrList = $this.$store.getters.getSubClassAttrList.data;
- $this.classGridStyleInfo(param.Sub_Cls.ID,$this.$data.param.Sub_Cls.View_Style.Name,'Sub');
- }else{
- $this.$store.dispatch('subClassAttrList',subdataInfo).then(success=>{
+ if ($this.$store.getters.getSubClassAttrList) {
+ $this.$data.subClassAttrList = $this.$store.getters.getSubClassAttrList.data;
+ $this.classGridStyleInfo(param.Sub_Cls.ID, $this.$data.param.Sub_Cls.View_Style.Name, 'Sub');
+ } else {
+ $this.$store.dispatch('subClassAttrList', subdataInfo).then(success => {
// console.log(success);
- if (success.code=='00000') {
+ if (success.code == '00000') {
$this.$data.subClassAttrList = success.data;
-
- $this.classGridStyleInfo(param.Sub_Cls.ID,$this.$data.param.Sub_Cls.View_Style.Name,'Sub');
- }else{
- uni.showModal({title:"閿欒1_1",content:success.msg,showCancel:false,confirmText:"鍙栨秷"});
+
+ $this.classGridStyleInfo(param.Sub_Cls.ID, $this.$data.param.Sub_Cls.View_Style.Name,
+ 'Sub');
+ } else {
+ uni.showModal({
+ title: "閿欒1_1",
+ content: success.msg,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
}
- }).catch(ex=>{
+ }).catch(ex => {
// console.log(ex);
- uni.showModal({title:"閿欒1_1.1",content:ex.errMsg,showCancel:false,confirmText:"鍙栨秷"});
+ uni.showModal({
+ title: "閿欒1_1.1",
+ content: ex.errMsg,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
});
}
},
methods: {
- async classGridStyleInfo(clsid,styleName,clsType){
+ scan_classAttr_extButton(e) { //閫夋嫨鎸夐挳鍓�+ var $this = this;
+ var Before_Select_Event = $this.$data.param.Scan_Code.Before_Select_Event;
+ if (!Before_Select_Event) {
+ uni.showModal({
+ title: "鎻愮ず",
+ content: "閫夋嫨鍓嶄簨浠朵负绌猴紒",
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
+ return;
+ }
+ var mast_attr = [];
+ var attrlist = this.$data.classAttrList;
+ for (var i = 0; i < attrlist.length; i++) {
+ var attr = attrlist[i].Attr;
+ for (var j = 0; j < attr.length; j++) {
+ var ar = attr[j];
+ if (ar.Value == '璇烽�鎷�) {
+ uni.showModal({
+ title: "鎻愮ず",
+ content: ar.DispName + "鏈�鎷╂暟鎹紒",
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
+ return;
+ }
+ if (ar.Type == '寮曠敤瀵硅薄(澶氫釜)')
+ if (ar.Value == '璇�) ar.Value = '';
+ if (ar.Type == '寮曠敤浜哄憳' || ar.Type == '寮曠敤椤圭洰')
+ mast_attr.push({
+ attr: ar.Name,
+ value: ar.ValID ? ar.ValID : ''
+ });
+ else if (ar.Type == '甯冨皵鍊�)
+ mast_attr.push({
+ attr: ar.Name,
+ value: ar.Value ? '1' : '0'
+ });
+ else
+ mast_attr.push({
+ attr: ar.Name,
+ value: ar.Value ? ar.Value : ''
+ });
+ }
+ }
+
+ var objects = [];
+ var subPanelList = $this.$data.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 (ar.Type == '寮曠敤瀵硅薄(澶氫釜)')
+ if (ar.Value == '璇�) ar.Value = '';
+ if (ar.Type == '寮曠敤浜哄憳' || ar.Type == '寮曠敤椤圭洰')
+ sub_req.push({
+ attr: ar.Name,
+ value: ar.ValID ? ar.ValID : ''
+ });
+ else if (ar.Type == '甯冨皵鍊�)
+ sub_req.push({
+ attr: ar.Name,
+ value: ar.Value ? '1' : '0'
+ });
+ else 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({
+ 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: "鎻愮ず",
+ content: ar.DispName + '涓嶈兘涓虹┖锛�,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
+ return;
+ }
+ }
+ }
+ objects.push({
+ obj_id: subPanelList[s].scanCodeVal,
+ obj_attrs: sub_req
+ });
+ }
+ var enviroment = {
+ 'function': '3000', // 鍔熻兘鐐圭紪鍙�+ cls_id: 'MBOX', //this.$data.param.Sub_Cls.ID, // 鍔熻兘鐐逛粠鏁版嵁绫绘爣璇�+ 'button': 'top', // top/bottom
+ button_name: '鏂板',
+ edit_dlg: {
+ type: 'small', //灏忕獥鍙�+ class_id: 'MBOX', //this.$data.param.Sub_Cls.ID,//褰撳墠鏁版嵁绫籭d
+ },
+ master_cls: {
+ cls_name: 'MBOX', //$this.$data.param.Master_Cls.Name,
+ obj_attrs: req
+ },
+ sub_cls: {
+ cls_name: 'MBOX', //$this.$data.param.Sub_Cls.Name,
+ objects: objects
+ }
+
+ };
+ var req = [];
+ // var subPanelList = $this.$data.subPanelList;
+ // for (var s = 0; s < subPanelList.length; s++) {
+ // var json = {};
+ // 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];
+ // json[ar.Name] = ar.Value;
+ // }
+ // }
+ // req.push(json);
+ // }
+
+ var info = {
+ eventid: Before_Select_Event.ID,
+ edtype: "7", //"0",
+ projectid: '',
+ rclsid: '',
+ robjid: '',
+ userlogin: '',
+ clsid: 'MBOX', //this.$data.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.$data.check_list.items;
+ // this.$data.check_list.items=[];
+ if (this.$data.check_list.multiple_choice == "0") { //鍒ゆ柇鏃跺崟閫夎繕鏄閫�+ for (var i in data) {
+ data[i].check = false;
+ }
+ }
+ data[index].check = ischeck ? false : true;
+ this.$data.check_list.items = data;
+
+ },
+ popup_cancel(e) { //寮规鍙栨秷
+ this.$refs.popup.close();
+ },
+ popup_sava(e) { //寮规纭畾 閫夋嫨鎸夐挳鍚�+ var $this = this;
+ var After_Select_Event = $this.$data.param.Scan_Code.After_Select_Event;
+ if (!After_Select_Event) {
+ uni.showModal({title: "鎻愮ず",content: "閫夋嫨鍚庝簨浠朵负绌猴紒",showCancel: false,confirmText: "鍙栨秷"});
+ return;
+ }
+ var items = $this.$data.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: "鎻愮ず",content: "鏈�鎷╂暟鎹紒",showCancel: false,confirmText: "鍙栨秷"});
+ return;
+ }
+ var mast_attr = [];
+ var attrlist = this.$data.classAttrList;
+ for (var i = 0; i < attrlist.length; i++) {
+ var attr = attrlist[i].Attr;
+ for (var j = 0; j < attr.length; j++) {
+ var ar = attr[j];
+ if (ar.Value == '璇烽�鎷�) {
+ uni.showModal({title: "鎻愮ず",content: ar.DispName + "鏈�鎷╂暟鎹紒",showCancel: false,confirmText: "鍙栨秷"});
+ return;
+ }
+ if (ar.Type == '寮曠敤瀵硅薄(澶氫釜)')
+ if (ar.Value == '璇�) ar.Value = '';
+ if (ar.Type == '寮曠敤浜哄憳' || ar.Type == '寮曠敤椤圭洰')
+ mast_attr.push({attr: ar.Name,value: ar.ValID ? ar.ValID : ''});
+ else if (ar.Type == '甯冨皵鍊�)
+ mast_attr.push({attr: ar.Name,value: ar.Value ? '1' : '0'});
+ else
+ mast_attr.push({attr: ar.Name,value: ar.Value ? ar.Value : ''});
+ }
+ }
+
+ $this.$data.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
+ }
+ // console.log(info);
+ this.scan_DataObjRunCustomEvent(info, "");
+ this.$refs.popup.close();
+ },
+
+ cancel(e) {
+ uni.navigateBack({
+ delta: 1 //杩斿洖灞傛暟锛�鍒欎笂涓婇〉
+ });
+ },
+ panel_del(index) {
+ var $this = this;
+ if (this.$data.subPanelList[index].scanCodeVal == this.$data.scanCodeVal) {
+ this.$data.scanCodeVal = '';
+ }
+ if (!this.$data.subPanelList[index].ObjID)
+ this.$data.subPanelList.splice(index, 1);
+ else {
+ var dataInfo = {
+ clsId: this.$data.param.Sub_Cls.ID,
+ objId: this.$data.subPanelList[index].ObjID
+ };
+ console.log(dataInfo);
+ // return;
+ uni.showLoading({
+ title: "鍔犺浇涓�.."
+ });
+ this.$store.dispatch('DelObj', dataInfo).then(success => {
+ console.log(success);
+ uni.hideLoading();
+ if (success.code == '00000') {
+ $this.$data.subPanelList.splice(index, 1);
+ uni.showModal({
+ title: "鎻愮ず",
+ content: "鍒犻櫎鎴愬姛锛�,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
+ } else {
+ uni.showModal({
+ title: "閿欒9",
+ content: success.msg,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
+ }
+ }).catch(ex => {
+ console.log(ex);
+ uni.hideLoading();
+ uni.showModal({
+ title: "鎻愮ず9.1",
+ content: ex.errMsg,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
+ });
+ }
+ },
+ async classGridStyleInfo(clsid, styleName, clsType) {
var $this = this;
var gridstyleInfo = {
class_id: clsid,
name: styleName,
type: '2'
};
- $this.$store.state.thisEditName = styleName;
// console.log($this.$store.getters.getclassGridStyleInfo);
//鑾峰彇涓绘暟鎹被鐣岄潰鏍峰紡
- if(clsType=='Mast'){
- if($this.$store.getters.getclassGridStyleInfo){
+ if (clsType == 'Mast') {
+ $this.$store.state.thisEditName = styleName;
+ if ($this.$store.getters.getclassGridStyleInfo) {
$this.$data.classGridStyle = $this.$store.getters.getclassGridStyleInfo.data;
$this.class_attr_init();
- }else{
+ } else {
//console.log(gridstyleInfo);
- $this.$store.dispatch('classGridStyleInfo',gridstyleInfo).then(success=>{
+ $this.$store.dispatch('classGridStyleInfo', gridstyleInfo).then(success => {
// console.log(success);
- if (success.code=='00000') {
+ if (success.code == '00000') {
success.data.StyleDef = JSON.parse(success.data.StyleDef);
$this.$data.classGridStyle = success.data;
-
+
$this.class_attr_init();
- }else{
- uni.showModal({title:"閿欒1.2",content:success.msg,showCancel:false,confirmText:"鍙栨秷"});
+ } else {
+ uni.showModal({
+ title: "閿欒1.2",
+ content: success.msg,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
}
- }).catch(ex=>{
+ }).catch(ex => {
console.log(ex);
- uni.showModal({title:"閿欒1.3",content:ex.errMsg,showCancel:false,confirmText:"鍙栨秷"});
+ uni.showModal({
+ title: "閿欒1.3",
+ content: ex.errMsg,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
});
}
- } else if(clsType=='Sub'){ //鑾峰彇浠庢暟鎹被鐣岄潰鏍峰紡
- if($this.$store.getters.getSubClassGridStyleInfo){
+ } else if (clsType == 'Sub') { //鑾峰彇浠庢暟鎹被鐣岄潰鏍峰紡
+ $this.$store.state.thisEditSubName = styleName;
+ if ($this.$store.getters.getSubClassGridStyleInfo) {
$this.$data.subClassGridStyle = $this.$store.getters.getSubClassGridStyleInfo.data;
$this.subClass_attr_init();
- }else{
+ } else {
//console.log(gridstyleInfo);
- $this.$store.dispatch('subClassGridStyleInfo',gridstyleInfo).then(success=>{
+ $this.$store.dispatch('subClassGridStyleInfo', gridstyleInfo).then(success => {
// console.log(success);
- if (success.code=='00000') {
+ if (success.code == '00000') {
success.data.StyleDef = JSON.parse(success.data.StyleDef);
$this.$data.subClassGridStyle = success.data;
-
+
$this.subClass_attr_init();
- }else{
- uni.showModal({title:"閿欒1.2",content:success.msg,showCancel:false,confirmText:"鍙栨秷"});
+ } else {
+ uni.showModal({
+ title: "閿欒1.2",
+ content: success.msg,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
}
- }).catch(ex=>{
+ }).catch(ex => {
console.log(ex);
- uni.showModal({title:"閿欒1.3",content:ex.errMsg,showCancel:false,confirmText:"鍙栨秷"});
+ uni.showModal({
+ title: "閿欒1.3",
+ content: ex.errMsg,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
});
}
}
},
- ontap(e){ //鎵爜鍔熻兘
+ ontap(e) { //鎵爜鍔熻兘
//console.log(e.target)
- getApp().onScan((result)=>{
+ getApp().onScan((result) => {
//console.log(result.decodedata);
- this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=result.decodedata;
- })
- },
- scan_ontap(e){ //鎵爜鍖烘壂鐮佸姛鑳�- //console.log(e.target)
- getApp().onScan((result)=>{
- console.log(result.decodedata);
- if (result.decodedata != this.$data.scanCodeVal) {
- this.$data.scanCodeVal=result.decodedata;
- this.$data.subPanelList.push({
- scanCodeVal:this.$data.scanCodeVal,
- subClassAttrList:this.$data.subClassAttrList
- });
+ var isVal = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value;
+ // if(!isVal){
+ // this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=result.decodedata;
+ // var isVald =this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value;
+ // return;
+ // }
+ //涓绘暟鎹被鎵爜鏌ヨ鏁版嵁
+ if (isVal != result.decodedata) {
+ this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = result.decodedata;
+ uni.hideKeyboard();
+ //瀛愭暟鎹被鎵爜鍖轰簨浠惰剼鏈� var eventid = this.$data.param.Scan_Code.Input_Change_Event.ID;
if (eventid) {
- var req=[];
- var attrlist = this.$data.subClassAttrList;
- for (var i = 0; i < attrlist.length; i++) {
- var attr = attrlist[i].Attr;
- for (var j = 0; j < attr.length; j++) {
- var ar = attr[j];
- if(ar.Type=='寮曠敤瀵硅薄(澶氫釜)')
- if(ar.Value=='璇�) ar.Value='';
- if(ar.Type=='寮曠敤浜哄憳' || ar.Type=='寮曠敤椤圭洰')
- req.push({ attr: ar.Name, val: ar.ValID ?ar.ValID :'' });
- else if(ar.Type=='甯冨皵鍊�)
- req.push({ attr: ar.Name, val: ar.Value?'1':'0'});
- else
- req.push({ attr: ar.Name, val: ar.Value ?ar.Value :''});
- }
- }
- var info = {
- eventid: eventid,
- edtype: "0",
- projectid: '',
- rclsid: '',
- robjid: '',
- userlogin: '',
- clsid: this.$data.param.Sub_Cls.ID,
- objid: "",
- attr: req,
- inputParamter:[{ attr: 'inout_3037', val: this.$data.scanCodeVal }]
- }
-
- this.scan_DataObjRunCustomEvent(info, "");
- }
+ var req = [];
+ var attrlist = this.$data.classAttrList; //涓绘暟鎹被灞炴�
+ for (var i = 0; i < attrlist.length; i++) {
+ var attr = attrlist[i].Attr;
+ for (var j = 0; j < attr.length; j++) {
+ var ar = attr[j];
+ if (ar.Type == '寮曠敤瀵硅薄(澶氫釜)')
+ if (ar.Value == '璇�) ar.Value = '';
+ if (ar.Type == '寮曠敤浜哄憳' || ar.Type == '寮曠敤椤圭洰')
+ req.push({
+ attr: ar.Name,
+ value: ar.ValID ? ar.ValID : ''
+ });
+ else if (ar.Type == '甯冨皵鍊�)
+ req.push({
+ attr: ar.Name,
+ value: ar.Value ? '1' : '0'
+ });
+ else
+ req.push({
+ attr: ar.Name,
+ value: ar.Value ? ar.Value : ''
+ });
+ }
+ }
+ var info = {
+ eventid: eventid,
+ edtype: "7", //"0",
+ projectid: '',
+ rclsid: '',
+ robjid: '',
+ userlogin: '',
+ clsid: 'MBOX', //this.$data.param.Sub_Cls.ID,
+ objid: "",
+ attr: req,
+ mast_attr: req,
+ inputParamter: [{
+ attr: 'mast_input_3037',
+ value: result.decodedata
+ }]
+ }
+
+ this.scan_DataObjRunCustomEvent(info, "");
+ }
}
})
},
- onarrow(index,open){
+ subontap(e) { //鎵爜鍔熻兘
+ //console.log(e.target)
+ getApp().onScan((result) => {
+ //console.log(result.decodedata);
+ var isVal = this.$data.subClassAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value;
+ //涓绘暟鎹被鎵爜鏌ヨ鏁版嵁
+ if (isVal != result.decodedata) {
+ this.$data.subClassAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = result.decodedata;
+ uni.hideKeyboard();
+ //瀛愭暟鎹被鎵爜鍖轰簨浠惰剼鏈�+ var eventid = this.$data.param.Scan_Code.Input_Change_Event.ID;
+ if (eventid) {
+ var req = [];
+ var attrlist = this.$data.subClassAttrList; //涓绘暟鎹被灞炴�
+ for (var i = 0; i < attrlist.length; i++) {
+ var attr = attrlist[i].Attr;
+ for (var j = 0; j < attr.length; j++) {
+ var ar = attr[j];
+ if (ar.Type == '寮曠敤瀵硅薄(澶氫釜)')
+ if (ar.Value == '璇�) ar.Value = '';
+ if (ar.Type == '寮曠敤浜哄憳' || ar.Type == '寮曠敤椤圭洰')
+ req.push({
+ attr: ar.Name,
+ value: ar.ValID ? ar.ValID : ''
+ });
+ else if (ar.Type == '甯冨皵鍊�)
+ req.push({
+ attr: ar.Name,
+ value: ar.Value ? '1' : '0'
+ });
+ else
+ req.push({
+ attr: ar.Name,
+ value: ar.Value ? ar.Value : ''
+ });
+ }
+ }
+ var info = {
+ eventid: eventid,
+ edtype: "7", //"0",
+ projectid: '',
+ rclsid: '',
+ robjid: '',
+ userlogin: '',
+ clsid: 'MBOX', //this.$data.param.Sub_Cls.ID,
+ objid: "",
+ attr: req,
+ mast_attr: [],
+ inputParamter: [{
+ attr: 'mast_input_3037',
+ value: result.decodedata
+ }]
+ }
+
+ this.scan_DataObjRunCustomEvent(info, "");
+ }
+ }
+ })
+ },
+ scan_ontap(e) { //鎵爜鍖烘壂鐮佸姛鑳�+ //console.log(e.target)
+ getApp().onScan((result) => {
+ console.log(result.decodedata);
+ var isflag = true;
+ for (var i in this.$data.subPanelList) {
+ if (this.$data.subPanelList[i].scanCodeVal == result.decodedata)
+ isflag = false;
+ }
+ //瀛愭暟鎹被鎵爜鏌ヨ鏁版嵁
+ if (isflag) {
+ uni.hideKeyboard();
+ this.$data.scanCodeVal = result.decodedata;
+ var eventid = this.$data.param.Scan_Code.Input_Change_Event.ID;
+ if (eventid) {
+ var mast_req = [];
+ //涓绘暟鎹被灞炴�
+ var classattrlist = this.$data.classAttrList;
+ for (var i = 0; i < classattrlist.length; i++) {
+ var attr = classattrlist[i].Attr;
+ for (var j = 0; j < attr.length; j++) {
+ var ar = attr[j];
+ if (ar.Type == '寮曠敤瀵硅薄(澶氫釜)')
+ if (ar.Value == '璇�) ar.Value = '';
+ if (ar.Type == '寮曠敤浜哄憳' || ar.Type == '寮曠敤椤圭洰')
+ mast_req.push({
+ attr: ar.Name,
+ value: ar.ValID ? ar.ValID : ''
+ });
+ else if (ar.Type == '甯冨皵鍊�)
+ mast_req.push({
+ attr: ar.Name,
+ value: ar.Value ? '1' : '0'
+ });
+ else
+ mast_req.push({
+ attr: ar.Name,
+ value: ar.Value ? ar.Value : ''
+ });
+ }
+ }
+ var req = [];
+ //瀛愭暟鎹被灞炴�
+ var attrlist = this.$data.subClassAttrList;
+ for (var i = 0; i < attrlist.length; i++) {
+ var attr = attrlist[i].Attr;
+ for (var j = 0; j < attr.length; j++) {
+ var ar = attr[j];
+ if (ar.Type == '寮曠敤瀵硅薄(澶氫釜)')
+ if (ar.Value == '璇�) ar.Value = '';
+ if (ar.Type == '寮曠敤浜哄憳' || ar.Type == '寮曠敤椤圭洰')
+ req.push({
+ attr: ar.Name,
+ value: ar.ValID ? ar.ValID : ''
+ });
+ else if (ar.Type == '甯冨皵鍊�)
+ req.push({
+ attr: ar.Name,
+ value: ar.Value ? '1' : '0'
+ });
+ else
+ req.push({
+ attr: ar.Name,
+ value: ar.Value ? ar.Value : ''
+ });
+ }
+ }
+ var info = {
+ eventid: eventid,
+ edtype: '7', //"0",
+ projectid: '',
+ rclsid: '',
+ robjid: '',
+ userlogin: '',
+ clsid: 'MBOX', //this.$data.param.Sub_Cls.ID,
+ objid: "",
+ attr: req,
+ mast_attr: mast_req,
+ inputParamter: [{
+ attr: 'input_3037',
+ value: this.$data.scanCodeVal
+ }]
+ }
+
+ this.scan_DataObjRunCustomEvent(info, "");
+ }
+ }
+ })
+ },
+ scan_onevent(e) {
+ // console.log(e.target);
+ if (e.target.value) {
+ var isflag = true;
+ for (var i in this.$data.subPanelList) {
+ if (this.$data.subPanelList[i].scanCodeVal == e.target.value)
+ isflag = false;
+ }
+ //瀛愭暟鎹被鎵爜鏌ヨ鏁版嵁
+ if (isflag) {
+ uni.hideKeyboard();
+ this.$data.scanCodeVal = e.target.value;
+ var eventid = this.$data.param.Scan_Code.Input_Change_Event.ID;
+ if (eventid) {
+ var mast_req = [];
+ //涓绘暟鎹被灞炴�
+ var classattrlist = this.$data.classAttrList;
+ for (var i = 0; i < classattrlist.length; i++) {
+ var attr = classattrlist[i].Attr;
+ for (var j = 0; j < attr.length; j++) {
+ var ar = attr[j];
+ if (ar.Type == '寮曠敤瀵硅薄(澶氫釜)')
+ if (ar.Value == '璇�) ar.Value = '';
+ if (ar.Type == '寮曠敤浜哄憳' || ar.Type == '寮曠敤椤圭洰')
+ mast_req.push({
+ attr: ar.Name,
+ value: ar.ValID ? ar.ValID : ''
+ });
+ else if (ar.Type == '甯冨皵鍊�)
+ mast_req.push({
+ attr: ar.Name,
+ value: ar.Value ? '1' : '0'
+ });
+ else
+ mast_req.push({
+ attr: ar.Name,
+ value: ar.Value ? ar.Value : ''
+ });
+ }
+ }
+ var req = [];
+ //瀛愭暟鎹被灞炴�
+ var attrlist = this.$data.subClassAttrList;
+ for (var i = 0; i < attrlist.length; i++) {
+ var attr = attrlist[i].Attr;
+ for (var j = 0; j < attr.length; j++) {
+ var ar = attr[j];
+ if (ar.Type == '寮曠敤瀵硅薄(澶氫釜)')
+ if (ar.Value == '璇�) ar.Value = '';
+ if (ar.Type == '寮曠敤浜哄憳' || ar.Type == '寮曠敤椤圭洰')
+ req.push({
+ attr: ar.Name,
+ value: ar.ValID ? ar.ValID : ''
+ });
+ else if (ar.Type == '甯冨皵鍊�)
+ req.push({
+ attr: ar.Name,
+ value: ar.Value ? '1' : '0'
+ });
+ else
+ req.push({
+ attr: ar.Name,
+ value: ar.Value ? ar.Value : ''
+ });
+ }
+ }
+ var info = {
+ eventid: eventid,
+ edtype: '7', //"0",
+ projectid: '',
+ rclsid: '',
+ robjid: '',
+ userlogin: '',
+ clsid: 'MBOX', //this.$data.param.Sub_Cls.ID,
+ objid: "",
+ attr: req,
+ mast_attr: mast_req,
+ inputParamter: [{
+ attr: 'input_3037',
+ value: this.$data.scanCodeVal
+ }]
+ }
+
+ this.scan_DataObjRunCustomEvent(info, "");
+ }
+ }
+ }
+ },
+ onarrow(index, open) {
// console.log(index+'--'+open);
- this.$data.classAttrList[index].Open=open==true?false:true;
+ var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Open;
+ if (!data_attr) {
+ this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e
+ .target.dataset['iindex']].Value = open == true ? false : true;
+ return;
+ }
+ this.$data.classAttrList[e.target.dataset['iiindex']].subClassAttr[index].Open = open == true ? false :
+ true;
},
ondateTime(e) {
//console.log(e.target)
- this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=e.target.value;
+ var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value;
+ if (!data_attr) {
+ this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e
+ .target.dataset['iindex']].Value = e.target.value;
+ return;
+ }
+ this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = e.target
+ .value;
+
},
onchange(e) {
console.log(e.target);
- var value=this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].dictitem[e.target.value];
+ var value = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].dictitem[e
+ .target.value];
var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']];
console.log(data_attr);
if (value.Name != data_attr.Value) {
- this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=value.Name;
- console.log(this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value);
- var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].action;
+ this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = value
+ .Name;
+ console.log(this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']]
+ .Value);
+ var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']]
+ .action;
if (eventid) {
- // self.event_no_sub = 1;
- var req=[];
- var attrlist = this.$data.classAttrList;
- for (var i = 0; i < attrlist.length; i++) {
- var attr = attrlist[i].Attr;
- for (var j = 0; j < attr.length; j++) {
- var ar = attr[j];
- if(ar.Type=='寮曠敤瀵硅薄(澶氫釜)')
- if(ar.Value=='璇�) ar.Value='';
- if(ar.Type=='寮曠敤浜哄憳' || ar.Type=='寮曠敤椤圭洰')
- req.push({ attr: ar.Name, val: ar.ValID ?ar.ValID :'' });
- else if(ar.Type=='甯冨皵鍊�)
- req.push({ attr: ar.Name, val: ar.Value?'1':'0'});
- else
- req.push({ attr: ar.Name, val: ar.Value ?ar.Value :''});
- }
- }
- var info = {
- eventid: eventid,
- edtype: "0",
- projectid: '',
- rclsid: '',
- robjid: '',
- userlogin: '',
- clsid: this.$data.param.Master_Cls.ID,
- objid: "",
- attr: req,
- }
- this.DataObjRunCustomEvent(info);
- }
+ // self.event_no_sub = 1;
+ var req = [];
+ var attrlist = this.$data.classAttrList;
+ for (var i = 0; i < attrlist.length; i++) {
+ var attr = attrlist[i].Attr;
+ for (var j = 0; j < attr.length; j++) {
+ var ar = attr[j];
+ if (ar.Type == '寮曠敤瀵硅薄(澶氫釜)')
+ if (ar.Value == '璇�) ar.Value = '';
+ if (ar.Type == '寮曠敤浜哄憳' || ar.Type == '寮曠敤椤圭洰')
+ req.push({
+ attr: ar.Name,
+ val: ar.ValID ? ar.ValID : ''
+ });
+ else if (ar.Type == '甯冨皵鍊�)
+ req.push({
+ attr: ar.Name,
+ val: ar.Value ? '1' : '0'
+ });
+ else
+ req.push({
+ attr: ar.Name,
+ val: ar.Value ? ar.Value : ''
+ });
+ }
+ }
+ var info = {
+ eventid: eventid,
+ edtype: "0",
+ projectid: '',
+ rclsid: '',
+ robjid: '',
+ userlogin: '',
+ clsid: this.$data.param.Master_Cls.ID,
+ objid: "",
+ attr: req,
+ }
+ this.DataObjRunCustomEvent(info);
+ }
}
-
+
},
- onchange2(item,value,delvalue) {
+ 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.$data.classAttrList){
- for(var j in this.$data.classAttrList[i].Attr){
- for(var d in this.$data.classAttrList[i].Attr[j].dictitem){
- if(delvalue[0].Name == this.$data.classAttrList[i].Attr[j].dictitem[d].Name){
- this.$data.classAttrList[i].Attr[j].Value="";
- }
+ if (item.length == 0) { //涓虹┖鏃讹紝娓呯┖灞炴�value
+ var index, iindex, dindex = 0;
+ for (var i in this.$data.classAttrList) {
+ for (var j in this.$data.classAttrList[i].Attr) {
+ if (delvalue[0].attr == this.$data.classAttrList[i].Attr[j].Name) {
+ this.$data.classAttrList[i].Attr[j].Value = "";
}
}
}
}
-
- for(var v in item){
- var index ,iindex,dindex=0;
- for(var i in this.$data.classAttrList){
- for(var j in this.$data.classAttrList[i].Attr){
- for(var d in this.$data.classAttrList[i].Attr[j].dictitem){
- if(item[v].Name == this.$data.classAttrList[i].Attr[j].dictitem[d].Name){
- index=i;iindex=j;dindex=d;
- }
+
+ for (var v in item) {
+ var index, iindex, dindex = 0;
+ for (var i in this.$data.classAttrList) {
+ for (var j in this.$data.classAttrList[i].Attr) {
+ if (item[v].attr == this.$data.classAttrList[i].Attr[j].Name) {
+ index = i;
+ iindex = j;
}
}
}
var itemvalue = item[v];
var data_attr = this.$data.classAttrList[index].Attr[iindex];
-
+
console.log(data_attr);
if (itemvalue.Name != data_attr.Value) {
- this.$data.classAttrList[index].Attr[iindex].Value=value;
+ this.$data.classAttrList[index].Attr[iindex].Value = value;
console.log(this.$data.classAttrList[index].Attr[iindex].Value);
var eventid = this.$data.classAttrList[index].Attr[iindex].action;
if (eventid) {
- // self.event_no_sub = 1;
- var req=[];
- var attrlist = this.$data.classAttrList;
- for (var i = 0; i < attrlist.length; i++) {
- var attr = attrlist[i].Attr;
- for (var j = 0; j < attr.length; j++) {
- var ar = attr[j];
- if(ar.Type=='寮曠敤瀵硅薄(澶氫釜)')
- if(ar.Value=='璇�) ar.Value='';
- if(ar.Type=='寮曠敤浜哄憳' || ar.Type=='寮曠敤椤圭洰')
- req.push({ attr: ar.Name, val: ar.ValID ?ar.ValID :'' });
- else if(ar.Type=='甯冨皵鍊�)
- req.push({ attr: ar.Name, val: ar.Value?'1':'0'});
- else if(ar.Type=='瀛楀吀' || ar.Type=='瀛楀吀-瀛楃涓�)
- req.push({ attr: ar.Name, val: itemvalue.Name});
- else
- req.push({ attr: ar.Name, val: ar.Value ?ar.Value :''});
- }
- }
- var info = {
- eventid: eventid,
- edtype: "0",
- projectid: '',
- rclsid: '',
- robjid: '',
- userlogin: '',
- clsid: this.$data.param.Master_Cls.ID,
- objid: "",
- attr: req,
- }
- this.DataObjRunCustomEvent(info);
- }
+ // self.event_no_sub = 1;
+ var req = [];
+ var attrlist = this.$data.classAttrList;
+ for (var i = 0; i < attrlist.length; i++) {
+ var attr = attrlist[i].Attr;
+ for (var j = 0; j < attr.length; j++) {
+ var ar = attr[j];
+ if (ar.Type == '寮曠敤瀵硅薄(澶氫釜)')
+ if (ar.Value == '璇�) ar.Value = '';
+ if (ar.Type == '寮曠敤浜哄憳' || ar.Type == '寮曠敤椤圭洰')
+ req.push({
+ attr: ar.Name,
+ val: ar.ValID ? ar.ValID : ''
+ });
+ else if (ar.Type == '甯冨皵鍊�)
+ req.push({
+ attr: ar.Name,
+ val: ar.Value ? '1' : '0'
+ });
+ else if (ar.Type == '瀛楀吀' || ar.Type == '瀛楀吀-瀛楃涓� || ar.Type == '瀛楀吀-鏁存暟')
+ req.push({
+ attr: ar.Name,
+ val: itemvalue.Name
+ });
+ else
+ req.push({
+ attr: ar.Name,
+ val: ar.Value ? ar.Value : ''
+ });
+ }
+ }
+ var info = {
+ eventid: eventid,
+ edtype: "0",
+ projectid: '',
+ rclsid: '',
+ robjid: '',
+ userlogin: '',
+ clsid: this.$data.param.Master_Cls.ID,
+ objid: "",
+ attr: req,
+ }
+ this.DataObjRunCustomEvent(info);
+ }
}
}
-
-
+
+
},
- onevent(e){
+ sub_onchange(e) {
+ console.log(e.target);
+ var value = this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']]
+ .Attr[e.target.dataset['iindex']].dictitem[e.target.value];
+ var data_attr = this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset[
+ 'index']].Attr[e.target.dataset['iindex']];
+ console.log(data_attr);
+ if (value.Name != data_attr.Value) {
+ this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e
+ .target.dataset['iindex']].Value = value.Name;
+ console.log(this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset[
+ 'index']].Attr[e.target.dataset['iindex']].Value);
+ var eventid = this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset[
+ 'index']].Attr[e.target.dataset['iindex']].action;
+ if (eventid) {
+ // self.event_no_sub = 1;
+ var req = [];
+ var attrlist = this.$data.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];
+ if (ar.Type == '寮曠敤瀵硅薄(澶氫釜)')
+ if (ar.Value == '璇�) ar.Value = '';
+ if (ar.Type == '寮曠敤浜哄憳' || ar.Type == '寮曠敤椤圭洰')
+ req.push({
+ attr: ar.Name,
+ val: ar.ValID ? ar.ValID : ''
+ });
+ else if (ar.Type == '甯冨皵鍊�)
+ req.push({
+ attr: ar.Name,
+ val: ar.Value ? '1' : '0'
+ });
+ else
+ req.push({
+ attr: ar.Name,
+ val: ar.Value ? ar.Value : ''
+ });
+ }
+ }
+ var info = {
+ eventid: eventid,
+ edtype: "0",
+ projectid: '',
+ rclsid: '',
+ robjid: '',
+ userlogin: '',
+ clsid: this.$data.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.$data.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 (ar.Type == '寮曠敤瀵硅薄(澶氫釜)')
+ if (ar.Value == '璇�) ar.Value = '';
+ if (ar.Type == '寮曠敤浜哄憳' || ar.Type == '寮曠敤椤圭洰')
+ req.push({
+ attr: ar.Name,
+ val: ar.ValID ? ar.ValID : ''
+ });
+ else if (ar.Type == '甯冨皵鍊�)
+ req.push({
+ attr: ar.Name,
+ val: ar.Value ? '1' : '0'
+ });
+ else if (ar.Type == '瀛楀吀' || ar.Type == '瀛楀吀-瀛楃涓� || ar.Type == '瀛楀吀-鏁存暟')
+ req.push({
+ attr: ar.Name,
+ val: itemvalue.Name
+ });
+ else
+ req.push({
+ attr: ar.Name,
+ val: ar.Value ? ar.Value : ''
+ });
+ }
+ }
+ var info = {
+ eventid: eventid,
+ edtype: "0",
+ projectid: '',
+ rclsid: '',
+ robjid: '',
+ userlogin: '',
+ clsid: this.$data.param.Sub_Cls.ID,
+ objid: "",
+ attr: req,
+ }
+ this.DataObjRunCustomEvent(info);
+ }
+ }
+ }
+
+
+ },
+ onevent(e) {
// console.log(e.target);
var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']];
+ if (!data_attr) {
+ this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e
+ .target.dataset['iindex']].Value = e.target.value;
+ return;
+ }
// console.log(data_attr);
if (e.target.value != data_attr.Value) {
- this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=e.target.value;
- var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].action;
+ this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = e.target
+ .value;
+ // var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].action;
+ //瀛愭暟鎹被鎵爜鍖轰簨浠惰剼鏈�+ var eventid = this.$data.param.Scan_Code.Input_Change_Event.ID;
if (eventid) {
- // self.event_no_sub = 1;
- var req=[];
- var attrlist = this.$data.classAttrList;
- for (var i = 0; i < attrlist.length; i++) {
- var attr = attrlist[i].Attr;
- for (var j = 0; j < attr.length; j++) {
- var ar = attr[j];
- if(ar.Type=='寮曠敤瀵硅薄(澶氫釜)')
- if(ar.Value=='璇�) ar.Value='';
- if(ar.Type=='寮曠敤浜哄憳' || ar.Type=='寮曠敤椤圭洰')
- req.push({ attr: ar.Name, val: ar.ValID ?ar.ValID :'' });
- else if(ar.Type=='甯冨皵鍊�)
- req.push({ attr: ar.Name, val: ar.Value?'1':'0'});
- else
- req.push({ attr: ar.Name, val: ar.Value ?ar.Value :''});
- }
- }
- var info = {
- eventid: eventid,
- edtype: "0",
- projectid: '',
- rclsid: '',
- robjid: '',
- userlogin: '',
- clsid: this.$data.param.Master_Cls.ID,
- objid: "",
- attr: req,
- }
- this.DataObjRunCustomEvent(info, data_attr);
- }
+ // self.event_no_sub = 1;
+ var req = [];
+ var attrlist = this.$data.classAttrList; //涓绘暟鎹被灞炴�
+ for (var i = 0; i < attrlist.length; i++) {
+ var attr = attrlist[i].Attr;
+ for (var j = 0; j < attr.length; j++) {
+ var ar = attr[j];
+ if (ar.Type == '寮曠敤瀵硅薄(澶氫釜)')
+ if (ar.Value == '璇�) ar.Value = '';
+ if (ar.Type == '寮曠敤浜哄憳' || ar.Type == '寮曠敤椤圭洰')
+ req.push({
+ attr: ar.Name,
+ value: ar.ValID ? ar.ValID : ''
+ });
+ else if (ar.Type == '甯冨皵鍊�)
+ req.push({
+ attr: ar.Name,
+ value: ar.Value ? '1' : '0'
+ });
+ else
+ req.push({
+ attr: ar.Name,
+ value: ar.Value ? ar.Value : ''
+ });
+ }
+ }
+ var info = {
+ eventid: eventid,
+ edtype: "7", //"0",
+ projectid: '',
+ rclsid: '',
+ robjid: '',
+ userlogin: '',
+ clsid: 'MBOX', //this.$data.param.Sub_Cls.ID,
+ objid: "",
+ attr: req,
+ mast_attr: req,
+ 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 ischecked = e.target.dataset.ischeck ? false : true;
var data_attr = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']];
+ if (!data_attr) {
+ this.$data.subPanelList[e.target.dataset['iiindex']].subClassAttr[e.target.dataset['index']].Attr[e
+ .target.dataset['iindex']].Value = ischecked;
+ return;
+ }
// console.log(data_attr);
if (ischecked != data_attr.Value) {
- this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=ischecked;
- var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].action;
+ this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = ischecked;
+ var eventid = this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']]
+ .action;
if (eventid) {
- // self.event_no_sub = 1;
- var req=[];
- var attrlist = this.$data.classAttrList;
- for (var i = 0; i < attrlist.length; i++) {
- var attr = attrlist[i].Attr;
- for (var j = 0; j < attr.length; j++) {
- var ar = attr[j];
- if(ar.Type=='寮曠敤瀵硅薄(澶氫釜)')
- if(ar.Value=='璇�) ar.Value='';
- if(ar.Type=='寮曠敤浜哄憳' || ar.Type=='寮曠敤椤圭洰')
- req.push({ attr: ar.Name, val: ar.ValID ?ar.ValID :'' });
- else if(ar.Type=='甯冨皵鍊�)
- req.push({ attr: ar.Name, val: ar.Value?'1':'0'});
+ // self.event_no_sub = 1;
+ var req = [];
+ var attrlist = this.$data.classAttrList;
+ for (var i = 0; i < attrlist.length; i++) {
+ var attr = attrlist[i].Attr;
+ for (var j = 0; j < attr.length; j++) {
+ var ar = attr[j];
+ if (ar.Type == '寮曠敤瀵硅薄(澶氫釜)')
+ if (ar.Value == '璇�) ar.Value = '';
+ if (ar.Type == '寮曠敤浜哄憳' || ar.Type == '寮曠敤椤圭洰')
+ req.push({
+ attr: ar.Name,
+ val: ar.ValID ? ar.ValID : ''
+ });
+ else if (ar.Type == '甯冨皵鍊�)
+ req.push({
+ attr: ar.Name,
+ val: ar.Value ? '1' : '0'
+ });
else
- req.push({ attr: ar.Name, val: ar.Value ?ar.Value :''});
-
- }
- }
- var info = {
- eventid: eventid,
- edtype: "0",
- projectid: '',
- rclsid: '',
- robjid: '',
- userlogin: '',
- clsid: this.$data.param.Master_Cls.ID,
- objid: "",
- attr: req,
- }
- this.DataObjRunCustomEvent(info);
- }
+ req.push({
+ attr: ar.Name,
+ val: ar.Value ? ar.Value : ''
+ });
+
+ }
+ }
+ var info = {
+ eventid: eventid,
+ edtype: "0",
+ projectid: '',
+ rclsid: '',
+ robjid: '',
+ userlogin: '',
+ clsid: this.$data.param.Master_Cls.ID,
+ objid: "",
+ attr: req,
+ }
+ this.DataObjRunCustomEvent(info);
+ }
}
-
+
},
- inputValListIsDel(index){
+ inputValListIsDel(index) {
// console.log(index);
- this.$data.inputValList.splice(index, 1); //鍒犻櫎tabPagejson鐨勫唴瀹�+ this.$data.inputValList.splice(index, 1); //鍒犻櫎tabPagejson鐨勫唴瀹� // console.log(this.$data.inputValList);
},
addresschange(e) {
- // console.log(e.target);
- console.log(e.data.join(';'))
- this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=e.data.join(';');
+ // console.log(e.target);
+ console.log(e.data.join(';'))
+ this.$data.subClassAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value = e.data
+ .join(';');
},
- classAttr_extButton(index,iindex){
+ classAttr_extButton(index, iindex) {
var $this = this;
var before_click_button = $this.$data.classAttrList[index].Attr[iindex].before_click_button;
var button_callback = $this.$data.classAttrList[index].Attr[iindex].button_callback;
- if(!before_click_button){
- uni.showModal({title:"鎻愮ず",content:"before_click_button-event_id涓虹┖锛�,showCancel:false,confirmText:"鍙栨秷"});
+ if (!before_click_button) {
+ uni.showModal({
+ title: "鎻愮ず",
+ content: "before_click_button-event_id涓虹┖锛�,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
return;
}
- if(!button_callback){
- uni.showModal({title:"鎻愮ず",content:"button_callback-event_id涓虹┖锛�,showCancel:false,confirmText:"鍙栨秷"});
+ if (!button_callback) {
+ uni.showModal({
+ title: "鎻愮ず",
+ content: "button_callback-event_id涓虹┖锛�,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
return;
}
var data_attr = this.$data.classAttrList[index].Attr[iindex];
- this.DataObjRunCustomEvent_Return(before_click_button, data_attr, button_callback, index,iindex);
+ this.DataObjRunCustomEvent_Return(before_click_button, data_attr, button_callback, index, iindex);
},
- scan_classAttr_extButton(e){ //---------鏈畬鎴�----------
- var $this = this;
- var Before_Select_Event = $this.$data.param.Scan_Code.Before_Select_Event.ID;
- var After_Select_Event = $this.$data.param.Scan_Code.After_Select_Event.ID;
- if(!Before_Select_Event){
- uni.showModal({title:"鎻愮ず",content:"閫夋嫨鎸夐挳鍓嶄簨浠朵负绌猴紒",showCancel:false,confirmText:"鍙栨秷"});
- return;
- }
- if(!After_Select_Event){
- uni.showModal({title:"鎻愮ず",content:"鏂板鎸夐挳鍚庝簨浠朵负绌猴紒",showCancel:false,confirmText:"鍙栨秷"});
- return;
- }
- // var data_attr = this.$data.classAttrList[index].Attr[iindex];
- this.DataObjRunCustomEvent_Return(Before_Select_Event, '', After_Select_Event, '', '');
- },
- classAttr_AddPer(index,iindex){
- var param={index:index,iindex: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){
+ url: '../selpsn/index?mulit=false¶m=' + JSON.stringify(param),
+ events: {
+ AddPer(data, param) {
// console.log(param);
console.log(data);
- $this.$data.classAttrList[param.index].Attr[param.iindex].Value=data[0].Name;
- $this.$data.classAttrList[param.index].Attr[param.iindex].ValID=data[0].Login+';'+data[0].Name;
-
+ $this.$data.classAttrList[param.index].Attr[param.iindex].Value = data[0].Name;
+ $this.$data.classAttrList[param.index].Attr[param.iindex].ValID = data[0].Login + ';' +
+ data[0].Name;
+
var eventid = $this.$data.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.$data.param.Master_Cls.ID,
- objid: "",
- attr: [],
- }
-
+ eventid = eventid.trim();
+ if (eventid) {
+ var info = {
+ eventid: eventid,
+ edtype: "4",
+ projectid: "",
+ rclsid: "",
+ robjid: "",
+ userlogin: data[0].Login,
+ clsid: $this.$data.param.Master_Cls.ID,
+ objid: "",
+ attr: [],
+ }
+
// var data_attr = $this.$data.classAttrList[param.index].Attr[param.iindex];
- $this.DataObjRunCustomEvent(info);
- }
+ $this.DataObjRunCustomEvent(info);
+ }
}
}
}
});
},
- classAttr_AddRef(e){
+ classAttr_AddRef(e) {
console.log(e.target);
- uni.showModal({title:"鎻愮ず",content:"姝ゅ姛鑳借繕鏈疄鐜帮紒",showCancel:false,confirmText:"鍙栨秷"});
+ uni.showModal({
+ title: "鎻愮ず",
+ content: "姝ゅ姛鑳借繕鏈疄鐜帮紒",
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
// var value=this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].RelCls[e.target.value];
// this.$data.classAttrList[e.target.dataset['index']].Attr[e.target.dataset['iindex']].Value=value;
},
- classAttr_AddPrj(index,iindex){
- var param={index:index,iindex:iindex};
+ 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){
+ url: '../selPrj/index?relation=-1¶m=' + JSON.stringify(param),
+ events: {
+ AddPer(data, param) {
// console.log(param);
// console.log(data);
- $this.$data.classAttrList[param.index].Attr[param.iindex].Value=data[0].Name;
- $this.$data.classAttrList[param.index].Attr[param.iindex].ValID=data[0].ID+';'+data[0].Name;
-
+ $this.$data.classAttrList[param.index].Attr[param.iindex].Value = data[0].Name;
+ $this.$data.classAttrList[param.index].Attr[param.iindex].ValID = data[0].ID + ';' +
+ data[0].Name;
+
var eventid = $this.$data.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.$data.param.Master_Cls.ID,
- objid: "",
- attr: [],
- }
-
- // var data_attr = $this.$data.classAttrList[param.index].Attr[param.iindex];
- $this.DataObjRunCustomEvent(info);
- }
+ eventid = eventid.trim();
+ if (eventid) {
+ var info = {
+ eventid: eventid,
+ edtype: "2",
+ projectid: data[0].ID,
+ rclsid: "",
+ robjid: "",
+ userlogin: "",
+ clsid: $this.$data.param.Master_Cls.ID,
+ objid: "",
+ attr: [],
+ }
+
+ // var data_attr = $this.$data.classAttrList[param.index].Attr[param.iindex];
+ $this.DataObjRunCustomEvent(info);
+ }
}
}
}
});
},
- sava(){
- if (this.$data.edit_ok_event)
- this.OKDataObjRunCustomEvent();
+ sava() {
+ if (this.$data.param.Before_OK_Event) //鍒ゆ柇鍔熻兘鐐瑰弬鏁版槸鍚︽湁纭畾鍓嶈剼鏈�+ this.scan_OKDataObjRunCustomEvent(this.$data.param.Before_OK_Event.ID);
+ else if (this.$data.param.After_OK_Event) //鍒ゆ柇鍔熻兘鐐瑰弬鏁版槸鍚︽湁纭畾鍚庤剼鏈�+ this.scan_OKDataObjRunCustomEvent(this.$data.param.After_OK_Event.ID);
else
- this.add();
+ uni.navigateBack({
+ delta: 1
+ }); //杩斿洖灞傛暟锛�鍒欎笂涓婇〉
},
- add(){
+ trigger() {
+ if (this.$data.param.Before_Trigger_Event) //鍒ゆ柇鍔熻兘鐐瑰弬鏁版槸鍚︽湁瑙﹀彂鍓嶈剼鏈�+ this.scan_TriggerDataObjRunCustomEvent(this.$data.param.Before_Trigger_Event.ID);
+ else if (this.$data.param.After_Trigger_Event) //鍒ゆ柇鍔熻兘鐐瑰弬鏁版槸鍚︽湁瑙﹀彂鍚庤剼鏈�+ this.scan_TriggerDataObjRunCustomEvent(this.$data.param.After_Trigger_Event.ID);
+ elsess
+ uni.navigateBack({
+ delta: 1
+ }); //杩斿洖灞傛暟锛�鍒欎笂涓婇〉
+ },
+ add() {
uni.showLoading({
- title:"鍔犺浇涓�.."
+ title: "鍔犺浇涓�..",
+ mask: true
});
- var req=[];
+ var req = [];
var attrlist = this.$data.classAttrList;
for (var i = 0; i < attrlist.length; i++) {
var attr = attrlist[i].Attr;
for (var j = 0; j < attr.length; j++) {
var ar = attr[j];
- if(ar.Value=='璇烽�鎷� || ar.Value=='鈥斺�璇烽�鎷┾�鈥�) ar.Value='';
- if(ar.Type=='寮曠敤瀵硅薄(澶氫釜)')
- if(ar.Value=='璇�) ar.Value='';
- if(ar.Type=='寮曠敤浜哄憳' || ar.Type=='寮曠敤椤圭洰')
- req.push({ name: ar.Name, value: ar.ValID ?ar.ValID :'' });
- else if(ar.Type=='甯冨皵鍊�)
- req.push({ name: ar.Name, value: ar.Value?'1':'0'});
- else if(ar.Type=='瀛楀吀' || ar.Type=='瀛楀吀-瀛楃涓�){
- if(ar.select==true){ //鍒ゆ柇涓嬫媺鏄惁澶氶�
- var valStr ="";
- for(var v in ar.Value){
- if(valStr)
- valStr+=";";
- valStr+=ar.Value[v];
+ if (ar.Value == '璇烽�鎷� || ar.Value == '鈥斺�璇烽�鎷┾�鈥�) ar.Value = '';
+ if (ar.Type == '寮曠敤瀵硅薄(澶氫釜)')
+ if (ar.Value == '璇�) ar.Value = '';
+ if (ar.Type == '寮曠敤浜哄憳' || ar.Type == '寮曠敤椤圭洰')
+ req.push({
+ name: ar.Name,
+ value: ar.ValID ? ar.ValID : ''
+ });
+ else if (ar.Type == '甯冨皵鍊�)
+ req.push({
+ name: ar.Name,
+ value: ar.Value ? '1' : '0'
+ });
+ else 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];
}
- req.push({ name: ar.Name, value: valStr});
- }else
- req.push({ name: ar.Name, value: ar.Value});
- }
- else
- req.push({ name: ar.Name, value: ar.Value ?ar.Value :''});
-
- if ((ar.NotEmpty == '1' || ar.notempty == true) && !ar.Value) {
- // if(ar.notEmpty=='1'){
+ req.push({
+ name: ar.Name,
+ value: valStr
+ });
+ } else
+ req.push({
+ name: ar.Name,
+ value: ar.Value
+ });
+ } else
+ req.push({
+ name: 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:"鎻愮ず",content:ar.DispName+'涓嶈兘涓虹┖锛�,showCancel:false,confirmText:"鍙栨秷"});
+ uni.showModal({
+ title: "鎻愮ず",
+ content: ar.DispName + '涓嶈兘涓虹┖锛�,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
return;
}
}
}
var enviroment = {
- 'function': '3000', // 鍔熻兘鐐圭紪鍙�- cls_id: this.$data.param.Master_Cls.ID, // 鍔熻兘鐐逛富鏁版嵁绫绘爣璇�- 'button': 'top', // top/bottom
- button_name: '鏂板',
- master: {
- cls_id: this.$data.param.Master_Cls.ID,
- }
+ 'function': '3000', // 鍔熻兘鐐圭紪鍙�+ cls_id: this.$data.param.Master_Cls.ID, // 鍔熻兘鐐逛富鏁版嵁绫绘爣璇�+ 'button': 'top', // top/bottom
+ button_name: '鏂板',
+ master: {
+ cls_id: this.$data.param.Master_Cls.ID,
+ }
};
-
- var dataInfo={
- class_id: this.$data.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),
+
+ var dataInfo = {
+ class_id: this.$data.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: ''
};
-
+
// return
console.log(dataInfo);
- this.$store.dispatch('addclassattr',dataInfo).then(success=>{
+ this.$store.dispatch('addclassattr', dataInfo).then(success => {
console.log(success);
uni.hideLoading();
- if (success.code=='00000') {
+ if (success.code == '00000') {
var action = JSON.parse(success.data.Action);
- if(action.ret=='0'){
- if(action.result_type=='0'){
- uni.showToast({title:action.result,icon:"success",duration:3000});
+ 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":""}"
}
//鍒锋柊
uni.redirectTo({
- url:'../modal/classAttr?param='+JSON.stringify(this.$data.param)+"&titlename="+this.$data.title
+ url: '../modal/ms_classAttr?param=' + JSON.stringify(this.$data.param) +
+ "&titlename=" + this.$data.title
});
// this.class_attr_init();
- }else{
- uni.showModal({title:"閿欒",content:success.msg,showCancel:false,confirmText:"鍙栨秷"});
+ } else {
+ uni.showModal({
+ title: "閿欒",
+ content: success.msg,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
}
- }).catch(ex=>{
+ }).catch(ex => {
console.log(ex);
uni.hideLoading();
- uni.showModal({title:"鎻愮ず",content:ex.errMsg,showCancel:false,confirmText:"鍙栨秷"});
+ uni.showModal({
+ title: "鎻愮ず",
+ content: ex.errMsg,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
});
},
- class_attr_init(){
+ class_attr_init() {
var attrlist = this.$data.classGridStyle.StyleDef.show_style
var newattrlist = [];
if (this.$data.classAttrList.length > 0) {
- for (var i = 0; i < attrlist.length; i++) {
- var open = attrlist[i].open;
- var name = attrlist[i].attrgroup_name;
- var attrs = attrlist[i].attrs;
- for (var s = 0; s < this.$data.classAttrList.length; s++) {
- var clsattr = this.$data.classAttrList[s];
- 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){
- var dictitemlist=[];
+ for (var i = 0; i < attrlist.length; i++) {
+ var open = attrlist[i].open;
+ var name = attrlist[i].attrgroup_name;
+ var attrs = attrlist[i].attrs;
+ for (var s = 0; s < this.$data.classAttrList.length; s++) {
+ var clsattr = this.$data.classAttrList[s];
+ 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) {
+ 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_NAME;
- ca.dictitem[d].value=ca.dictitem[d].CN_S_NAME;
+ ca.dictitem[d].label = ca.dictitem[d].CN_S_NAME;
+ 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.Value = ca.dictitem[d].CN_S_NAME;
}
- if(ca.select == true)
- ca.Value = [];//ca.dictitem[0].CN_S_NAME;
- else
- ca.Value = '璇烽�鎷�;//ca.dictitem[0].CN_S_NAME;
}
- if(ca.Type=='鏃ユ湡' || 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);
+ 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(ca.Type=='寮曠敤瀵硅薄(澶氫釜)'){
- var relClsList=[];
+ if (ca.Type == '寮曠敤瀵硅薄(澶氫釜)') {
+ var relClsList = [];
var attr_rescls = ca.RelCls.split(',');
- for(var ii in attr_rescls){
+ for (var ii in attr_rescls) {
var rescls = attr_rescls[ii].split('|');
- relClsList.push({id:rescls[0],name:rescls[1]});
+ relClsList.push({
+ id: rescls[0],
+ name: rescls[1]
+ });
}
ca.RelClsList = relClsList;
ca.Value = '璇�;
}
- if(ca.Type=='鐪佸競鍖�)
+ if (ca.Type == '鐪佸競鍖�)
ca.Value = '璇烽�鎷�;
- if(ca.Type=='甯冨皵鍊�)
+ if (ca.Type == '甯冨皵鍊�)
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.$data.classGridStyle.StyleDef.control_style,
- title_p_wdith:this.$data.classGridStyle.StyleDef.title_p_wdith
- })
- }
- }
- }
- if (newattrlist.length > 0) {
- this.$data.classAttrList = newattrlist;
- }
- var req=[];
- if (this.$data.classGridStyle.StyleDef) {
- if (this.$data.classGridStyle.StyleDef.show_style.length > 0) {
- var attrlist = this.$data.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, val: ar.value?ar.value:'' });
- }
- }
- }
- }
-
- var eventlist = this.$data.classGridStyle.StyleDef.event;
- if (eventlist) {
- if (eventlist.length > 0) {
- for (var i = 0; i < eventlist.length; i++) {
- if (eventlist[i].event_id == 'before_ok') {
- this.$data.edit_ok_event = eventlist[i];
- } else if (eventlist[i].event_id == 'initial') {
- this.$data.edit_inital_event = eventlist[i];
- } else if (eventlist[i].event_id == 'before_select_compose') {
- this.$data.edit_select_compose_event = eventlist[i].scrip_id;
- this.$data.edit_compose_cls_id = eventlist[i].compose_cls_id;
- }
- }
+
+ 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.$data.classGridStyle.StyleDef.control_style,
+ title_p_wdith: this.$data.classGridStyle.StyleDef.title_p_wdith,
+ Font: this.$data.classGridStyle.StyleDef.Font ? this.$data.classGridStyle
+ .StyleDef.Font : {},
+ Bk_Color: this.$data.classGridStyle.StyleDef.Bk_Color ? this.$data
+ .classGridStyle.StyleDef.Bk_Color : '#FFFFFF',
+ Text_Color: this.$data.classGridStyle.StyleDef.Text_Color ? this.$data
+ .classGridStyle.StyleDef.Text_Color : '#000000'
+ })
+ }
}
}
- console.log(req);
+ if (newattrlist.length > 0) {
+ this.$data.classAttrList = newattrlist;
+ }
+ var req = [];
+ if (this.$data.classGridStyle.StyleDef) {
+ if (this.$data.classGridStyle.StyleDef.show_style.length > 0) {
+ var attrlist = this.$data.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.$data.classGridStyle.StyleDef.event;
+ if (eventlist) {
+ if (eventlist.length > 0) {
+ for (var i = 0; i < eventlist.length; i++) {
+ if (eventlist[i].event_id == 'before_ok') {
+ this.$data.edit_ok_event = eventlist[i];
+ } else if (eventlist[i].event_id == 'initial') {
+ this.$data.edit_inital_event = eventlist[i];
+ } else if (eventlist[i].event_id == 'before_select_compose') {
+ this.$data.edit_select_compose_event = eventlist[i].scrip_id;
+ this.$data.edit_compose_cls_id = eventlist[i].compose_cls_id;
+ }
+ }
+ }
+ }
+ // console.log(req);
if (this.$data.edit_inital_event) {
- var eventid = this.$data.edit_inital_event.scrip_id;
- var info = {
- eventid: eventid,
- edtype: "0",
- projectid: '',
- rclsid: '',
- robjid: '',
- userlogin: '',
- clsid: this.$data.param.Master_Cls.ID,
- objid: "",
- attr: req,
- }
- this.ini_DataObjRunCustomEvent(info);
+ var eventid = this.$data.edit_inital_event.scrip_id;
+ var info = {
+ eventid: eventid,
+ edtype: "0",
+ projectid: '',
+ rclsid: '',
+ robjid: '',
+ userlogin: '',
+ clsid: this.$data.param.Master_Cls.ID,
+ objid: "",
+ attr: req,
+ }
+ this.ini_DataObjRunCustomEvent(info);
}
console.log(this.$data.classGridStyle);
console.log(this.$data.classAttrList);
-
+
} else {
- uni.showModal({title:"鎻愮ず",content:"鏈壘鍒板彲鏄剧ず鐨勭殑灞炴�",showCancel:false,confirmText:"鍙栨秷"});
+ uni.showModal({
+ title: "鎻愮ず",
+ content: "鏈壘鍒板彲鏄剧ず鐨勭殑灞炴�",
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
}
},
- subClass_attr_init(){
+ subClass_attr_init() {
var attrlist = this.$data.subClassGridStyle.StyleDef.show_style
var newattrlist = [];
if (this.$data.subClassAttrList.length > 0) {
- for (var i = 0; i < attrlist.length; i++) {
- var open = attrlist[i].open;
- var name = attrlist[i].attrgroup_name;
- var attrs = attrlist[i].attrs;
- for (var s = 0; s < this.$data.subClassAttrList.length; s++) {
- var clsattr = this.$data.subClassAttrList[s];
- 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){
- var dictitemlist=[];
+ for (var i = 0; i < attrlist.length; i++) {
+ var open = attrlist[i].open;
+ var name = attrlist[i].attrgroup_name;
+ var attrs = attrlist[i].attrs;
+ for (var s = 0; s < this.$data.subClassAttrList.length; s++) {
+ var clsattr = this.$data.subClassAttrList[s];
+ 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) {
+ 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_NAME;
- ca.dictitem[d].value=ca.dictitem[d].CN_S_NAME;
+ ca.dictitem[d].label = ca.dictitem[d].CN_S_NAME;
+ 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.Value = ca.dictitem[d].CN_S_NAME;
}
- if(ca.select == true)
- ca.Value = [];//ca.dictitem[0].CN_S_NAME;
- else
- ca.Value = '璇烽�鎷�;//ca.dictitem[0].CN_S_NAME;
}
- if(ca.Type=='鏃ユ湡' || 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);
+ 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(ca.Type=='寮曠敤瀵硅薄(澶氫釜)'){
- var relClsList=[];
+ if (ca.Type == '寮曠敤瀵硅薄(澶氫釜)') {
+ var relClsList = [];
var attr_rescls = ca.RelCls.split(',');
- for(var ii in attr_rescls){
+ for (var ii in attr_rescls) {
var rescls = attr_rescls[ii].split('|');
- relClsList.push({id:rescls[0],name:rescls[1]});
+ relClsList.push({
+ id: rescls[0],
+ name: rescls[1]
+ });
}
ca.RelClsList = relClsList;
ca.Value = '璇�;
}
- if(ca.Type=='鐪佸競鍖�)
+ if (ca.Type == '鐪佸競鍖�)
ca.Value = '璇烽�鎷�;
- if(ca.Type=='甯冨皵鍊�)
+ if (ca.Type == '甯冨皵鍊�)
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.$data.subClassGridStyle.StyleDef.control_style,
- title_p_wdith:this.$data.subClassGridStyle.StyleDef.title_p_wdith
- })
- }
- }
- }
- if (newattrlist.length > 0) {
- this.$data.subClassAttrList = newattrlist;
- }
- var req=[];
- if (this.$data.subClassGridStyle.StyleDef) {
- if (this.$data.subClassGridStyle.StyleDef.show_style.length > 0) {
- var attrlist = this.$data.subClassGridStyle.StyleDef.show_style
- // $el.find('.attr_field').prop('readonly', true);
- // $el.find('.attr_field').prop('disabled', true);
- for (var i = 0; i < attrlist.length; i++) {
- var attr = attrlist[i].attrs
- for (var j = 0; j < attr.length; j++) {
- var ar = attr[j];
- req.push({ attr: ar.attr, val: ar.value?ar.value:'' });
- }
- }
- }
- }
-
- var eventlist = this.$data.subClassGridStyle.StyleDef.event;
- if (eventlist) {
- if (eventlist.length > 0) {
- for (var i = 0; i < eventlist.length; i++) {
- if (eventlist[i].event_id == 'before_ok') {
- this.$data.edit_ok_event = eventlist[i];
- } else if (eventlist[i].event_id == 'initial') {
- this.$data.edit_inital_event = eventlist[i];
- } else if (eventlist[i].event_id == 'before_select_compose') {
- this.$data.edit_select_compose_event = eventlist[i].scrip_id;
- this.$data.edit_compose_cls_id = eventlist[i].compose_cls_id;
- }
- }
+
+ 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.$data.subClassGridStyle.StyleDef.control_style,
+ title_p_wdith: this.$data.subClassGridStyle.StyleDef.title_p_wdith,
+ Font: this.$data.subClassGridStyle.StyleDef.Font ? this.$data.subClassGridStyle
+ .StyleDef.Font : {},
+ Bk_Color: this.$data.subClassGridStyle.StyleDef.Bk_Color ? this.$data
+ .subClassGridStyle.StyleDef.Bk_Color : '#FFFFFF',
+ Text_Color: this.$data.subClassGridStyle.StyleDef.Text_Color ? this.$data
+ .subClassGridStyle.StyleDef.Text_Color : '#000000'
+ })
+ }
}
}
- console.log(req);
+ if (newattrlist.length > 0) {
+ this.$data.subClassAttrList = newattrlist;
+ }
+ var req = [];
+ if (this.$data.subClassGridStyle.StyleDef) {
+ if (this.$data.subClassGridStyle.StyleDef.show_style.length > 0) {
+ var attrlist = this.$data.subClassGridStyle.StyleDef.show_style
+ // $el.find('.attr_field').prop('readonly', true);
+ // $el.find('.attr_field').prop('disabled', true);
+ for (var i = 0; i < attrlist.length; i++) {
+ var attr = attrlist[i].attrs
+ for (var j = 0; j < attr.length; j++) {
+ var ar = attr[j];
+ req.push({
+ attr: ar.attr,
+ value: ar.value ? ar.value : ''
+ });
+ }
+ }
+ }
+ }
+
+ var eventlist = this.$data.subClassGridStyle.StyleDef.event;
+ if (eventlist) {
+ if (eventlist.length > 0) {
+ for (var i = 0; i < eventlist.length; i++) {
+ if (eventlist[i].event_id == 'before_ok') {
+ this.$data.edit_ok_event = eventlist[i];
+ } else if (eventlist[i].event_id == 'initial') {
+ this.$data.edit_inital_event = eventlist[i];
+ } else if (eventlist[i].event_id == 'before_select_compose') {
+ this.$data.edit_select_compose_event = eventlist[i].scrip_id;
+ this.$data.edit_compose_cls_id = eventlist[i].compose_cls_id;
+ }
+ }
+ }
+ }
+ // console.log(req);
if (this.$data.edit_inital_event) {
- var eventid = this.$data.edit_inital_event.scrip_id;
- var info = {
- eventid: eventid,
- edtype: "0",
- projectid: '',
- rclsid: '',
- robjid: '',
- userlogin: '',
- clsid: this.$data.param.Sub_Cls.ID,
- objid: "",
- attr: req,
- }
- this.scan_ini_DataObjRunCustomEvent(info);
+ var eventid = this.$data.edit_inital_event.scrip_id;
+ var info = {
+ eventid: eventid,
+ edtype: "0",
+ projectid: '',
+ rclsid: '',
+ robjid: '',
+ userlogin: '',
+ clsid: this.$data.param.Sub_Cls.ID,
+ objid: "",
+ attr: req,
+ }
+ this.scan_ini_DataObjRunCustomEvent(info);
}
console.log(this.$data.subClassGridStyle);
console.log(this.$data.subClassAttrList);
-
+
} else {
- uni.showModal({title:"鎻愮ず",content:"鏈壘鍒板彲鏄剧ず鐨勭殑灞炴�",showCancel:false,confirmText:"鍙栨秷"});
+ uni.showModal({
+ title: "鎻愮ず",
+ content: "鏈壘鍒板彲鏄剧ず鐨勭殑灞炴�",
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
}
},
- ini_DataObjRunCustomEvent(info){
+ ini_DataObjRunCustomEvent(info) {
var param = {
- EditStyle: this.$data.param.Master_Cls.View_Style.Name,
- ViewStyle: this.$data.param.Master_Cls.View_Style.Name,
- NotTriggerSysEvent: 0,
- enviroment: {
- 'function': '3000', // 鍔熻兘鐐圭紪鍙�- cls_id: this.$data.param.Master_Cls.ID, // 鍔熻兘鐐逛富鏁版嵁绫绘爣璇�- 'button': 'top', // top/bottom
- button_name: '鏂板',
- master: {
- cls_id: this.$data.param.Master_Cls.ID, // button=bottom鏃�master鐨刢ls_id
- //obj_id: '' // button=bottom鏃�master鐨刼bj_id
- }
- }
+ EditStyle: this.$data.param.Master_Cls.View_Style.Name,
+ ViewStyle: this.$data.param.Master_Cls.View_Style.Name,
+ NotTriggerSysEvent: 0,
+ enviroment: {
+ 'function': '3000', // 鍔熻兘鐐圭紪鍙�+ cls_id: this.$data.param.Master_Cls.ID, // 鍔熻兘鐐逛富鏁版嵁绫绘爣璇�+ 'button': 'top', // top/bottom
+ button_name: '鏂板',
+ master: {
+ cls_id: this.$data.param.Master_Cls.ID, // button=bottom鏃�master鐨刢ls_id
+ //obj_id: '' // button=bottom鏃�master鐨刼bj_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
- }
+ 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
+ }
console.log(dataInfo);
- this.$store.dispatch('DataObjRunCustomEventInfo',dataInfo).then(success=>{
+ this.$store.dispatch('DataObjRunCustomEventInfo', dataInfo).then(success => {
console.log(success);
- if (success.code=='00000') {
+ if (success.code == '00000') {
var data = JSON.parse(success.data);
var actionlist = data.action;
if (actionlist) {
- for (var j = 0; j < actionlist.length; j++) {
- var action = actionlist[j]
- var action_type = action.action_type;
- var value = action.value;
- if (action_type == 'set_dlg_attr') {
- if (value) {
- var val = value;
- if (typeof value == 'string') {
- val = JSON.parse(value);
- }
+ 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 i = 0; i < val.length; i++) {
for (var a = 0; a < this.$data.classAttrList.length; a++) {
for (var l = 0; l < this.$data.classAttrList[a].Attr.length; l++) {
var ca = this.$data.classAttrList[a].Attr[l];
- if (val[i].attr == ca.Name) {
- if(ca.Type=='瀛楀吀' || ca.Type=='瀛楀吀-瀛楃涓�){
- var dictItemList=[];
- for(var d in val[i].choice_list){
- var val =val[i].choice_list[d];
- dictItemList.push({"CN_S_NAME":val,"Name":val,"label":val,"value":val});
-
+ if (val[i].attr == ca.Name) {
+ if (ca.Type == '瀛楀吀' || ca.Type == '瀛楀吀-瀛楃涓� || ca.Type ==
+ '瀛楀吀-鏁存暟') {
+ var dictItemList = [];
+ for (var d in val[i].choice_list) {
+ var val = val[i].choice_list[d];
+ dictItemList.push({
+ "CN_S_NAME": val,
+ "Name": val,
+ "label": val,
+ "value": val
+ });
+
}
ca.dictitem = dictItemList;
// attr[j].dictitem = val[i].choice_list;
- }else{
+ } else {
// ca.value = val[i].value;
}
}
}
}
-
- var length = 0;
- if (!this.$data.refdatastore.filter(function (s) {
- return val[i].attr == s.attr
- }).length) {
- length = 1;
- this.$data.refdatastore.push(val[i]);
- }
- if (length == 0) {
- for (var j = 0; j < this.$data.refdatastore.length; j++) {
- if (this.$data.refdatastore[j].attr == val[i].attr) {
- this.$data.refdatastore[j].value = val[i].value;
- }
- }
- }
- }
- }
- }
- if (action_type == 'open_select_userdlg') {
- uni.showModal({title:"閿欒2.2",content:"open_select_userdlg杩欎釜action_type杩樻湭澶勭悊锛�,showCancel:false,confirmText:"鍙栨秷"});
- }
- }
+
+ var length = 0;
+ if (!this.$data.refdatastore.filter(function(s) {
+ return val[i].attr == s.attr
+ }).length) {
+ length = 1;
+ this.$data.refdatastore.push(val[i]);
+ }
+ if (length == 0) {
+ for (var j = 0; j < this.$data.refdatastore.length; j++) {
+ if (this.$data.refdatastore[j].attr == val[i].attr) {
+ this.$data.refdatastore[j].value = val[i].value;
+ }
+ }
+ }
+ }
+ }
+ }
+ if (action_type == 'open_select_userdlg') {
+ uni.showModal({
+ title: "閿欒2.2",
+ content: "open_select_userdlg杩欎釜action_type杩樻湭澶勭悊锛�,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
+ }
+ }
}
-
- }else{
- uni.showModal({title:"閿欒2",content:success.msg,showCancel:false,confirmText:"鍙栨秷"});
+
+ } else {
+ uni.showModal({
+ title: "閿欒2",
+ content: success.msg,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
}
- }).catch(ex=>{
+ }).catch(ex => {
// console.log(ex);
- uni.showModal({title:"閿欒2.1",content:ex.errMsg,showCancel:false,confirmText:"鍙栨秷"});
+ uni.showModal({
+ title: "閿欒2.1",
+ content: ex.errMsg,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
});
},
- DataObjRunCustomEvent(info,data_attr){
+ DataObjRunCustomEvent(info, data_attr) {
var $this = this;
- var enviroment = {
- 'function': '3000', // 鍔熻兘鐐圭紪鍙�- cls_id: this.$data.param.Master_Cls.ID, // 鍔熻兘鐐逛富鏁版嵁绫绘爣璇�- 'button': 'top', // top/bottom
- button_name: '鏂板',
- master: {
- cls_id: this.$data.param.Master_Cls.ID, // button=bottom鏃�master鐨刢ls_id
- //obj_id: '' // button=bottom鏃�master鐨刼bj_id
- }
- };
+ var enviroment = {
+ 'function': '3000', // 鍔熻兘鐐圭紪鍙�+ cls_id: this.$data.param.Master_Cls.ID, // 鍔熻兘鐐逛富鏁版嵁绫绘爣璇�+ 'button': 'top', // top/bottom
+ button_name: '鏂板',
+ master: {
+ cls_id: this.$data.param.Master_Cls.ID, // button=bottom鏃�master鐨刢ls_id
+ //obj_id: '' // button=bottom鏃�master鐨刼bj_id
+ }
+ };
enviroment.edit_dlg = {
- type: 'small',//灏忕獥鍙�- class_id: this.$data.param.Master_Cls.ID,//褰撳墠鏁版嵁绫籭d
+ type: 'small', //灏忕獥鍙�+ class_id: this.$data.param.Master_Cls.ID, //褰撳墠鏁版嵁绫籭d
}
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//寮曠敤鎸夐挳鐨則ooltip
- }
+ 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 //寮曠敤鎸夐挳鐨則ooltip
+ }
}
- 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.$data.global_attr)
- }
- console.log(dataInfo);
- this.$store.dispatch('DataObjRunCustomEventInfo',dataInfo).then(success=>{
- console.log(success);
- if (success.code=='00000') {
+ 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.$data.global_attr)
+ }
+ console.log(dataInfo);
+ this.$store.dispatch('DataObjRunCustomEventInfo', dataInfo).then(success => {
+ console.log(success);
+ if (success.code == '00000') {
var data = JSON.parse(success.data);
- var actionlist = data.action;
-
- if (actionlist) {
+ 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 i = 0; i < actionlist.length; i++) {
+ var action = actionlist[i];
+ if (action.action_type == 'set_dlg_attr') {
+ var result = action.value;
+ for (var i = 0; i < result.length; i++) {
+ if (result[i].choice_list) {
for (var c = 0; c < $this.$data.classAttrList.length; c++) {
var attr = $this.$data.classAttrList[c].Attr;
for (var j = 0; j < attr.length; j++) {
- if(attr[j].Name==result[i].attr){
- if(attr[j].Type=='瀛楀吀' || attr[j].Type=='瀛楀吀-瀛楃涓�){
- var dictItemList=[];
- for(var d in result[i].choice_list){
- var val =result[i].choice_list[d];
- dictItemList.push({"CN_S_NAME":val,"Name":val,"label":val,"value":val});
+ if (attr[j].Name == result[i].attr) {
+ if (attr[j].Type == '瀛楀吀' || attr[j].Type == '瀛楀吀-瀛楃涓� ||
+ attr[j].Type == '瀛楀吀-鏁存暟') {
+ var dictItemList = [];
+ for (var d in result[i].choice_list) {
+ var val = result[i].choice_list[d];
+ dictItemList.push({
+ "CN_S_NAME": val,
+ "Name": val,
+ "label": val,
+ "value": val
+ });
}
attr[j].dictitem = dictItemList;
// attr[j].dictitem = result[i].choice_list;
@@ -1604,510 +3020,634 @@
}
}
}
- }
- for (var c = 0; c < $this.$data.classAttrList.length; c++) {
- var attr = $this.$data.classAttrList[c].Attr;
- for (var j = 0; j < attr.length; j++) {
- console.log(attr[j].Name+'=='+result[i].attr);
- if(attr[j].Name==result[i].attr){
- attr[j].Value = result[i].value;
- }
- }
- }
- var length = 0;
- if (!$this.$data.refdatastore.filter(function (s) {
- return result[i].attr == s.attr
- }).length) {
- length = 1;
- $this.$data.refdatastore.push(result[i]);
- }
- if (length == 0) {
- for (var j = 0; j < $this.$data.refdatastore.length; j++) {
- if ($this.$data.refdatastore[j].attr == result[i].attr) {
- $this.$data.refdatastore[j].value = result[i].value;
- }
- }
- }
- }
- } else if (data.action[i].action_type == 'set_global_attr') {
- $this.$data.global_attr = data.action[i].value || [];
- }
- }
- }
-
- if (data.result) {
- var result = data.result;
- for (var i = 0; i < result.length; i++) {
- for (var c = 0; c < $this.$data.classAttrList.length; c++) {
- var attr = $this.$data.classAttrList[c].Attr;
- for (var j = 0; j < attr.length; j++) {
- if(attr[j].Name==result[i].attr){
- attr[j].Value = result[i].value;
- }
- }
- }
-
- var length = 0;
- if (!$this.$data.refdatastore.filter(function (s) {
- return result[i].attr == s.attr
- }).length) {
- length = 1;
- $this.$data.refdatastore.push(result[i]);
- }
- if (length == 0) {
- for (var j = 0; j < $this.$data.refdatastore.length; j++) {
- if ($this.$data.refdatastore[j].attr == result[i].attr) {
- $this.$data.refdatastore[j].value = result[i].value;
- }
- }
- }
- }
- }
- }else{
- uni.showModal({title:"閿欒3",content:success.msg,showCancel:false,confirmText:"鍙栨秷"});
- }
- }).catch(ex=>{
- // console.log(ex);
- uni.showModal({title:"閿欒3.1",content:ex.errMsg,showCancel:false,confirmText:"鍙栨秷"});
- });
- },
- OKDataObjRunCustomEvent(){
- var enviroment = {
- 'function': '3000', // 鍔熻兘鐐圭紪鍙�- cls_id: this.$data.param.Master_Cls.ID, // 鍔熻兘鐐逛富鏁版嵁绫绘爣璇�- 'button': 'top', // top/bottom
- button_name: '鏂板',
- master: {
- cls_id: this.$data.param.Master_Cls.ID, // button=bottom鏃�master鐨刢ls_id
-
- }
- };
-
- var eventid = this.$data.edit_ok_event.scrip_id;
- var req=[];
- var attrlist = this.$data.classAttrList;
- for (var i = 0; i < attrlist.length; i++) {
- var attr = attrlist[i].Attr;
- for (var j = 0; j < attr.length; j++) {
- var ar = attr[j];
- if(ar.Value=='璇烽�鎷� || ar.Value=='鈥斺�璇烽�鎷┾�鈥�) ar.Value='';
- if(ar.Type=='寮曠敤瀵硅薄(澶氫釜)')
- if(ar.Value=='璇�) ar.Value='';
- if(ar.Type=='寮曠敤浜哄憳' || ar.Type=='寮曠敤椤圭洰')
- req.push({ attr: ar.Name, val: ar.ValID ?ar.ValID :'' });
- else if(ar.Type=='甯冨皵鍊�)
- req.push({ attr: ar.Name, val: ar.Value?'1':'0'});
- else
- req.push({ attr: ar.Name, val: ar.Value });
- }
- }
-
- if (this.$data.refdatastore.length > 0) {
- for (var i = 0; i < this.$data.refdatastore.length; i++) {
- if (!req.filter(function (s) {
- return this.$data.refdatastore[i].attr == s.name
- }).length) {
- length = 1;
- req.push({ 'attr': this.$data.refdatastore[i].attr, 'val': this.$data.refdatastore[i].value });
- }
- }
- }
- var info = {
- eventid: eventid,
- edtype: "0",
- projectid: '',
- rclsid: '',
- robjid: '',
- userlogin: '',
- clsid: this.$data.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.$data.global_attr)
- }
- console.log(dataInfo);
- this.$store.dispatch('DataObjRunCustomEventInfo',dataInfo).then(success=>{
- console.log(success);
- if (success.code=='00000') {
- var data = JSON.parse(success.data);
- var result = data.result;
- for (var i = 0; i < result.length; i++) {
- // self.class_attr_ele.find('.attr_field[data-field="' + result[i].attr + '"]').val(result[i].value).data('val', result[i].value);
- var length = 0;
- if (!this.$data.refdatastore.filter(function (s) {
- return result[i].attr == s.attr
- }).length) {
- length = 1;
- this.$data.refdatastore.push(result[i]);
- }
- if (length == 0) {
- for (var j = 0; j < this.$data.refdatastore.length; j++) {
- if (this.$data.refdatastore[j].attr == result[i].attr) {
- this.$data.refdatastore[j].value = result[i].value;
- }
- }
- }
- }
-
- this.add();
- }else{
- uni.showModal({title:"閿欒4",content:success.msg,showCancel:false,confirmText:"鍙栨秷"});
- }
- }).catch(ex=>{
- // console.log(ex);
- uni.showModal({title:"閿欒4.1",content:ex.errMsg,showCancel:false,confirmText:"鍙栨秷"});
- });
- },
- DataObjRunCustomEvent_Return(eventid,data_attr,button_callback,index,iindex){
- var enviroment = {
- 'function': '3000', // 鍔熻兘鐐圭紪鍙�- cls_id: this.$data.param.Master_Cls.ID, // 鍔熻兘鐐逛富鏁版嵁绫绘爣璇�- 'button': 'top', // top/bottom
- button_name: '鏂板',
- master: {
- cls_id: this.$data.param.Master_Cls.ID, // button=bottom鏃�master鐨刢ls_id
- //obj_id: '' // button=bottom鏃�master鐨刼bj_id
- }
- };
- var req=[];
- var attrlist = this.$data.classAttrList;
- for (var i = 0; i < attrlist.length; i++) {
- var attr = attrlist[i].Attr;
- for (var j = 0; j < attr.length; j++) {
- var ar = attr[j];
- if(ar.Type=='寮曠敤瀵硅薄(澶氫釜)')
- if(ar.Value=='璇�) ar.Value='';
- if(ar.Type=='寮曠敤浜哄憳' || ar.Type=='寮曠敤椤圭洰')
- req.push({ attr: ar.Name, val: ar.ValID ?ar.ValID :'' });
- else if(ar.Type=='甯冨皵鍊�)
- req.push({ attr: ar.Name, val: ar.Value?'1':'0'});
- else
- req.push({ attr: ar.Name, val: ar.Value });
- }
- }
- if (this.$data.refdatastore.length > 0) {
- for (var i = 0; i < this.$data.refdatastore.length; i++) {
- if (!req.filter(function (s) {
- return this.$data.refdatastore[i].attr == s.name
- }).length) {
- length = 1;
- req.push({ 'attr': this.$data.refdatastore[i].attr, 'val': this.$data.refdatastore[i].value });
- }
- }
- }
- var extinfo = enviroment;
- extinfo.edit_dlg = {
- type: 'small',//灏忕獥鍙�- class_id: this.$data.param.Master_Cls.ID,//褰撳墠鏁版嵁绫籭d
- }
- 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//寮曠敤鎸夐挳鐨則ooltip
- }
- }
- var dataInfo = {
- edtype: "0", eventid: eventid, projectid: '',rclsid: '', robjid: '', userlogin: '',
- clsid: this.$data.param.Master_Cls.ID, objid: '',attr: JSON.stringify(req),
- extinfo: JSON.stringify(extinfo), global_attr: JSON.stringify(this.$data.global_attr)
- }
- console.log(dataInfo);
- this.$store.dispatch('DataObjRunCustomEventInfo',dataInfo).then(success=>{
- console.log(success);
- if (success.code=='00000') {
- var data = JSON.parse(success.data);
- 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> ' + '鎻愮ず',
- content: action.action_type + '姝ction灏氭湭澶勭悊锛�
- });
- 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.$data.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> ' + '鎻愮ず',
- content: action.action_type + '姝ction灏氭湭澶勭悊锛�
- });
- 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 == '鎴戣礋璐g殑椤圭洰')
- priRel = '1';
- else if (action.value.select_range == '鎴戝垱寤虹殑')
- priRel = '2';
- else if (action.value.select_range == '鎴戝弬涓庣殑' || action.value.select_range == '鎴戝弬鍔犵殑')
- priRel = '3';
- else if (action.value.select_range == '鎴戝叧娉ㄧ殑')
- priRel = '4';
- else if (action.value.select_range == '鎴戜笅灞炵殑椤圭洰')
- priRel = '5';
-
- var $this = this;
- var param_={
- index: index,
- iindex:iindex,
- button_callback:button_callback,
- req:req
- }
- uni.navigateTo({
- url:'../selPrj/index?relation='+priRel+'¶m='+JSON.stringify(param_),
- events:{
- AddPer(data,param){
- $this.$data.classAttrList[param.index].Attr[param.iindex].Value=data[0].Name;
- $this.$data.classAttrList[param.index].Attr[param.iindex].ValID=data[0].ID+';'+data[0].Name;
- var callback_eventid = param.button_callback.trim();
- if (callback_eventid) {
- var info = {
- eventid: callback_eventid,
- edtype: "2",
- projectid: data[0].ID,
- rclsid: "",
- robjid: "",
- userlogin: "",
- clsid: $this.$data.param.Master_Cls.ID,
- objid: "",
- attr: param.req,
- }
-
- $this.DataObjRunCustomEvent(info);
+ }
+ for (var c = 0; c < $this.$data.classAttrList.length; c++) {
+ var attr = $this.$data.classAttrList[c].Attr;
+ for (var j = 0; j < attr.length; j++) {
+ console.log(attr[j].Name + '==' + result[i].attr);
+ if (attr[j].Name == result[i].attr) {
+ attr[j].Value = result[i].value;
}
}
}
- });
- } else {
- var d = dialog({
- title: '<i class="ace-icon fa fa-info-circle"></i> ' + '鎻愮ず',
- content: action.action_type + '姝ction灏氭湭澶勭悊锛�
- });
- d.show();
- }
- }
+ var length = 0;
+ if (!$this.$data.refdatastore.filter(function(s) {
+ return result[i].attr == s.attr
+ }).length) {
+ length = 1;
+ $this.$data.refdatastore.push(result[i]);
+ }
+ if (length == 0) {
+ for (var j = 0; j < $this.$data.refdatastore.length; j++) {
+ if ($this.$data.refdatastore[j].attr == result[i].attr) {
+ $this.$data.refdatastore[j].value = result[i].value;
+ }
+ }
+ }
+ }
+ } else if (data.action[i].action_type == 'set_global_attr') {
+ $this.$data.global_attr = data.action[i].value || [];
+ }
+ }
}
- }else{
- uni.showModal({title:"鎻愮ず5.2",content: '璋冪敤 before_click_button 鑴氭湰杩斿洖绌猴紝event_id' + eventid,showCancel:false,confirmText:"鍙栨秷"});
+
+ if (data.result) {
+ var result = data.result;
+ for (var i = 0; i < result.length; i++) {
+ for (var c = 0; c < $this.$data.classAttrList.length; c++) {
+ var attr = $this.$data.classAttrList[c].Attr;
+ for (var j = 0; j < attr.length; j++) {
+ if (attr[j].Name == result[i].attr) {
+ attr[j].Value = result[i].value;
+ }
+ }
+ }
+
+ var length = 0;
+ if (!$this.$data.refdatastore.filter(function(s) {
+ return result[i].attr == s.attr
+ }).length) {
+ length = 1;
+ $this.$data.refdatastore.push(result[i]);
+ }
+ if (length == 0) {
+ for (var j = 0; j < $this.$data.refdatastore.length; j++) {
+ if ($this.$data.refdatastore[j].attr == result[i].attr) {
+ $this.$data.refdatastore[j].value = result[i].value;
+ }
+ }
+ }
+ }
}
- }else{
- uni.showModal({title:"閿欒5",content:success.msg,showCancel:false,confirmText:"鍙栨秷"});
+ } else {
+ uni.showModal({
+ title: "閿欒3",
+ content: success.msg,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
}
- }).catch(ex=>{
+ }).catch(ex => {
// console.log(ex);
- uni.showModal({title:"鎻愮ず5.1",content:ex.errMsg,showCancel:false,confirmText:"鍙栨秷"});
+ uni.showModal({
+ title: "閿欒3.1",
+ content: ex.errMsg,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
});
- },
- scan_ini_DataObjRunCustomEvent(info){
- var param = {
- EditStyle: this.$data.param.Sub_Cls.View_Style.Name,
- ViewStyle: this.$data.param.Sub_Cls.View_Style.Name,
- NotTriggerSysEvent: 0,
- enviroment: {
- 'function': '3000', // 鍔熻兘鐐圭紪鍙�- cls_id: this.$data.param.Sub_Cls.ID, // 鍔熻兘鐐逛富鏁版嵁绫绘爣璇�- 'button': 'top', // top/bottom
- button_name: '鏂板',
- master: {
- cls_id: this.$data.param.Sub_Cls.ID, // button=bottom鏃�master鐨刢ls_id
- //obj_id: '' // button=bottom鏃�master鐨刼bj_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
- }
- console.log(dataInfo);
- this.$store.dispatch('DataObjRunCustomEventInfo',dataInfo).then(success=>{
- console.log(success);
- if (success.code=='00000') {
- var data = JSON.parse(success.data);
- var actionlist = data.action;
- if (actionlist) {
- for (var j = 0; j < actionlist.length; j++) {
- var action = actionlist[j]
- var action_type = action.action_type;
- var value = action.value;
- if (action_type == 'set_dlg_attr') {
- if (value) {
- var val = value;
- if (typeof value == 'string') {
- val = JSON.parse(value);
- }
- console.log(val);
- for (var i = 0; i < val.length; i++) {
- for (var a = 0; a < this.$data.subClassAttrList.length; a++) {
- for (var l = 0; l < this.$data.subClassAttrList[a].Attr.length; l++) {
- var ca = this.$data.subClassAttrList[a].Attr[l];
- if (val[i].attr == ca.Name) {
- if(ca.Type=='瀛楀吀' || ca.Type=='瀛楀吀-瀛楃涓�){
- var dictItemList=[];
- for(var d in val[i].choice_list){
- var val =val[i].choice_list[d];
- dictItemList.push({"CN_S_NAME":val,"Name":val,"label":val,"value":val});
-
- }
- ca.dictitem = dictItemList;
- // attr[j].dictitem = val[i].choice_list;
- }else{
- // ca.value = val[i].value;
- }
- }
- }
- }
-
- var length = 0;
- if (!this.$data.refdatastore.filter(function (s) {
- return val[i].attr == s.attr
- }).length) {
- length = 1;
- this.$data.refdatastore.push(val[i]);
- }
- if (length == 0) {
- for (var j = 0; j < this.$data.refdatastore.length; j++) {
- if (this.$data.refdatastore[j].attr == val[i].attr) {
- this.$data.refdatastore[j].value = val[i].value;
- }
- }
- }
- }
- }
- }
- if (action_type == 'open_select_userdlg') {
- uni.showModal({title:"閿欒2.2",content:"open_select_userdlg杩欎釜action_type杩樻湭澶勭悊锛�,showCancel:false,confirmText:"鍙栨秷"});
- }
- }
- }
-
- }else{
- uni.showModal({title:"閿欒2",content:success.msg,showCancel:false,confirmText:"鍙栨秷"});
- }
- }).catch(ex=>{
- // console.log(ex);
- uni.showModal({title:"閿欒2.1",content:ex.errMsg,showCancel:false,confirmText:"鍙栨秷"});
- });
- },
- scan_DataObjRunCustomEvent(info,data_attr){
- var $this = this;
- var enviroment = {
- 'function': '3000', // 鍔熻兘鐐圭紪鍙�- cls_id: this.$data.param.Sub_Cls.ID, // 鍔熻兘鐐逛粠鏁版嵁绫绘爣璇�- 'button': 'top', // top/bottom
- button_name: '鏂板',
- master: {
- cls_id: this.$data.param.Sub_Cls.ID, // button=bottom鏃�master鐨刢ls_id
- //obj_id: '' // button=bottom鏃�master鐨刼bj_id
- }
- };
- enviroment.edit_dlg = {
- type: 'small',//灏忕獥鍙�- class_id: this.$data.param.Sub_Cls.ID,//褰撳墠鏁版嵁绫籭d
- }
- 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//寮曠敤鎸夐挳鐨則ooltip
- }
- }
-
- 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: JSON.stringify(info.inputParamter), global_attr: JSON.stringify(this.$data.global_attr)
- }
- console.log(dataInfo);
- this.$store.dispatch('DataObjRunCustomEventInfo',dataInfo).then(success=>{
- console.log(success);
- if (success.code=='00000') {
- var data = JSON.parse(success.data);
- var actionlist = data.action;
-
- if (actionlist) {
- 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 s = 0; s < $this.$data.subPanelList.length; s++) {
- for (var c = 0; c < $this.$data.subPanelList[s].subClassAttrList.length; c++) {
- var attr = $this.$data.subPanelList[s].subClassAttrList[c].Attr;
+ },
+ OKDataObjRunCustomEvent() {
+ var enviroment = {
+ 'function': '3000', // 鍔熻兘鐐圭紪鍙�+ cls_id: this.$data.param.Master_Cls.ID, // 鍔熻兘鐐逛富鏁版嵁绫绘爣璇�+ 'button': 'top', // top/bottom
+ button_name: '鏂板',
+ master: {
+ cls_id: this.$data.param.Master_Cls.ID, // button=bottom鏃�master鐨刢ls_id
+
+ }
+ };
+
+ var eventid = this.$data.edit_ok_event.scrip_id;
+ var req = [];
+ var attrlist = this.$data.classAttrList;
+ for (var i = 0; i < attrlist.length; i++) {
+ var attr = attrlist[i].Attr;
+ for (var j = 0; j < attr.length; j++) {
+ var ar = attr[j];
+ if (ar.Value == '璇烽�鎷� || ar.Value == '鈥斺�璇烽�鎷┾�鈥�) ar.Value = '';
+ if (ar.Type == '寮曠敤瀵硅薄(澶氫釜)')
+ if (ar.Value == '璇�) ar.Value = '';
+ if (ar.Type == '寮曠敤浜哄憳' || ar.Type == '寮曠敤椤圭洰')
+ req.push({
+ attr: ar.Name,
+ value: ar.ValID ? ar.ValID : ''
+ });
+ else if (ar.Type == '甯冨皵鍊�)
+ req.push({
+ attr: ar.Name,
+ value: ar.Value ? '1' : '0'
+ });
+ else
+ req.push({
+ attr: ar.Name,
+ value: ar.Value
+ });
+ }
+ }
+
+ if (this.$data.refdatastore.length > 0) {
+ for (var i = 0; i < this.$data.refdatastore.length; i++) {
+ if (!req.filter(function(s) {
+ return this.$data.refdatastore[i].attr == s.name
+ }).length) {
+ length = 1;
+ req.push({
+ 'attr': this.$data.refdatastore[i].attr,
+ 'value': this.$data.refdatastore[i].value
+ });
+ }
+ }
+ }
+ var info = {
+ eventid: eventid,
+ edtype: "0",
+ projectid: '',
+ rclsid: '',
+ robjid: '',
+ userlogin: '',
+ clsid: this.$data.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.$data.global_attr)
+ }
+ console.log(dataInfo);
+ this.$store.dispatch('DataObjRunCustomEventInfo', dataInfo).then(success => {
+ console.log(success);
+ if (success.code == '00000') {
+ var data = JSON.parse(success.data);
+ var result = data.result;
+ for (var i = 0; i < result.length; i++) {
+ // self.class_attr_ele.find('.attr_field[data-field="' + result[i].attr + '"]').val(result[i].value).data('val', result[i].value);
+ var length = 0;
+ if (!this.$data.refdatastore.filter(function(s) {
+ return result[i].attr == s.attr
+ }).length) {
+ length = 1;
+ this.$data.refdatastore.push(result[i]);
+ }
+ if (length == 0) {
+ for (var j = 0; j < this.$data.refdatastore.length; j++) {
+ if (this.$data.refdatastore[j].attr == result[i].attr) {
+ this.$data.refdatastore[j].value = result[i].value;
+ }
+ }
+ }
+ }
+
+ this.add();
+ } else {
+ uni.showModal({
+ title: "閿欒4",
+ content: success.msg,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
+ }
+ }).catch(ex => {
+ // console.log(ex);
+ uni.showModal({
+ title: "閿欒4.1",
+ content: ex.errMsg,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
+ });
+ },
+ DataObjRunCustomEvent_Return(eventid, data_attr, button_callback, index, iindex) {
+ var enviroment = {
+ 'function': '3000', // 鍔熻兘鐐圭紪鍙�+ cls_id: this.$data.param.Master_Cls.ID, // 鍔熻兘鐐逛富鏁版嵁绫绘爣璇�+ 'button': 'top', // top/bottom
+ button_name: '鏂板',
+ master: {
+ cls_id: this.$data.param.Master_Cls.ID, // button=bottom鏃�master鐨刢ls_id
+ //obj_id: '' // button=bottom鏃�master鐨刼bj_id
+ }
+ };
+ var req = [];
+ var attrlist = this.$data.classAttrList;
+ for (var i = 0; i < attrlist.length; i++) {
+ var attr = attrlist[i].Attr;
+ for (var j = 0; j < attr.length; j++) {
+ var ar = attr[j];
+ if (ar.Type == '寮曠敤瀵硅薄(澶氫釜)')
+ if (ar.Value == '璇�) ar.Value = '';
+ if (ar.Type == '寮曠敤浜哄憳' || ar.Type == '寮曠敤椤圭洰')
+ req.push({
+ attr: ar.Name,
+ value: ar.ValID ? ar.ValID : ''
+ });
+ else if (ar.Type == '甯冨皵鍊�)
+ req.push({
+ attr: ar.Name,
+ value: ar.Value ? '1' : '0'
+ });
+ else
+ req.push({
+ attr: ar.Name,
+ value: ar.Value
+ });
+ }
+ }
+ if (this.$data.refdatastore.length > 0) {
+ for (var i = 0; i < this.$data.refdatastore.length; i++) {
+ if (!req.filter(function(s) {
+ return this.$data.refdatastore[i].attr == s.name
+ }).length) {
+ length = 1;
+ req.push({
+ 'attr': this.$data.refdatastore[i].attr,
+ 'value': this.$data.refdatastore[i].value
+ });
+ }
+ }
+ }
+ var extinfo = enviroment;
+ extinfo.edit_dlg = {
+ type: 'small', //灏忕獥鍙�+ class_id: this.$data.param.Master_Cls.ID, //褰撳墠鏁版嵁绫籭d
+ }
+ 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 //寮曠敤鎸夐挳鐨則ooltip
+ }
+ }
+ var dataInfo = {
+ edtype: "0",
+ eventid: eventid,
+ projectid: '',
+ rclsid: '',
+ robjid: '',
+ userlogin: '',
+ clsid: this.$data.param.Master_Cls.ID,
+ objid: '',
+ attr: JSON.stringify(req),
+ extinfo: JSON.stringify(extinfo),
+ global_attr: JSON.stringify(this.$data.global_attr)
+ }
+ console.log(dataInfo);
+ this.$store.dispatch('DataObjRunCustomEventInfo', dataInfo).then(success => {
+ console.log(success);
+ if (success.code == '00000') {
+ var data = JSON.parse(success.data);
+ 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> ' + '鎻愮ず',
+ content: action.action_type + '姝ction灏氭湭澶勭悊锛�
+ });
+ 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.$data.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> ' + '鎻愮ず',
+ content: action.action_type + '姝ction灏氭湭澶勭悊锛�
+ });
+ 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 == '鎴戣礋璐g殑椤圭洰')
+ priRel = '1';
+ else if (action.value.select_range == '鎴戝垱寤虹殑')
+ priRel = '2';
+ else if (action.value.select_range == '鎴戝弬涓庣殑' || action.value
+ .select_range == '鎴戝弬鍔犵殑')
+ priRel = '3';
+ else if (action.value.select_range == '鎴戝叧娉ㄧ殑')
+ priRel = '4';
+ else if (action.value.select_range == '鎴戜笅灞炵殑椤圭洰')
+ priRel = '5';
+
+ var $this = this;
+ var param_ = {
+ index: index,
+ iindex: iindex,
+ button_callback: button_callback,
+ req: req
+ }
+ uni.navigateTo({
+ url: '../selPrj/index?relation=' + priRel + '¶m=' + JSON
+ .stringify(param_),
+ events: {
+ AddPer(data, param) {
+ $this.$data.classAttrList[param.index].Attr[param
+ .iindex].Value = data[0].Name;
+ $this.$data.classAttrList[param.index].Attr[param
+ .iindex].ValID = data[0].ID + ';' + data[0]
+ .Name;
+ var callback_eventid = param.button_callback.trim();
+ if (callback_eventid) {
+ var info = {
+ eventid: callback_eventid,
+ edtype: "2",
+ projectid: data[0].ID,
+ rclsid: "",
+ robjid: "",
+ userlogin: "",
+ clsid: $this.$data.param.Master_Cls.ID,
+ objid: "",
+ attr: param.req,
+ }
+
+ $this.DataObjRunCustomEvent(info);
+ }
+ }
+ }
+ });
+ } else {
+ var d = dialog({
+ title: '<i class="ace-icon fa fa-info-circle"></i> ' + '鎻愮ず',
+ content: action.action_type + '姝ction灏氭湭澶勭悊锛�
+ });
+ d.show();
+ }
+ }
+ }
+ } else {
+ uni.showModal({
+ title: "鎻愮ず5.2",
+ content: '璋冪敤 before_click_button 鑴氭湰杩斿洖绌猴紝event_id' + eventid,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
+ }
+ } else {
+ uni.showModal({
+ title: "閿欒5",
+ content: success.msg,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
+ }
+ }).catch(ex => {
+ // console.log(ex);
+ uni.showModal({
+ title: "鎻愮ず5.1",
+ content: ex.errMsg,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
+ });
+ },
+ scan_ini_DataObjRunCustomEvent(info) {
+ var param = {
+ EditStyle: this.$data.param.Sub_Cls.View_Style.Name,
+ ViewStyle: this.$data.param.Sub_Cls.View_Style.Name,
+ NotTriggerSysEvent: 0,
+ enviroment: {
+ 'function': '3000', // 鍔熻兘鐐圭紪鍙�+ cls_id: this.$data.param.Sub_Cls.ID, // 鍔熻兘鐐逛富鏁版嵁绫绘爣璇�+ 'button': 'top', // top/bottom
+ button_name: '鏂板',
+ master: {
+ cls_id: this.$data.param.Sub_Cls.ID, // button=bottom鏃�master鐨刢ls_id
+ //obj_id: '' // button=bottom鏃�master鐨刼bj_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
+ }
+ console.log(dataInfo);
+ this.$store.dispatch('DataObjRunCustomEventInfo', dataInfo).then(success => {
+ console.log(success);
+ if (success.code == '00000') {
+ var data = JSON.parse(success.data);
+ var actionlist = data.action;
+ if (actionlist) {
+ for (var j = 0; j < actionlist.length; j++) {
+ var action = actionlist[j]
+ var action_type = action.action_type;
+ var value = action.value;
+ if (action_type == 'set_dlg_attr') {
+ if (value) {
+ var val = value;
+ if (typeof value == 'string') {
+ val = JSON.parse(value);
+ }
+ console.log(val);
+ for (var i = 0; i < val.length; i++) {
+ for (var a = 0; a < this.$data.subClassAttrList.length; a++) {
+ for (var l = 0; l < this.$data.subClassAttrList[a].Attr
+ .length; l++) {
+ var ca = this.$data.subClassAttrList[a].Attr[l];
+ if (val[i].attr == ca.Name) {
+ if (ca.Type == '瀛楀吀' || ca.Type == '瀛楀吀-瀛楃涓� || ca.Type ==
+ '瀛楀吀-鏁存暟') {
+ var dictItemList = [];
+ for (var d in val[i].choice_list) {
+ var val = val[i].choice_list[d];
+ dictItemList.push({
+ "CN_S_NAME": val,
+ "Name": val,
+ "label": val,
+ "value": val
+ });
+
+ }
+ ca.dictitem = dictItemList;
+ // attr[j].dictitem = val[i].choice_list;
+ } else {
+ // ca.value = val[i].value;
+ }
+ }
+ }
+ }
+
+ var length = 0;
+ if (!this.$data.refdatastore.filter(function(s) {
+ return val[i].attr == s.attr
+ }).length) {
+ length = 1;
+ this.$data.refdatastore.push(val[i]);
+ }
+ if (length == 0) {
+ for (var j = 0; j < this.$data.refdatastore.length; j++) {
+ if (this.$data.refdatastore[j].attr == val[i].attr) {
+ this.$data.refdatastore[j].value = val[i].value;
+ }
+ }
+ }
+ }
+ }
+ }
+ if (action_type == 'open_select_userdlg') {
+ uni.showModal({
+ title: "閿欒6.2",
+ content: "open_select_userdlg杩欎釜action_type杩樻湭澶勭悊锛�,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
+ }
+ }
+ }
+
+ } else {
+ uni.showModal({
+ title: "閿欒6",
+ content: success.msg,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
+ }
+ }).catch(ex => {
+ // console.log(ex);
+ uni.showModal({
+ title: "閿欒6.1",
+ content: ex.errMsg,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
+ });
+ },
+ scan_DataObjRunCustomEvent(info, data_attr) {
+ var $this = this;
+ var enviroment = {};
+ if(info.enviroment){
+ enviroment = info.enviroment;
+ } else {
+ enviroment = {
+ 'function': '3000', // 鍔熻兘鐐圭紪鍙�+ cls_id: 'MBOX', //this.$data.param.Sub_Cls.ID, // 鍔熻兘鐐逛粠鏁版嵁绫绘爣璇�+ 'button': 'top', // top/bottom
+ button_name: '鏂板',
+ edit_dlg: {
+ type: 'small', //灏忕獥鍙�+ class_id: 'MBOX', //this.$data.param.Sub_Cls.ID,//褰撳墠鏁版嵁绫籭d
+ },
+ master: {
+ cls_id: 'MBOX',//self.options.ExtParam.Sub_Cls.ID, // button=bottom鏃�master鐨刢ls_id
+ attr: info.mast_attr //涓绘暟鎹被灞炴�
+ //objs_id: '' // button=bottom鏃�master鐨刼bj_id
+ }
+ };
+
+ }
+ var global_attr = this.$data.global_attr;
+ if (info.global_attr) {
+ global_attr = info.global_attr;
+ }
+ 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: JSON.stringify(info.inputParamter),
+ global_attr: JSON.stringify(global_attr)
+ }
+ console.log(dataInfo);
+ this.$store.dispatch('DataObjRunCustomEventInfo', dataInfo).then(success => {
+ console.log(success);
+ if (success.code == '00000') {
+ var data = JSON.parse(success.data);
+ var actionlist = data.action;
+
+ if (actionlist) {
+ console.log(actionlist);
+ for (var ii = 0; ii < actionlist.length; ii++) {
+ var action = actionlist[ii];
+ if (action.action_type == 'set_dlg_attr') {
+ var result = action.value;
+ for (var i = 0; i < result.length; i++) {
+ if (result[i].choice_list) {
+ for (var s = 0; s < $this.$data.subPanelList.length; s++) {
+ for (var c = 0; c < $this.$data.subPanelList[s].subClassAttrList
+ .length; c++) {
+ var attr = $this.$data.subPanelList[s].subClassAttrList[c]
+ .Attr;
for (var j = 0; j < attr.length; j++) {
- if(attr[j].Name==result[i].attr){
- if(attr[j].Type=='瀛楀吀' || attr[j].Type=='瀛楀吀-瀛楃涓�){
- var dictItemList=[];
- for(var d in result[i].choice_list){
- var val =result[i].choice_list[d];
- dictItemList.push({"CN_S_NAME":val,"Name":val,"label":val,"value":val});
+ if (attr[j].Name == result[i].attr) {
+ if (attr[j].Type == '瀛楀吀' || attr[j].Type == '瀛楀吀-瀛楃涓� ||
+ attr[j].Type == '瀛楀吀-鏁存暟') {
+ var dictItemList = [];
+ for (var d in result[i].choice_list) {
+ var val = result[i].choice_list[d];
+ dictItemList.push({
+ "CN_S_NAME": val,
+ "Name": val,
+ "label": val,
+ "value": val
+ });
}
attr[j].dictitem = dictItemList;
// attr[j].dictitem = result[i].choice_list;
@@ -2115,110 +3655,532 @@
}
}
}
- }
- }
- for (var s = 0; s < $this.$data.subPanelList.length; s++) {
- for (var c = 0; c < $this.$data.subPanelList[s].subClassAttrList.length; c++) {
- var attr = $this.$data.subPanelList[s].subClassAttrList[c].Attr;
- for (var j = 0; j < attr.length; j++) {
- console.log(attr[j].Name+'=='+result[i].attr);
- if(attr[j].Name==result[i].attr){
- attr[j].Value = result[i].value;
- }
- }
- }
- }
- var length = 0;
- if (!$this.$data.refdatastore.filter(function (s) {
- return result[i].attr == s.attr
- }).length) {
- length = 1;
- $this.$data.refdatastore.push(result[i]);
- }
- if (length == 0) {
- for (var j = 0; j < $this.$data.refdatastore.length; j++) {
- if ($this.$data.refdatastore[j].attr == result[i].attr) {
- $this.$data.refdatastore[j].value = result[i].value;
- }
- }
- }
- }
- } else if (data.action[i].action_type == 'set_global_attr') {
- $this.$data.global_attr = data.action[i].value || [];
- } else if (data.action[i].action_type == 'add_subcls_panel') {
- var result = action.value;
- for (var i = 0; i < result.length; i++) {
+ }
+ }
for (var s = 0; s < $this.$data.subPanelList.length; s++) {
- for (var c = 0; c < $this.$data.subPanelList[s].subClassAttrList.length; c++) {
+ for (var c = 0; c < $this.$data.subPanelList[s].subClassAttrList
+ .length; c++) {
var attr = $this.$data.subPanelList[s].subClassAttrList[c].Attr;
for (var j = 0; j < attr.length; j++) {
- console.log(attr[j].Name+'=='+result[i].attr);
- if(attr[j].Name==result[i].attr){
+ console.log(attr[j].Name + '==' + result[i].attr);
+ if (attr[j].Name == result[i].attr) {
attr[j].Value = result[i].value;
}
}
}
}
var length = 0;
- if (!$this.$data.refdatastore.filter(function (s) {
- return result[i].attr == s.attr
- }).length) {
- length = 1;
- $this.$data.refdatastore.push(result[i]);
+ if (!$this.$data.refdatastore.filter(function(s) {
+ return result[i].attr == s.attr
+ }).length) {
+ length = 1;
+ $this.$data.refdatastore.push(result[i]);
}
if (length == 0) {
- for (var j = 0; j < $this.$data.refdatastore.length; j++) {
- if ($this.$data.refdatastore[j].attr == result[i].attr) {
- $this.$data.refdatastore[j].value = result[i].value;
- }
- }
+ for (var j = 0; j < $this.$data.refdatastore.length; j++) {
+ if ($this.$data.refdatastore[j].attr == result[i].attr) {
+ $this.$data.refdatastore[j].value = result[i].value;
+ }
+ }
}
}
- }
- }
- }
-
- if (data.result) {
- var result = data.result;
- for (var i = 0; i < result.length; i++) {
- for (var s = 0; s < $this.$data.subPanelList.length; s++) {
- for (var c = 0; c < $this.$data.subPanelList[s].subClassAttrList.length; c++) {
- var attr = $this.$data.subPanelList[s].subClassAttrList[c].Attr;
- for (var j = 0; j < attr.length; j++) {
- console.log(attr[j].Name+'=='+result[i].attr);
- if(attr[j].Name==result[i].attr){
- attr[j].Value = result[i].value;
- }
- }
- }
- }
-
- var length = 0;
- if (!$this.$data.refdatastore.filter(function (s) {
- return result[i].attr == s.attr
- }).length) {
- length = 1;
- $this.$data.refdatastore.push(result[i]);
- }
- if (length == 0) {
- for (var j = 0; j < $this.$data.refdatastore.length; j++) {
- if ($this.$data.refdatastore[j].attr == result[i].attr) {
- $this.$data.refdatastore[j].value = result[i].value;
- }
- }
- }
- }
- }
- }else{
- uni.showModal({title:"閿欒3",content:success.msg,showCancel:false,confirmText:"鍙栨秷"});
- }
- }).catch(ex=>{
- // console.log(ex);
- uni.showModal({title:"閿欒3.1",content:ex.errMsg,showCancel:false,confirmText:"鍙栨秷"});
- });
- },
-
-
+ } else if (action.action_type == 'set_global_attr') {
+ $this.$actiontr = action.value || [];
+ } else if (action.action_type == 'open_common_dlg') { //鎵撳紑渚ф粦寮规
+ var $this = this;
+ if (action.value.common_dlg_id == 'check_list') {
+ $this.$data.check_list = action.value.config;
+ if (action.value.config.appear_style == 'sideslip') //鍒ゆ柇鏄惁鏄晶婊�+ $this.$data.popupType = 'right';
+ else
+ $this.$data.popupType = 'center'
+ // open 鏂规硶浼犲叆鍙傛暟 绛夊悓鍦�uni-popup 缁勪欢涓婄粦瀹�type灞炴�
+ $this.$refs.popup.open($this.$data.popupType);
+ }
+ } else if (action.action_type == 'add_subcls_panel') { //涓讳粠鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�+ var result = action.value;
+ var $this = this;
+ let list_1 = JSON.parse(JSON.stringify(this.$data.subClassAttrList));
+ var scanCodeVal = $this.$data.scanCodeVal;
+ var rand = '';
+ for (var i = 0; i < 5; i++) { //鐢熸垚5浣嶉殢鏈烘暟
+ rand += Math.floor(Math.random() * 10);
+ }
+ if (info.inputParamter[0].attr) {
+ if (info.inputParamter[0].attr == "mast_input_3037") //鍒ゆ柇鏄富鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�+ scanCodeVal = "mast_input_3037-" + rand;
+ }
+ if (info.attr[0].attr) {
+ if (info.attr[0].attr == "mast_input_3037") //鍒ゆ柇鏄富鏁版嵁绫绘壂鐮佹煡璇㈡暟鎹�+ scanCodeVal = "mast_input_3037-" + rand;
+ }
+ $this.$data.subPanelList.push({
+ scanCodeVal: scanCodeVal,
+ subClassAttr: list_1
+ });
+ for (var i = 0; i < result.length; i++) {
+ for (var s = 0; s < $this.$data.subPanelList.length; s++) {
+ if ($this.$data.subPanelList[s].scanCodeVal == scanCodeVal) {
+ if (result[i].attr == "S_ID")
+ $this.$data.subPanelList[s].ObjID = result[i].value;
+ var _subClassAttr = $this.$data.subPanelList[s].subClassAttr;
+ for (var c = 0; c < _subClassAttr.length; c++) {
+ var attr = _subClassAttr[c].Attr;
+ for (var j = 0; j < attr.length; j++) {
+ // console.log(attr[j].Name+'=='+result[i].attr);
+ if (attr[j].Name == result[i].attr) {
+ attr[j].Value = result[i].value;
+ }
+ }
+ }
+
+ // $this.$data.subPanelList[s].subClassAttr=list_1;
+ }
+ }
+ var length = 0;
+ if (!$this.$data.refdatastore.filter(function(s) {
+ return result[i].attr == s.attr
+ }).length) {
+ length = 1;
+ $this.$data.refdatastore.push(result[i]);
+ }
+ if (length == 0) {
+ for (var j = 0; j < $this.$data.refdatastore.length; j++) {
+ if ($this.$data.refdatastore[j].attr == result[i].attr) {
+ $this.$data.refdatastore[j].value = result[i].value;
+ }
+ }
+ }
+ }
+ }
+
+ }
+ }
+
+ if (data.result) {
+ let list_1 = JSON.parse(JSON.stringify(this.$data.subClassAttrList));
+ var scanCodeVal = $this.$data.scanCodeVal;
+ if (info.inputParamter[0].attr == "mast_input_3037")
+ scanCodeVal = "mast_input_3037-" + ii;
+ $this.$data.subPanelList.push({
+ scanCodeVal: scanCodeVal,
+ subClassAttr: list_1
+ });
+ var result = data.result;
+ for (var i = 0; i < result.length; i++) {
+ for (var s = 0; s < $this.$data.subPanelList.length; s++) {
+ if ($this.$data.subPanelList[s].scanCodeVal == scanCodeVal) {
+ if (result[i].attr == "S_ID")
+ $this.$data.subPanelList[s].ObjID = result[i].value;
+ var _subClassAttr = $this.$data.subPanelList[s].subClassAttr;
+ for (var c = 0; c < _subClassAttr.length; c++) {
+ var attr = _subClassAttr[c].Attr;
+ for (var j = 0; j < attr.length; j++) {
+ // console.log(attr[j].Name+'=='+result[i].attr);
+ if (attr[j].Name == result[i].attr) {
+ attr[j].Value = result[i].value;
+ }
+ }
+ }
+ }
+ }
+
+ var length = 0;
+ if (!$this.$data.refdatastore.filter(function(s) {
+ return result[i].attr == s.attr
+ }).length) {
+ length = 1;
+ $this.$data.refdatastore.push(result[i]);
+ }
+ if (length == 0) {
+ for (var j = 0; j < $this.$data.refdatastore.length; j++) {
+ if ($this.$data.refdatastore[j].attr == result[i].attr) {
+ $this.$data.refdatastore[j].value = result[i].value;
+ }
+ }
+ }
+ }
+ }
+ } else {
+ uni.showModal({title: "閿欒7",content: success.msg,showCancel: false,confirmText: "鍙栨秷"});
+ }
+ }).catch(ex => {
+ // console.log(ex);
+ uni.showModal({title: "閿欒7.1",content: ex.errMsg,showCancel: false,confirmText: "鍙栨秷"});
+ });
+ },
+ scan_OKDataObjRunCustomEvent(eventID) {
+ uni.showLoading({title: "鍔犺浇涓�..",mask: true});
+ var $this = this;
+ var req = [];
+ var attrlist = $this.$data.classAttrList;
+ for (var i = 0; i < attrlist.length; i++) {
+ var attr = attrlist[i].Attr;
+ for (var j = 0; j < attr.length; j++) {
+ var ar = attr[j];
+ if (ar.Value == '璇烽�鎷� || ar.Value == '鈥斺�璇烽�鎷┾�鈥�) ar.Value = '';
+ if (ar.Type == '寮曠敤瀵硅薄(澶氫釜)')
+ if (ar.Value == '璇�) ar.Value = '';
+ if (ar.Type == '寮曠敤浜哄憳' || ar.Type == '寮曠敤椤圭洰')
+ req.push({
+ attr: ar.Name,
+ value: ar.ValID ? ar.ValID : ''
+ });
+ else if (ar.Type == '甯冨皵鍊�)
+ req.push({
+ attr: ar.Name,
+ value: ar.Value ? '1' : '0'
+ });
+ else 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];
+ }
+ req.push({
+ attr: ar.Name,
+ value: valStr
+ });
+ } else
+ req.push({
+ attr: ar.Name,
+ value: ar.Value
+ });
+ } else
+ 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: "鎻愮ず",
+ content: ar.DispName + '涓嶈兘涓虹┖锛�,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
+ return;
+ }
+ }
+ }
+ var objects = [];
+ var subPanelList = $this.$data.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 (ar.Type == '寮曠敤瀵硅薄(澶氫釜)')
+ if (ar.Value == '璇�) ar.Value = '';
+ if (ar.Type == '寮曠敤浜哄憳' || ar.Type == '寮曠敤椤圭洰')
+ sub_req.push({
+ attr: ar.Name,
+ value: ar.ValID ? ar.ValID : ''
+ });
+ else if (ar.Type == '甯冨皵鍊�)
+ sub_req.push({
+ attr: ar.Name,
+ value: ar.Value ? '1' : '0'
+ });
+ else 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({
+ 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: "鎻愮ず",
+ content: ar.DispName + '涓嶈兘涓虹┖锛�,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
+ return;
+ }
+ }
+ }
+ objects.push({
+ obj_id: subPanelList[s].scanCodeVal,
+ obj_attrs: sub_req
+ });
+ }
+ var dataJson = {
+ master_cls: {
+ cls_name: 'MBOX', //$this.$data.param.Master_Cls.Name,
+ obj_attrs: req
+ },
+ input_3037: $this.$data.scanCodeVal, //鎵爜鍐呭
+ op_type: $this.$data.param.OperationType, //浣滀笟绫诲瀷瀹氫箟
+ sub_cls: {
+ cls_name: 'MBOX', //$this.$data.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.$data.global_attr),
+ dataJson: JSON.stringify(dataJson)
+ }
+ // console.log(JSON.stringify(dataInfo));
+ console.log(dataInfo);
+ this.$store.dispatch('DataObjRunCustomEventInfo', dataInfo).then(success => {
+ console.log(success);
+ uni.hideLoading();
+ if (success.code == '00000') {
+ var data = JSON.parse(success.data);
+ var result = data.result;
+ if (eventID != $this.$data.param.After_OK_Event.ID)
+ $this.scan_OKDataObjRunCustomEvent($this.$data.param.After_OK_Event.ID);
+ else {
+ //鍒锋柊
+ uni.redirectTo({
+ url: '../modal/ms_classAttr?param=' + JSON.stringify($this.$data.param) +
+ "&titlename=" + $this.$data.title
+ });
+ }
+ } else {
+ uni.showModal({
+ title: "閿欒8",
+ content: success.msg,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
+ }
+ }).catch(ex => {
+ // console.log(ex);
+ uni.hideLoading();
+ uni.showModal({
+ title: "閿欒8.1",
+ content: ex.errMsg,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
+ });
+ },
+ scan_TriggerDataObjRunCustomEvent(eventID) {
+ uni.showLoading({title: "鍔犺浇涓�..",mask: true});
+ var $this = this;
+ var req = [];
+ var attrlist = $this.$data.classAttrList;
+ for (var i = 0; i < attrlist.length; i++) {
+ var attr = attrlist[i].Attr;
+ for (var j = 0; j < attr.length; j++) {
+ var ar = attr[j];
+ if (ar.Value == '璇烽�鎷� || ar.Value == '鈥斺�璇烽�鎷┾�鈥�) ar.Value = '';
+ if (ar.Type == '寮曠敤瀵硅薄(澶氫釜)')
+ if (ar.Value == '璇�) ar.Value = '';
+ if (ar.Type == '寮曠敤浜哄憳' || ar.Type == '寮曠敤椤圭洰')
+ req.push({
+ attr: ar.Name,
+ value: ar.ValID ? ar.ValID : ''
+ });
+ else if (ar.Type == '甯冨皵鍊�)
+ req.push({
+ attr: ar.Name,
+ value: ar.Value ? '1' : '0'
+ });
+ else 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];
+ }
+ req.push({
+ attr: ar.Name,
+ value: valStr
+ });
+ } else
+ req.push({
+ attr: ar.Name,
+ value: ar.Value
+ });
+ } else
+ 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: "鎻愮ず",
+ content: ar.DispName + '涓嶈兘涓虹┖锛�,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
+ return;
+ }
+ }
+ }
+ var objects = [];
+ var subPanelList = $this.$data.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 (ar.Type == '寮曠敤瀵硅薄(澶氫釜)')
+ if (ar.Value == '璇�) ar.Value = '';
+ if (ar.Type == '寮曠敤浜哄憳' || ar.Type == '寮曠敤椤圭洰')
+ sub_req.push({
+ attr: ar.Name,
+ value: ar.ValID ? ar.ValID : ''
+ });
+ else if (ar.Type == '甯冨皵鍊�)
+ sub_req.push({
+ attr: ar.Name,
+ value: ar.Value ? '1' : '0'
+ });
+ else 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({
+ 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: "鎻愮ず",
+ content: ar.DispName + '涓嶈兘涓虹┖锛�,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
+ return;
+ }
+ }
+ }
+ objects.push({
+ obj_id: subPanelList[s].scanCodeVal,
+ obj_attrs: sub_req
+ });
+ }
+ var dataJson = {
+ master_cls: {
+ cls_name: 'MBOX', //$this.$data.param.Master_Cls.Name,
+ obj_attrs: req
+ },
+ input_3037: $this.$data.scanCodeVal, //鎵爜鍐呭
+ op_type: $this.$data.param.OperationType, //浣滀笟绫诲瀷瀹氫箟
+ sub_cls: {
+ cls_name: 'MBOX', //$this.$data.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.$data.global_attr),
+ dataJson: JSON.stringify(dataJson)
+ }
+ // console.log(JSON.stringify(dataInfo));
+ console.log(dataInfo);
+ this.$store.dispatch('DataObjRunCustomEventInfo', dataInfo).then(success => {
+ console.log(success);
+ uni.hideLoading();
+ if (success.code == '00000') {
+ var data = JSON.parse(success.data);
+ var result = data.result;
+ if (eventID != $this.$data.param.After_Trigger_Event.ID)
+ $this.scan_TriggerDataObjRunCustomEvent($this.$data.param.After_Trigger_Event.ID);
+ else {
+ //鍒锋柊
+ uni.redirectTo({
+ url: '../modal/ms_classAttr?param=' + JSON.stringify($this.$data.param) +
+ "&titlename=" + $this.$data.title
+ });
+ }
+ } else {
+ uni.showModal({
+ title: "閿欒8",
+ content: success.msg,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
+ }
+ }).catch(ex => {
+ // console.log(ex);
+ uni.hideLoading();
+ uni.showModal({
+ title: "閿欒8.1",
+ content: ex.errMsg,
+ showCancel: false,
+ confirmText: "鍙栨秷"
+ });
+ });
+ },
+
+
}
}
-</script>
+</script>
\ No newline at end of file
--
Gitblit v1.9.1