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

63 lines
1.9 KiB
Plaintext

@{
ViewBag.Title = "编辑描述";
Layout = "~/Views/Shared/_InfoLayout.cshtml";
}
@section CSS{
<style>
#container {
min-height: 280px;
}
.send-content-item {
display: block;
margin-top: 20px;
}
.check-input {
margin: 0 50px 0 10px !important;
}
</style>
}
@section JS{
<script type="text/javascript" src="/Scripts/ueditor/ueditor.config.js?v=@(HtmlUtil.JsVersion)"></script>
<script type="text/javascript" src="/Scripts/ueditor/ueditor.all.min.js?v=@(HtmlUtil.JsVersion)"></script>
<script type="text/javascript">
$(document).ready(function () {
var ue = makeUeEditor('container');
ue.ready(function () {//编辑器初始化完成再赋值
ue.setContent($("#descHidden").val()); //赋值给UEditor
});
});
function savedesc() {
var ue = UE.getEditor('container');
main.post("/valuedate/saveClientDesc", { data: ue.getContent() }).done(function (res) {
setTimeout(function () { parent.location.reload() }, 1000);
});
}
function makeUeEditor(id) {
UE.delEditor(id);
var ue = UE.getEditor(id, {
autoHeight: false,
wordCount: false,
});
return ue;
}
</script>
}
<div class="toolbarDiv">
<div class="form-group">
<h3>客户端声明:</h3>
<div style="margin-top: 20px;">
<script id="container" type="text/plain">
</script>
</div>
</div>
<input type="hidden" id="descHidden" value="@ViewBag.ClientDesc" />
<input type="button" class="btn btn-primary" style="margin-top: 20px;" value="保存" onclick="savedesc()" />
<input type="button" class="btn btn-primary" style="margin-top: 20px;" value="关闭" onclick="window.parent.layer.closeAll();" />
</div>