123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278 |
- @{
- ViewBag.Title = "Transpond";
- Layout = "~/Views/Shared/_Layout.cshtml";
- }
- @using MES.Production.Service;
- @using Central.Control.Domain;
- @using Ant.Service.Common;
- @using Ant.Service.Common.Enums;
- @model SYS_MSG
- @{
- var attach = ViewData["Attach"] == null ? "" : ViewData["Attach"] as dynamic;
- }
- <style>
- .changeicon {
- float: right;
- margin-right: -15px;
- position: absolute;
- right: -7px;
- top: 0px;
- border: none;
- background-color: #18a689;
- color: #FFFFFF;
- line-height: 40px;
- height: 40px;
- }
- .col-lg-3 {
- width: 12% !important;
- }
- .f-hafl .col-hafl .col-lg-3 {
- width: 24% !important;
- }
- .col-lg-8 ul {
- width: 100%;
- margin-top: 4px;
- padding: 0px;
- }
- .col-lg-8 ul li {
- width: 100px;
- height: 100px;
- float: left;
- list-style: none;
- line-height: 100px;
- margin-bottom: 10px;
- margin-right: 10px;
- border: 1px solid #f8ac59;
- }
- .col-lg-8 ul li img {
- width: 100px;
- height: 75px;
- margin-top: 0px;
- vertical-align: top;
- }
- .col-lg-8 ul li span {
- height: 25px;
- line-height: 25px;
- background-color: #f8ac59;
- float: left;
- width: 100px !important;
- margin-top: -25px;
- }
- .col-lg-8 ul li span .remove {
- margin-right: 5px;
- color: #ffffff;
- float: right;
- }
- .col-lg-8 ul li span .set {
- margin-left: 5px;
- color: #ffffff;
- float: left;
- }
- .imgactive {
- color: #1ab394 !important;
- }
- .col-lg-8 ul li span a:hover {
- text-decoration: underline;
- color: #1ab394;
- }
- #tab_attach thead tr th {
- font-size: 14px;
- font-weight: bold;
- border: 1px solid #1ab394;
- text-align: center;
- }
- #tab_attach tbody tr td {
- border: 1px solid #1ab394;
- padding: 5px;
- }
- #tab_attach tbody tr td span {
- cursor: pointer;
- }
- #tab_attach tbody tr td span:hover {
- cursor: pointer;
- text-decoration: underline;
- }
- #tab_attach tbody tr td:first-child, #tab_attach tbody tr td:last-child {
- text-align: center;
- }
- </style>
- @using (Ajax.BeginForm("Save", null, new AjaxOptions()
- {
- HttpMethod = "Post",
- OnBegin = "SubInfo.Loading",
- OnComplete = "SubInfo.Complate",
- OnFailure = "SubInfo.Failure",
- OnSuccess = "SubInfo.Success",
- }, new { @class = "form-horizontal dig-from" }))
- {
- <div class="row white-bg animated fadeInRight">
- <div class="wrapper-content">
- <div class="col-sm-12" style="padding:5px 5px 10px 0px;">
- <ol class="breadcrumb" style="float:right;color:#ffffff;">
- <li><button class="btn btn-primary p310" type="submit" action="save"><i class=" fa fa-check"></i> <span>发送</span></button></li>
- <li style="float:right; margin-right:5px; margin-left:5px;" id="btn-dig-close"><a class="btn btn-warning p310"><i class="im-undo2"></i> 返回</a></li>
- </ol>
- </div>
- <div class="panel-body">
- <div class="tab-content">
- <div id="tab-1" class="tab-pane active">
- <div class="form-group">
- <label class="col-lg-3 control-label">标题:</label>
- <div class="col-lg-8">
- @Html.TextBox("MSGNAME", Model.MSGNAME, new { @class = "form-control", @placeholder = "请输入标题", @maxlength = "200", @datatype = "*1-200", @nullmsg = "请输入标题!", @errormsg = "请输入标题!最长不能超过200个字符" })
- </div>
- </div>
- <div class="form-group">
- <label class="col-lg-3 control-label">接收人员:</label>
- <div class="col-lg-8">
- <span id="senduser" class="form-control" style="padding:5px 5px;min-height:40px; height:auto; font-size:14px;">
- </span>
- @Html.Hidden("hidsendUserid", null)
- <button class="changeicon" id="changesendUser" type="button">
- 选择
- </button>
- </div>
- </div>
- <div class="form-group">
- <label class="col-lg-3 control-label">内容:</label>
- <div class="col-sm-10">
- @Html.TextArea("MSGCONTENT", (Model.MSGCONTENT == null ? Model.MSGCONTENT : Model.MSGCONTENT), new { @rows = "3", @cols = "5" })
- </div>
- </div>
- <div class="form-group">
- <label class="col-lg-3 control-label">定时发送:</label>
- <div class="col-lg-8">
- @Html.TextBox("SendTimer", null, new { @class = "form-control", @maxlength = "12", @onclick = "ldate('SendTimer','YYYY-MM-DD hh:mm:ss')", @style = "width:240px;float:left;" })
- <label class="checkbox-inline" style="margin-left:25px;">
- <input type="checkbox" class="i-check" id="ismsg" />短信通知审批人
- </label>
- </div>
- </div>
- <div class="form-group">
- <label class="col-lg-3 control-label">附件 :</label>
- <div class="col-lg-8">
- <span class="input-group-btn"><button type="button" class="btn btn-sm btn-primary" id="upattch"><i class="im-plus"></i> 添加附件 </button> </span>
- <table id="tab_attach" cellpadding="0" width="100%" style="border: 1px solid #65CEA7; margin-top: 10px; ">
- <thead>
- <tr>
- <th style="width:50px;">操作</th>
- <th style="width:150px;">上传时间</th>
- <th style="width:80px;">上传者</th>
- <th>名称</th>
- <th style="width:70px;">大小</th>
- </tr>
- </thead>
- <tbody id="tbAttch">
- @{
- //处理附件
- if (attach != null)
- {
- foreach (var item in attach)
- {
- <tr>
- <td></td>
- <td>@item.UPTIME</td>
- <td>@item.UPOPEATOR</td>
- <td>
- <a href="@item.UPFILEPATH" target="_blank">@item.UPOLDNAME</a>
- <input type="hidden" name="attchs" value="@item.UPFILEPATH" />
- </td>
- <td>@item.UPFILESIZE.ToString()@item.UPFILEUNIT</td>
- </tr>
- }
- }
- }
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- }
- <script type="text/javascript" src="/ueditor/ueditor.config.js"></script>
- <script type="text/javascript" src="/ueditor/ueditor.all.min.js"></script>
- <script type="text/javascript">
- var ue = UE.ui.Editor({ initialFrameHeight: 500 });
- ue.render('MSGCONTENT');
- </script>
- @section scripts{
- <script type="text/javascript">
- $('#changesendUser').click(function () {
- var vals = $('#hidUserid').val();
- dig.addModel('添加/编辑用户', '/Sys/User/SelectUser?userid=' + vals, 900, 500, function () {
- if (this.returnValue != 'no') {
- $('#hidsendUserid').val(this.returnValue.split('|')[0]);
- $('#senduser').html(this.returnValue.split('|')[1]);
- }
- });
- });
- //移除
- function removeimg(t) {
- $('#' + t).parent().parent().remove();
- };
- //上传附件
- $('#upattch').click(function () {
- dig.upload('', function () {
- var retval = this.returnValue;
- if (retval != '') {
- json = JSON.parse(retval);
- var num = $('#upattch').find('tr').length;
- //自动增加附件记录
- var html = '<tr>';
- html += '<td><span id="attch"' + num + ' onclick="javascript:removeimg(this.id)">移除</span></td>';
- html += '<td>' + json.uptime + '</td>';
- html += '<td>' + json.operator + '</td>';
- html += '<td><a href="' + json.path + '" target="_blank">' + json.oldname + '</a>';
- html += '<input type="hidden" name="attchs" value="' + json.path + '"/></td>';
- html += ' <td>' + json.unitsize + '</td></tr>';
- $('#tbAttch').append(html);
- }
- });
- });
- //提交
- var SubInfo = {
- Loading: function () {
- $(".btn-save").attr("disabled", "disabled").find("span").html("正在发送中...")
- },
- Success: function (result) {
- if (result.Status == undefined) {
- document.writeln(result);
- } else if (result.Status == "y") {
- dig.alertSuccess('提示', result.Msg, function () {
- location.href = "/Sys/Msg/Index";
- });
- } else {
- dig.alertError("错误提示:", result.Msg);
- }
- SubInfo.Complete();
- },
- Failure: function () {
- dig.alertError("错误提示:", "网络超时,请稍后再试...");
- SubInfo.Complete();
- },
- Complete: function () {
- $(".btn-save").attr("disabled", false).find("span").html("确认发送");
- }
- };
- </script>
- }
|