Files
zszq-trs/YLErpWeb/Views/client/_ClientViewFields.cshtml
T
2024-05-09 14:06:26 +08:00

110 lines
4.4 KiB
Plaintext

@using YLErp.Modules.SystemModule
@model EditFieldViewModel
@{
Layout = null;
var colIndex = 0;
var itemClass = "none";
var list = ClientEditConfigService.GetFlatList(Model.fields, out var cols);
var isGuoJun = PS.Config.IsGuoJun;
var hasCustomerNo = false;
if (Model.fields != null && Model.fields.Any())
{
hasCustomerNo = Model.fields.Any(p => "客户编号".Equals(p.label));
}
}
<div class="row no-gutters view-wrap">
@foreach (var f in list)
{
if (f != null && !f.visible)
{
continue;
}
colIndex++;
@if (f != null &&f.name== "LicenseValidTimeStr")
{
<div class="col" style="height: auto;">
<div class="row maxheight view-item @(itemClass)">
<label class="col-auto maxheight">{{labelText('@(f.name)','@(f.label)')}}</label>
<div class="col maxheight" >@(ViewBag.LicenseValidTimeStr) </div>
</div>
</div>
if (colIndex == cols)
{
colIndex = 0;
itemClass = itemClass == "none" ? "striped" : "none";
<div class="col-12 maxheight"></div>
}
continue;
}
<div class="col" style="height: auto; ">
<div class="row maxheight view-item @(itemClass)" data-name="@(f?.name)">
@if (f != null)
{
f.visible = f.layout != "row";
<label class="col-auto maxheight">{{labelText('@(f.name)','@(f.label)')}}</label>
//展示默认根据内容调整高度
if (f.name == "ProxyEmailPwd")
{
<div class="col maxheight" data-name="@(f.name)">
<div style="width:66px" id="ProxyEmailPwd" class="maxheight" v-if="client.@(f.name)!=null&&client.@(f.name)!=''">
******
<i class="glyphicon glyphicon-eye-open maxheight" aria-hidden="true" title="查看密码" v-on:click="showPassword" style="cursor:pointer"></i>
</div>
</div>
}
else
{
<div class="col maxheight" data-name="@(f.name)" >{{client.@(f.name)}}</div>
}
if (f.name == "EvaluateDate")
{
<i class="glyphicon glyphicon-th-list maxheight" aria-hidden="true" v-on:click="showAssessmentHistoryLog" v-if="client.@(f.name)!=null" title="历史评估记录"></i>
}
}
else
{
<label class="col-auto maxheight">&nbsp;</label>
<div class="col maxheight">&nbsp;</div>
}
</div>
</div>
if (colIndex == cols)
{
colIndex = 0;
itemClass = itemClass == "none" ? "striped" : "none";
<div class="col-12 maxheight"></div>
}
}
@if (hasCustomerNo && CurUser.客户管理.客户标签查看权限)
{
<div class="col-12" style="height: auto;">
<div data-name="Tag" class="row maxheight view-item @(itemClass=="none"?"striped":"none")">
<label class="col-auto maxheight">标签</label>
<div data-name="Tag" class="col maxheight tag-context" style="line-height:36px;text-align:left;padding-left:0.75rem;">
@if (Model.Tags != null && Model.Tags.Any())
{
foreach (var tag in Model.Tags)
{
<span class="tag-item" data-id="@tag.Id" data-name="@tag.Name">
<span class="tag-text" data-value="@tag.Id">@tag.Name</span>
@if (CurUser.客户管理.客户标签调整权限)
{
<span class="tag-remove" onclick="DeleteTag('@tag.Name')">x</span>
}
</span>
}
}
@if (CurUser.客户管理.客户标签调整权限)
{
<span class="tag-add">+</span>
}
</div>
</div>
</div>
}
</div>