让你震惊的代码

时间:2024-03-10 09:13:42
   1 @using FX.OA.MVCControls;
   2 @using FX.Component.Workflow.Service;
   3 @using FX.OA.Facade.WorkFlow;
   4 @using FX.OA.Entity.Domain;
   5 @using FX.OA.Model.Workflow;
   6 @using FX.OA.Facade.Business;
   7 @using FX.OA.JHWebSite.Models;
   8 
   9 @model TSwViewModel
  10 
  11 @{
  12     Layout = "~/Views/Shared/BillLayout.cshtml";
  13     WorkFlowFacadeEncap wfEncap = new WorkFlowFacadeEncap();
  14     TransferFacade tfFacade = new TransferFacade();
  15 }
  16 <style type="text/css">
  17     ul,li{list-style-type:none; padding:0;margin:0;}
  18         img{border:0;}
  19 
  20     body{ background:none; width:98%;}
  21     body,.SubContainer,form{overflow-x:hidden;}
  22     table *{padding:0;margin:0;}
  23     table
  24     {
  25         border-collapse: collapse;
  26         border: 0;
  27     }
  28     #tbMain td
  29     {
  30         border-top: 1px solid red;
  31         border-bottom: 1px solid red;
  32         text-align: center;
  33         line-height: 40px;
  34     }
  35     
  36     #tbMain td td{
  37         border-top: 1px solid #99BAC9;
  38         border-bottom: 1px solid #99BAC9;
  39         text-align: center;
  40         line-height: 40px;}
  41     #tbMain td.centerAlign{ border-left:1px solid #ff0000;}
  42     #tbMain td.LeftAlign
  43     {
  44         text-align: left;
  45         padding-left: 5px;
  46         border-left: 1px solid red;
  47         padding-right: 5px;
  48         line-height: 20px;
  49         color: Black;
  50     }
  51     .t-calendar td
  52     {
  53         border: 1px solid #E0E0E0;
  54         line-height: 20px;
  55     }
  56     .StretchInput
  57     {
  58         width: 100%;
  59     }
  60      #toptoolbar
  61     {
  62         background: url("../images/panel/panel-toolbar.gif") repeat-x scroll 0 0 #CEDFEF;
  63         border-color: #EFF7F7 #9CBAE7 #9CBAE7;
  64         border-right: 1px solid #9CBAE7;
  65         border-style: solid;
  66         border-width: 1px;
  67         height: 26px;
  68         float:left;
  69     }
  70     /* 头部固定 */
  71     #toptoolbar
  72     {
  73         position: fixed;
  74         top: 0px;
  75         width: 100%;
  76         overflow: visible;
  77         z-index: 1000;
  78     }
  79    
  80      /* 头部固定 */
  81      .s-toolbar
  82     {
  83         
  84         left :250px;
  85         position: fixed;
  86         top: 0px;
  87         width: 100%;
  88         overflow: visible;
  89         z-index: 1000;
  90     }
  91     .l-text-wrapper
  92     {
  93         float: left;
  94     }
  95     .SubContainer{background:url(../../../Content/themes/Aqua/images/panel-toolbar.gif) repeat-x 0px 0px}
  96     #btnAdd,#btnModify,#writeOpinion{border:0;  cursor:pointer; width:85px; text-alig:center; line-height:22px; height:22px; background:url(../../../../Content/Images/shouxie.gif); display:inline-block}
  97     .shouxie{ border:0;cursor:pointer; width:85px; text-alig:center; line-height:22px; height:22px; background:url(../../../../Content/Images/shouxie.gif); display:inline-block}
  98 #toptoolbar{ left:0}
  99     /*.WebYijian ul{ width:500px;}*/
 100     .t-window .l-panel-bwarp{overflow-x:hidden}
 101 </style>
 102  <script src="@Url.Content("~/Scripts/0.0.0/jquery-1.8.2.min.js")" type="text/javascript"></script>@*add by 张蓝天 2013-01-18*@
 103 <script type="text/javascript" src="@Url.Content("~/Scripts/workFlow/Receive/FileFlow.js")"></script>
 104 @{
 105     var winCuidDefaultOpinion = Html.EPLib().Window().Name("winDefaultOpinion").Title("维护用户批语").Draggable(true).Resizable().Modal(true).Buttons(b => b.Maximize().Close()).Width(560).Height(382).Visible(false);
 106     winCuidDefaultOpinion.Content(@<text>
 107     <div id="gridDefaultOpinion" style="width:100%;height:100%;">
 108     </div>
 109     </text>);
 110     winCuidDefaultOpinion.Render();
 111     winCuidDefaultOpinion.ClientEvents(events => events.OnClose("winCuid_onclose"));
 112 }
 113 <script type ="text/javascript">
 114     $(function () {
 115         //批语选择的绑定事件
 116         $("#fmDefaultOpinion").change(function () {
 117             fmDefaultOpinion_onChange();
 118         });
 119         $("#tableSchedule").hide(); //隐藏日程添加区域
 120 
 121 //        $.post("/Workflow/PageLoaded", null, function (json) {
 122 //        });//测试页面加载时间,请求后台代码
 123     });
 124 </script>
 125 
 126 <!--日程处理 End-->
 127   <!--批语处理 Start-->
 128     <script type="text/javascript">
 129         var grid = null;
 130         var winGrid = null;
 131       
 132         /*删除列表中指定行数据*/
 133         function f_delete() {
 134             var selected = grid.getSelected();
 135             if (selected) {
 136                 if (!selected.ID) {
 137                     return;
 138                 }
 139                 $.post(\'@Url.Content("~/Dispatch/DeleteDefaultOpinion")\', { opinionID: selected.ID}).done(function (json) {
 140                     if (json) {
 141                         var isError = json.IsError;
 142                         var message = json.Message;
 143                         window.alert(message);
 144                     }
 145                 });
 146                 grid.deleteRow(selected);
 147             }
 148             else {
 149                 alert(\'请选择行!\');
 150             }
 151         }
 152   
 153         /*各按钮的单击事件*/
 154         function defaultOpinionItemClick(item){ 
 155             switch (item.text) {
 156                 case "增加":
 157                     grid.addEditRow(); 
 158                     break
 159                 case "修改":
 160                     var row = grid.getSelectedRow();
 161                     if (!row) { LG.tip(\'请选择行\'); return; }
 162                     grid.beginEdit(row);
 163                     break;
 164               case "取消":
 165                     var row = manager.getSelectedRow();
 166                     if (!row) { alert(\'请选择行\'); return; }
 167                     grid.cancelEdit(row);
 168                   break;
 169                 case "删除":
 170                     if(confirm("确定要删除吗?")) {
 171                         f_delete();
 172                     };
 173                     break;
 174                 case "关闭":  
 175                     winGrid.close();  
 176                     //重新获取批语列表                  
 177                     $.ajax({
 178                         url: \'@Url.Action("GetRefreshOpinion")\',
 179                         type: \'POST\',
 180                         async:false,
 181                         error: function (xhr, status) {
 182                             alert(status);
 183                         },
 184                         success: function (json) {
 185                             if (json) { 
 186                                 $("#fmDefaultOpinion").empty();
 187                                 for (var i = 0; i < json.length; i++) {
 188                                     $("#fmDefaultOpinion").append($("<option></option>").val(json[i].Value).html(json[i].Text));
 189                                 }
 190                             } 
 191                         }
 192                     });  
 193                     break;
 194                 case "保存":
 195                     grid.endEdit();
 196                     var data=grid.getData();
 197                     var jsonString=JSON2.stringify(data);
 198                     
 199                       $.post(\'@Url.Content("~/Dispatch/SaveDefaultOpinions")\', { defaultOpinions: jsonString}).done(function (json) {
 200                         if (json) {
 201                             var isError = json.IsError;
 202                             var message = json.Message;
 203                             window.alert(message);
 204                             //列表数据重新加载
 205                             grid.loadData(json.Data)
 206                         }
 207                     });
 208                              
 209                                                                                               
 210                     break;
 211             }
 212         }
 213 
 214         function cuidDefaultOpinion() {
 215             //grid控件工具栏
 216             var toolbarOptions = {
 217                 items: [
 218                     { text: \'保存\', click: defaultOpinionItemClick, img: "@Url.Content("~/Content/icons/silkicons/save.png")" },
 219                     { line: true },
 220                     { text: \'增加\', click: defaultOpinionItemClick, img: "@Url.Content("~/Content/icons/silkicons/add.png")" },
 221                     { line: true },
 222                     { text: \'修改\', click: defaultOpinionItemClick, img: "@Url.Content("~/Content/icons/silkicons/page_edit.png")" },
 223                     { line: true },
 224                     { text: \'删除\', click: defaultOpinionItemClick, img: "@Url.Content("~/Content/icons/silkicons/delete.png")" },
 225                     { line: true },                   
 226                     { text: \'关闭\', click: defaultOpinionItemClick, img: "@Url.Content("~/Content/icons/silkicons/cross.png")" }
 227                 ]
 228             };           
 229             //设置grid控件样式
 230             grid = $("#gridDefaultOpinion").ligerGrid({
 231                 columns: [
 232                     { hide: true, name: \'ID\', align: \'left\', width: 50, minWidth: 40 },
 233                     { hide: true, name: \'AgreeType\', align: \'left\', width: 300, minWidth: 80 },
 234                     { display: \'批语\', name: \'DefaultOpinion\', align: \'left\', width: 531, minWidth: 80, editor:{type:\'text\'} }                    
 235                 ],
 236                 onSelectRow: function (rowdata, rowindex)
 237                 {
 238                     $("#txtrowindex").val(rowindex);
 239                 },
 240                 toolbar: toolbarOptions,
 241                 url:\'@Url.Action("LoadDefaultOpinions", "Dispatch")\', 
 242                 dataAction: \'server\',
 243                 checkbox: false,
 244                 usePager: false,
 245                 enabledEdit: true,
 246                 isScroll: false,
 247                 clickToEdit: false,
 248                 width: \'100%\',
 249                 height:\'300px\'
 250             });            
 251 
 252             winGrid = $(\'#winDefaultOpinion\').data(\'tWindow\');
 253             winGrid.center();
 254             var win=winGrid.open();
 255             $("div[class=\'l-grid-body l-grid-body2 l-scroll\']").css("height", "500px");
 256         }
 257 
 258         function fmDefaultOpinion_onChange(){
 259             var selectedValue = $("#fmDefaultOpinion").val();
 260             $("#txtOpinion").val(selectedValue);
 261         }   
 262     </script>
 263     <!--批语处理 End-->
 264 <script type="text/javascript">
 265     var bnFuncList = Array();
 266 </script>
 267 
 268 @if (@*ViewBag.CurrentStateID != "领导签批" && ViewBag.CurrentStateID != "分管领导签批" &&*@ (ViewBag.InstanceID == null || !wfEncap.IsEndWorkFlow(ViewBag.InstanceID)))
 269 {
 270     <div class="s-toolbar" style="">
 271         @{       
 272     string templateID = ViewBag.TemplateID;
 273     string edition = wfEncap.WFService.GetTemplateMaxEdition(templateID);//获取模板的最大模型版本号
 274     var branchNames = wfEncap.WFService.GetTemplateStateBranchName(templateID, edition, ViewBag.CurrentStateID);
 275 
 276     foreach (string bn in branchNames)
 277     {
 278         //Add by 叶宝平 工作流中“分管领导签批”环节的“协办”功能没删除,在此屏蔽“协办”按钮
 279         if (ViewBag.CurrentStateID == "分管领导签批" && (bn == "协办" || bn == "主办处室办理"))
 280         {
 281             continue;
 282         }
 283 
 284         //Add by 叶宝平 工作流“领导签批”环节,屏蔽多余的按钮
 285         if (ViewBag.CurrentStateID == "领导签批" && (bn == "分管领导签批" || bn == "办公室拟办" || bn == "主办处室办理"))
 286         {
 287             continue;
 288         }
 289 
 290         //Modify by 叶宝平 为“办公室拟办”和“领导阅示”环节后的“传阅”环节隐藏人员下拉列表
 291         if (!((ViewBag.CurrentStateID == "办公室拟办" || ViewBag.CurrentStateID == "领导阅示") && bn == "传阅"))
 292         {
 293             <input type="text" id=\'@("cbx" + bn)\' style="float:left;" onmouseover="GetSelectedUsers(\'cbx@(bn)\');"/>
 294             <script type="text/javascript">
 295                 var func = function () {
 296                     var url = \'@Url.Action("GetBNUsers")\' + "?templateID=@(templateID)&edition=@(edition)&bn=@(bn)";
 297                     $.ajax({
 298                         url: encodeURI(url),
 299                         type: \'POST\',
 300                         async: false,
 301                         error: function (xhr, status) {
 302                             alert(status);
 303                         },
 304                         success: function (json) {
 305                             if (json.Success && json.Data && json.Data.length > 0) {
 306                                 if (json.Data.length == 1)
 307                                     $(\'@("#cbx" + bn)\').ligerComboBox({ data: json.Data, valueFieldID: \'@("value" + bn)\', initValue: json.Data[0].id, initText: json.Data[0].text,split:\',\' });
 308                                 else
 309                                     $(\'@("#cbx" + bn)\').ligerComboBox({ data: json.Data, valueFieldID: \'@("value" + bn)\',split:\',\', isShowCheckBox: @(bn != "办公室拟办" ? "true" : "false"), isMultiSelect: @(bn != "办公室拟办" ? "true" : "false")@(bn == "办公室拟办" ? ",initValue: json.Data[0].id, initText: json.Data[0].text" : "") });
 310                                     $(\'J_checked\').innerHTML=$(\'@("#cbx" + bn)\').innerHTML;
 311                             }
 312                             else
 313                             {
 314                                 $(\'@("#cbx" + bn)\').css("margin-left", "-500px").css("float", "left");
 315                             }
 316                         }
 317                     });
 318                 }
 319                 bnFuncList.push(func);
 320             </script>
 321         }
 322             
 323             <div id="J_checked" style="position:absolute;">
 324             </div>
 325             
 326         //Modify by 叶宝平 屏蔽“传阅”环节的人员下拉列表
 327         if (bn != "传阅" && !(ViewBag.CurrentStateID == "分管领导签批" && bn == "办公室拟办"))
 328         {
 329                 <div class="l-toolbar-item l-panel-btn l-toolbar-item-hasicon l-panel-btn-over" id=\'@("btn" + bn)\' onclick=\'@("SendToNext(\'" + bn + "\')")\' style=" float:left; margin-right:10px;">
 330                     <span>@(Model != null ? (Model.Receivedtype == "2" && ViewBag.CurrentStateID == "领导阅示" ? (bn == "办公室拟办" ? "退回" + bn : bn) : "" + bn) : "" + bn)</span>
 331                     <div class="l-panel-btn-l">
 332                     </div>
 333                     <div class="l-panel-btn-r">
 334                     </div>
 335                     <img src="/Content/icons/silkicons/bullet_go.png">
 336                 </div>
 337         }
 338         
 339         if (ViewBag.CurrentStateID == "分管领导签批" && bn == "办公室拟办")
 340         {
 341             <div class="l-toolbar-item l-panel-btn l-toolbar-item-hasicon l-panel-btn-over" id=\'@("btn" + bn)\' onclick=\'@("SendToNext(\'" + bn + "\')")\' style=" float:left; margin-right:10px;">
 342                     <span>退回</span>
 343                     <div class="l-panel-btn-l">
 344                     </div>
 345                     <div class="l-panel-btn-r">
 346                     </div>
 347                     <img src="/Content/icons/silkicons/bullet_go.png">
 348                 </div>
 349         }
 350     }
 351 
 352     //Add by 叶宝平 为“领导阅视”环节分管领导添加全局传阅功能
 353     if ((ViewBag.CurrentStateID == "办公室拟办" || ViewBag.CurrentStateID == "领导阅示") && (string.IsNullOrEmpty(Model.Receivedtype) || Model.Receivedtype == "2"))
 354     {
 355         <div id="J_checked" style="position:absolute;">
 356         </div>
 357         <div class="l-toolbar-item l-panel-btn l-toolbar-item-hasicon l-panel-btn-over" id=\'btn传阅\' onclick=\'showCirculatePersons("传阅")\' style=" float:left;">
 358             <span>全局传阅</span>
 359             <div class="l-panel-btn-l">
 360             </div>
 361             <div class="l-panel-btn-r">
 362             </div>
 363             <img src="/Content/icons/silkicons/bullet_go.png" alt="">
 364         </div>
 365     }
 366 
 367     if (ViewBag.CurrentStateID != "结束归档")
 368     {
 369     <div  style="float:left; padding:0px 0 0 2px;color:Black; "><input type="checkbox" id="chkSend" name="chkSend" style="vertical-align:middle"/>发送短信</div>      
 370     }
 371         }
 372   <div class="l-toolbar-item l-panel-btn l-toolbar-item-hasicon l-panel-btn-over" id ="changeDataList" onclick="javascript:f_changeDataList()" style=" float:left;">
 373             <span style="color: Black">变更记录</span>
 374             <div class="l-panel-btn-l">
 375             </div>
 376             <div class="l-panel-btn-r">
 377             </div>
 378         </div>   
 379         <script type ="text/javascript">
 380             //数据变更记录列表
 381             function f_changeDataList() {
 382                 var id = $(\'#ID\').val();
 383                 if (id == "") {
 384                     $.ligerDialog.warn("没有变更记录");
 385                     return;
 386                 }
 387                 var instanceid = \'@ViewBag.InstanceID\';
 388                 var typeinfo = \'\';
 389                 if (instanceid != "") {
 390                     typeinfo = "&type=tsw";
 391                 }
 392                 var url = \'@Url.Action("ChangeDataList", "ChangeData")\' + \'?id=\' + id + typeinfo;
 393 
 394                 $.ligerDialog.open({ title: \'数据变更记录\', height: 600, width: 800, url: url });
 395             }
 396         </script>
 397     </div>
 398 }
 399 
 400 <h1 style=" clear:both;text-align: center; margin: 10px auto;color:red; margin-top:40px;width:800px;">
 401      <span style = "color:#ff0000; line-height:30px;font-size:28px;display:block;*+margin-top:40px;text-align:center"> 金华市住房和城乡建设局文件阅办单</span><br/>
 402          <small style="font-size:14px;color: Black; float:right;margin-right:30px;"><text>【</text>@ViewBag.CurrentStateID<text>】</text></small>
 403 
 404 </h1>
 405 <div style="padding: 0 10px; margin:0 auto ;clear:both">
 406     @using (Html.BeginForm("_NewOne", "Receive"))
 407     { 
 408         @Html.HiddenFor(o => o.ID);
 409         @Html.HiddenFor(o => o.Templateid);
 410                                           object textboxStyle = new { style = "width:90%;border:0px;", @readonly = "readonly" };
 411                                           if (ViewBag.CurrentStateID == "收文登记" || ViewBag.CurrentStateID == "办公室拟办")
 412                                           {
 413                                               textboxStyle = new { style = "width:90%" };
 414                                           }
 415 
 416                                           object officeStyle = new { style = "width:90%;border:0px;", @readonly = "readonly" };//办公室样式
 417                                           if (ViewBag.CurrentStateID == "收文登记")
 418                                           {
 419                                               officeStyle = new { style = "width:90%" };
 420                                           }
 421         @Html.Hidden("strWriteBoard")
 422         @Html.Hidden("currentStateID")
 423         @Html.Hidden("opinion")
 424         @Html.Hidden("nextUserIDs")
 425         <table style="width: 90%;margin:0 auto" id="tbMain" >
 426             <tr>
 427                 <td style="width:120px;">
 428                     <label><font color="red">*</font>来文编号</label>
 429                 </td>
 430                 <td class="LeftAlign">
 431                 @{
 432                                           if (ViewBag.CurrentStateID == "收文登记")
 433                                           {
 434                     @Html.LigerTextBoxFor(o => o.Comenumber, new { style = "width:140px" }).Required()
 435                                           }
 436                                           else
 437                                           {
 438                         @Html.DisplayFor(o => o.Comenumber)
 439                                           }
 440                 }
 441                 </td>
 442                 <td style="width: 120px;" class="centerAlign">
 443                     <label>
 444                         收文编号</label>
 445                 </td>
 446                 <td class="LeftAlign" style="width:120px;">
 447                     @{
 448                                           if (ViewBag.CurrentStateID == "收文登记")
 449                                           {
 450                     @Html.LigerTextBoxFor(o => o.Receivednumber, new { style = "width:80px" })
 451                                           }
 452                                           else
 453                                           {
 454                         @Html.DisplayFor(o => o.Receivednumber)
 455                                           }
 456                 }
 457                 </td>
 458             </tr>
 459             <tr>
 460                 <td>
 461                     <label>
 462                         缓急</label>
 463                 </td>
 464                 <td class="LeftAlign">
 465                     @(Html.EPLib().DropDownListFor(p => p.Emergency).BindTo(ViewBag.Emergencies).HtmlAttributes(new { @style = "width:80px;" }).Enable(ViewBag.CurrentStateID == "收文登记" || ViewBag.CurrentStateID == "办公室拟办"))                   
 466                 </td>
 467                  <td class="centerAlign">
 468                     <label>@{if (ViewBag.CurrentStateID == "办公室拟办")
 469                              {
 470                            <font color="red">*</font>
 471                              }}收文类型</label>
 472                 </td>
 473                 <td class="LeftAlign">                    
 474                     @(Html.EPLib().DropDownListFor(p => p.Receivedtype).ClientEvents(events => events.OnChange("onChange_RecieveType")).BindTo(ViewBag.ReceivedTypes).HtmlAttributes(new { @style = "width:80px;", @class = "required" }).Enable(ViewBag.CurrentStateID == "办公室拟办"))
 475                 </td>
 476             </tr>
 477             <tr>
 478                 <td>
 479                     <label>来文日期</label>
 480                 </td>
 481                 <td class="LeftAlign">
 482                     @if (ViewBag.CurrentStateID == "收文登记" || ViewBag.CurrentStateID == "办公室拟办")
 483                     {
 484                         @(Html.EPLib().DatePickerFor(o => o.Comedate).Value(Model == null ? DateTime.Now : Model.Comedate).HtmlAttributes(new { @style = "width:100px;" }).Enable(ViewBag.CurrentStateID == "收文登记" || ViewBag.CurrentStateID == "办公室拟办"))
 485                     }
 486                     else
 487                     {
 488                         @(Html.EPLib().DatePickerFor(o => o.Comedate).Value(Model.Comedate).HtmlAttributes(new { @style = "width:100px;" }).Enable(ViewBag.CurrentStateID == "收文登记" || ViewBag.CurrentStateID == "办公室拟办"))
 489                     }
 490                     
 491                 </td>
 492                 <td class="centerAlign">完成日期</td>
 493                 @if (ViewBag.CurrentStateID == "办公室拟办")
 494                 {
 495                     <td class="LeftAlign">@(Html.EPLib().DatePickerFor(f => f.FinishDate).Value(Model.FinishDate).HtmlAttributes(new { @style = "width:100px;" }))</td>
 496                 }
 497                 else
 498                 {
 499                     <td class="LeftAlign">@(Model != null ? Model.FinishDate.Value.Date.ToShortDateString() : "")</td>
 500                 }
 501             </tr>
 502             <tr>
 503                 <td>
 504                     <label>来文单位</label>
 505                 </td>
 506                 <td class="LeftAlign" colspan="3">
 507                 @{
 508                 if (ViewBag.CurrentStateID == "收文登记")
 509                 {
 510                         @Html.LigerTextBoxFor(o => o.Comeunit, new { style = "width:215px" })
 511                 }
 512                 else
 513                 {
 514                         @Html.DisplayTextFor(c => c.Comeunit)
 515                 }
 516                     }
 517                 </td>
 518             </tr>
 519             <tr>
 520                 <td>
 521                     <label><font color="red">*</font>来文标题</label>
 522                 </td>
 523                 <td colspan="3" class="LeftAlign">
 524                     @Html.LigerTextBoxFor(c => c.Swtitle, textboxStyle).Required()
 525                 </td>
 526             </tr>
 527             <tr>
 528                 <td>
 529                     <label>
 530                         附件</label>
 531                 </td>
 532                 <td colspan="3" class="LeftAlign">
 533                     <div id="upfiles">
 534                     @{
 535                 List<TAttachinfoModel> attachFiles = ViewBag.AttachFiles;
 536                 if (attachFiles != null)
 537                 {
 538                         <ul>
 539                             @foreach (var file in attachFiles)
 540                             {
 541                                 <li><a href="#" onclick=\'javascript:OpenAttachView("@file.Baseinfoid","@file.Attachnameid","@file.Extension")\'>@file.Attachdisplayname</a>
 542                                 </li>
 543                             }
 544                         </ul>
 545                 }
 546                }
 547                </div>
 548                @{
 549                 if (string.IsNullOrEmpty(ViewBag.InstanceID) ||
 550                     ViewBag.CurrentStateID == "收文登记" ||
 551                     ViewBag.CurrentStateID == "办公室拟办" ||
 552                     ViewBag.CurrentStateID == "领导签批" ||
 553                     ViewBag.CurrentStateID == "分管领导签批" ||
 554                     ViewBag.CurrentStateID == "主办处室办理" ||
 555                     ViewBag.CurrentStateID == "主办处理人阅办")
 556                 {
 557                         <div>
 558                             <a href="#" onclick="javacript:Upload();">上传附件</a></div>
 559                 }
 560                     }
 561                 </td>
 562             </tr>
 563             <tr height="90px">
 564                 <td>
 565                     <label>拟办意见</label>
 566                 </td>
 567                 <td colspan="3" class="LeftAlign WebYijian">
 568                     @ShowOpinion("办公室拟办", wfEncap)
 569                     @ShowDelegate("办公室拟办", wfEncap, tfFacade)
 570                 </td>
 571             </tr>
 572             <tr  height="90px">
 573                 <td>
 574                     <label>领导签批</label>
 575                 </td>
 576                 <td colspan="3" class="LeftAlign WebYijian">
 577                     @ShowOpinion("领导签批", wfEncap)
 578                     @ShowDelegate("领导签批", wfEncap, tfFacade)
 579                     @ShowOpinion("分管领导签批", wfEncap)
 580                     @ShowDelegate("分管领导签批", wfEncap, tfFacade)
 581                     @ShowOpinion("领导阅示", wfEncap)
 582                     @ShowDelegate("领导阅示", wfEncap, tfFacade)
 583                 </td>
 584             </tr>
 585             <tr height="90px">
 586                 <td>
 587                     <label>处室意见</label>
 588                 </td>
 589                 <td colspan="3" class="LeftAlign">
 590                     @ShowOpinion("主办处室办理", wfEncap)
 591                     @ShowDelegate("主办处室办理", wfEncap, tfFacade)
 592                     @ShowOpinion("协办", wfEncap, false)
 593                     @ShowDelegate("协办", wfEncap, tfFacade, false)
 594                     @ShowOpinion("处室传阅", wfEncap)
 595                     @ShowDelegate("处室传阅", wfEncap, tfFacade)
 596                 </td>
 597             </tr>
 598             <tr height="90px">
 599                 <td>
 600                     <label>阅办人意见</label>
 601                 </td>
 602                 <td colspan="3" class="LeftAlign">
 603                     @ShowOpinion("主办处理人阅办", wfEncap)
 604                     @ShowDelegate("主办处理人阅办", wfEncap, tfFacade)
 605                     @ShowOpinion("处室内部人员传阅", wfEncap, false)
 606                     @ShowDelegate("处室内部人员传阅", wfEncap, tfFacade, false)
 607 
 608                     @ShowOpinion("传阅", wfEncap)
 609                     @ShowDelegate("传阅", wfEncap, tfFacade)
 610                 </td>
 611             </tr>
 612             <tr>
 613                 <td>
 614                     <label>归档</label>
 615                 </td>
 616                 <td colspan="3" class="LeftAlign">
 617                     @{
 618                 if (ViewBag.CurrentStateID == "结束归档" && !wfEncap.IsEndWorkFlow(ViewBag.InstanceID))
 619                 {
 620                         <div>
 621                             是否归档:@Html.RadioButtonFor(p => p.ISENDFLOW, "1")是
 622                             @Html.RadioButtonFor(p => p.ISENDFLOW, "0")否
 623                             &nbsp;&nbsp;&nbsp;
 624                             归档期限:
 625                             @Html.RadioButtonFor(p => p.Timelimit, "1")10年
 626                             @Html.RadioButtonFor(p => p.Timelimit, "2")30年
 627                             @Html.RadioButtonFor(p => p.Timelimit, "3")永久
 628                             @Html.RadioButtonFor(p => p.Timelimit, "0")无
 629                         </div>
 630                 }
 631                 else if (!string.IsNullOrEmpty(ViewBag.InstanceID) && (ViewBag.CurrentStateID == "结束归档" || wfEncap.IsEndWorkFlow(ViewBag.InstanceID)))
 632                 { 
 633                    <div>
 634                             是否归档:@ViewBag.IsEndFlowText
 635                             归档期限:@ViewBag.TimeLimitText
 636                         </div>
 637                 }
 638                     }
 639                 </td>
 640             </tr>
 641             @{
 642                 if (string.IsNullOrEmpty(ViewBag.InstanceID) || ViewBag.CurrentStateID == "收文登记")
 643                 {
 644                 <tr>
 645                     <td>
 646                         <label>
 647                             PDF文件上传</label>
 648                     </td>
 649                     <td colspan="3" class="LeftAlign">
 650                         <div id="uploadEdit">
 651                             <a href="#" onclick="javacript:Upload(\'swzw\');">上传PDF</a>
 652                         </div>
 653                     </td>
 654                 </tr>
 655                 }
 656             }
 657             <tr>
 658                 <td>
 659                     <label>PDF文件浏览</label>
 660                 </td>
 661                 <td colspan="3" class="LeftAlign">
 662                     <iframe id="frmPDF" frameborder="0" style=\'width: 100%; height: 1110px;\'></iframe>
 663                 </td>
 664             </tr>
 665         </table>
 666          <div id="target1" style="width: 200px; margin: 3px; display: none;">
 667     <h3>
 668         正在操作...</h3>
 669 </div>
 670     }
 671 </div>
 672 
 673 <!--传阅人员树弹出层 Add by 叶宝平 2012-11-30-11-10-->
 674 <div id="divCirculatePersons" style="width: 400px; height: 300px; margin: 3px; display: none; overflow:auto">
 675     <table style="width: 100%;">
 676         <tr style="width: 95%;">
 677             <td>
 678                 <ul id="treeCirculatePersons">
 679                 </ul>
 680             </td>
 681         </tr>
 682     </table>
 683 </div>
 684 
 685 @section FootContent {
 686     <!--手写批注脚本文件引入 Start-->
 687     <script src="../../Scripts/FxScrbble/FxScrbble.js" type="text/javascript" charset="gb2312"></script>
 688     <link href="../../Scripts/FxScrbble/FxScrbble.css" rel="stylesheet" type="text/css" />
 689     <script type="text/javascript">
 690         var objfxScrbble;
 691         $(function () {
 692 
 693             objfxScrbble = $("#txtOpinion").fxScrbble({ singlefor: "1", data: "", plateheight: 200, width: 1024, height: 768, success: function (value) {
 694                 if (value != "") {
 695                     document.getElementById("tempOpinion").style.display = "";
 696                     document.getElementById("tempOpinion").src = "data:image/jpeg;base64," + value;
 697                 }
 698                 else {
 699                     document.getElementById("tempOpinion").style.display = "none";
 700                 }
 701             }
 702             });
 703 
 704             var tempcontrol = document.getElementById("rdoIdeaStyle1");
 705             if (tempcontrol) {
 706                 document.getElementById("rdoIdeaStyle1").checked = "checked";
 707             }
 708             //根据不同的方式设置控件是否可显示
 709             tempcontrol = document.getElementById("txtOpinion");
 710             if (tempcontrol) {
 711                 tempcontrol.style.display = "";
 712             }
 713             tempcontrol = document.getElementById("inputOpinion");
 714             if (tempcontrol) {
 715                 tempcontrol.style.display = "";
 716             }
 717             tempcontrol = document.getElementById("writeOpinion");
 718             if (tempcontrol) {
 719                 tempcontrol.style.display = "none";
 720             }
 721 
 722             //            //领导签批、分管领导签批、领导阅示环节时才会有存在手写方式
 723             //            if (\'@ViewBag.CurrentStateID\' == "领导签批" || \'@ViewBag.CurrentStateID\' == "分管领导签批" || \'@ViewBag.CurrentStateID\' == "领导阅示") {
 724             //                var tempcontrol = document.getElementById("rdoIdeaStyle1");
 725             //                if (tempcontrol) {
 726             //                    document.getElementById("rdoIdeaStyle1").checked = "checked";
 727             //                }
 728             //                //根据不同的方式设置控件是否可显示
 729             //                tempcontrol = document.getElementById("txtOpinion");
 730             //                if (tempcontrol) {
 731             //                    tempcontrol.style.display = "";
 732             //                }
 733             //                tempcontrol = document.getElementById("inputOpinion");
 734             //                if (tempcontrol) {
 735             //                    tempcontrol.style.display = "";
 736             //                }
 737             //                tempcontrol = document.getElementById("writeOpinion");
 738             //                if (tempcontrol) {
 739             //                    tempcontrol.style.display = "none";
 740             //                }
 741             //            }
 742             //            else {
 743             //                //手写方式
 744             //                //begin
 745             //                var tempcontrol = document.getElementById("rdoIdeaStyle2");
 746             //                if (tempcontrol) {
 747             //                    document.getElementById("rdoIdeaStyle2").checked = "checked";
 748             //                }
 749             //                //end
 750             //                var tempcontrol = document.getElementById("txtOpinion");
 751             //                if (tempcontrol) {
 752             //                    tempcontrol.style.display = "none";
 753             //                }
 754             //                tempcontrol = document.getElementById("inputOpinion");
 755             //                if (tempcontrol) {
 756             //                    tempcontrol.style.display = "none";
 757             //                }
 758             //                tempcontrol = document.getElementById("writeOpinion");
 759             //                if (tempcontrol) {
 760             //                    tempcontrol.style.display = "";
 761             //                }
 762             //            }
 763         });
 764 
 765         //Add by 叶宝平 “主办处室办理”默认日程不需要显示添加
 766         $(function () {
 767             var currentStateID = \'@ViewBag.CurrentStateID\';
 768             if (currentStateID == "主办处室办理") {
 769                 $("#tableSchedule").hide();
 770             }
 771         })
 772 
 773     </script>
 774     <!--手写批注脚本文件引入 End-->
 775 
 776     <script src="@Url.Content("~/Scripts/Common.js")" type="text/javascript"></script>
 777     <script src="@Url.Content("~/Scripts/LG.js")" type="text/javascript"></script>
 778     <!--来文单位处理 Start--> 
 779     <script type="text/javascript">
 780         var funcOrgan = function () {
 781             var url = \'@Url.Action("GetOrganTreeData", "Dispatch")\';
 782             $.ajax({
 783                 url: encodeURI(url),
 784                 type: \'POST\',
 785                 async: false,
 786                 error: function (xhr, status) {
 787                     alert(status);
 788                 },
 789                 success: function (json) {
 790                     if (json.Success) {
 791                         var temp = $(\'#Comeunit\').val();
 792                         $(\'#Comeunit\').ligerComboBox({ data: json.Data, valueFieldID: \'value\', initText: temp, isShowCheckBox: true, isMultiSelect: true, width: 350, resize: false,split:\',\' });
 793             $(\'#Comeunit\').removeAttr("readonly");
 794                     }
 795                 }
 796             });
 797         }
 798 
 799         funcOrgan(); 
 800     </script>
 801     <script type="text/javascript">
 802         $(function () {
 803             $("#toptoolbar").ligerToolBar({
 804                 items: [@(new HtmlString(ViewBag.TopBar))]
 805             });    
 806 
 807             var toptoolbar = $(\'#toptoolbar\');
 808             var width = 0;
 809             toptoolbar.children().each(function (i, n) {
 810                 var obj = $(n);
 811                 obj.children().each(function (j, m) {
 812                     width += $(m).width();
 813                 });
 814 
 815             });
 816             $(\'.s-toolbar\').css("left", width * 1.8);
 817 
 818             $(\'#Templateid\').val(\'@ViewBag.TemplateID\');  
 819             
 820             for(var i=0;i<bnFuncList.length;i++)
 821             {
 822                 var func = bnFuncList[i];
 823                 func();
 824             }
 825 
 826             //新增时自动生成【收文编号】
 827             if (\'@ViewBag.CurrentStateID\' == "收文登记"&&$("#Receivednumber").val()=="")
 828             {
 829                 $("#Receivednumber").val(\'@ViewBag.ReceiveNumber\');
 830             }
 831 
 832             //收文类型变更
 833             onChange_RecieveType();
 834 
 835             //是否归档变更
 836             onChange_IsEndFlow();
 837 
 838             //PDF正文加载
 839             var fileName = \'@ViewBag.PdfFileName\';
 840             if(fileName!="")
 841             {
 842                 LoadPDF(fileName);
 843             }
 844         })
 845 
 846         function SendToNext(nextStateID) {
 847             var mbox = $.ligerDialog.open({ target: $("#target1") }); 
 848             var ddlReceivedtype=$("#Receivedtype").data("tDropDownList");
 849             var receivedtype=ddlReceivedtype.value();
 850             if (nextStateID == "领导签批"&&receivedtype!=1)
 851             {
 852                 alert("请确认【收件类型】是否是办理件!");
 853                 mbox.hide(); 
 854                 return;
 855             }
 856             else if (nextStateID == "领导阅示"&&receivedtype!=2)
 857             {
 858                 alert("请确认【收件类型】是否是传阅件!");
 859                 mbox.hide(); 
 860                 return;
 861             }    
 862             //2012-10-30 ljx-add 检测是否已添加批语
 863             //Modify by 叶宝平 办公室拟办环节可以不选择分管领导和主办处室
 864             ExcuteFun(nextStateID,mbox);
 865 //            if (\'@ViewBag.CurrentStateID\' == "办公室拟办" && nextStateID == "领导签批")
 866 //            {   
 867 //                //数据保存处理
 868 //                $.post(\'@Url.Action("GetOfferDeliver")\'+"?instanceID="+\'@ViewBag.InstanceID\').done(function (json) {
 869 //                    if (!json.Success){
 870 //                        alert("请先维护批语!");
 871 //                        mbox.hide();                     
 872 //                        return;
 873 //                    }
 874 //                    else
 875 //                    {
 876 //                        //处理成功才能继续[保存数据并发送下一步]
 877 //                        ExcuteFun(nextStateID,mbox);
 878 //                    }
 879 //                });
 880 //              }
 881 //              else{
 882 //                //保存数据并发送下一步
 883 //                ExcuteFun(nextStateID,mbox);
 884 //                }
 885         }
 886 
 887         function ExcuteFun(nextStateID,mbox)
 888         {
 889             var currentStateId=\'@ViewBag.CurrentStateID\';
 890             if(currentStateId=="收文登记" || currentStateId=="办公室拟办" || currentStateId=="结束归档")
 891             {
 892                 var json = Save();
 893                 if(!json.Success)
 894                 {
 895                     mbox.hide(); 
 896                     return;
 897                 }
 898             }
 899 
 900             if(currentStateId=="主办处理人阅办" || (currentStateId=="主办处室办理" && nextStateID =="结束归档") || (currentStateId=="分管领导签批" && nextStateID=="结束归档"))
 901             {
 902                 //添加日程
 903                     if ($("#checkSchedule").attr("checked")) {
 904                         var ScheduleTitle=$.trim($("#ScheduleTitle").val());
 905                         if(ScheduleTitle=="")
 906                         {
 907                             alert("【主题】不能为空!");
 908                             mbox.hide(); 
 909                             return ;
 910                         }    
 911                         var StartDate=$.trim($("#StartDate").val());
 912                         if(StartDate=="")
 913                         {
 914                             alert("【开始时间】不能为空!");
 915                             mbox.hide(); 
 916                             return ;
 917                         }    
 918                          var EndDate=$.trim($("#EndDate").val());
 919                         if(EndDate=="")
 920                         {
 921                             alert("【结束时间】不能为空!");
 922                             mbox.hide(); 
 923                             return ;
 924                         }    
 925                          var ScheduleRemark=$.trim($("#ScheduleRemark").val());
 926                         if(ScheduleRemark=="")
 927                         {
 928                             alert("【内容】不能为空!");
 929                             mbox.hide(); 
 930                             return ;
 931                         }      
 932                         var url = \'@Url.Action("ScheduleAdd", "Schedule")\';
 933                         var ID = \'@Guid.NewGuid().ToString()\';
 934                         var Account=\'@ViewBag.CurrentUser.UserId\';
 935                         var Name=\'@ViewBag.CurrentUser.DisplayName\';
 936                         $.ajax({
 937                             url: encodeURI(url),
 938                             type: \'POST\',
 939                             async: false,
 940                             data:{
 941                                ScheduleTitle:ScheduleTitle,
 942                                StartDate:StartDate,
 943                                EndDate:EndDate,
 944                                ScheduleRemark:ScheduleRemark,
 945                                ID :ID,
 946                                Account:Account,
 947                                Name:Name,
 948                                RefBillID: $(\'#ID\').val()
 949                                },
 950                             error: function (xhr, status) {
 951                                 alert(status);
 952                                 mbox.hide(); 
 953                             },
 954                             success: function (data) {
 955                                 var isError = eval("("+data+")").IsError;  
 956                                 if (isError) {
 957                                         alert("日程保存失败");
 958                                         mbox.hide(); 
 959                                         return;
 960                                 }
 961                                 mbox.hide();                           
 962                             }
 963                         });
 964                     }
 965             }
 966 
 967             var url = \'@Url.Action("SendToNext")\' + "?templateID=@(ViewBag.TemplateID)&receiveID="+ $(\'#ID\').val() + "&nextStateID=" + nextStateID;
 968 //            if ($("#txtOpinion").length != 0 && $("#txtOpinion").val()) {
 969 //                url += "&opinion=" + $("#txtOpinion").val();
 970 //            }
 971 
 972             $("#opinion").val($("#txtOpinion").val());
 973 
 974             var nextInput = $("#value" + nextStateID);
 975             if(nextInput.length>0)
 976             {
 977                 var nextUsers = nextInput.val();
 978                 if (nextUsers) {
 979                     nextUsers = nextUsers.replace(\';\',\',\');
 980                     url += "&nextUserID=" + nextUsers;
 981                 }
 982                 else
 983                 {
 984                     alert("请选择下一环节办理人!");
 985                     mbox.hide(); 
 986                     return;
 987                 }
 988             }
 989             if (\'@ViewBag.InstanceID\') {
 990                 url += "&instanceID=@ViewBag.InstanceID";
 991             }
 992             url+="&currentStateID="+\'@ViewBag.CurrentStateID\';
 993 
 994             var fkid=\'@(!string.IsNullOrEmpty(Request["fkid"]) ? Request["fkid"] : "")\';
 995             url+="&fkid="+fkid;
 996 
 997             
 998             //是否发送短信
 999             url+=AddSendMessageParam();
1000 
1001             //获取手写时的批注图片信息
1002             url+=GetWriteBoardUrl();
1003 
1004             $.post(encodeURI(url), $(\'form\').serializeArray()).done(function (json) {
1005                 alert(json.Msg);
1006                 mbox.hide(); 
1007                 if (json.Success)
1008                 {
1009                     window.close();
1010                 }
1011             });
1012         }
1013 
1014         /* 添加短信参数 */
1015         function AddSendMessageParam()
1016         {
1017             var temp="";
1018             var chk = $("#chkSend");
1019             if(chk&&chk[0])
1020             {
1021                 temp="&isSend="+chk[0].checked;
1022             }
1023             return temp;
1024         }
1025         /* 获取意见手写时的Url地址 */
1026         function GetWriteBoardUrl()
1027         {
1028             var url="";
1029             //获取手写时的批注图片信息
1030             var writeBoard="";
1031             var ideaStyle=0;
1032             var tempControl=document.getElementById("rdoIdeaStyle2");
1033             if(\'@ViewBag.CurrentStateID\' == "领导签批" || \'@ViewBag.CurrentStateID\' == "分管领导签批" || \'@ViewBag.CurrentStateID\' == "领导阅示" || \'@ViewBag.CurrentStateID\'=="传阅")
1034             {   
1035              //手写
1036                      if(tempControl&&tempControl.checked)
1037                     {
1038             
1039                 ideaStyle=1;
1040                 $("#strWriteBoard").val($(\'#txtOpinion\').getfximage());
1041                 }
1042             } 
1043             
1044             url+="&ideaStyle="+ideaStyle;
1045             return url;
1046         }
1047          function itemclick(item) {
1048             var mbox = $.ligerDialog.open({ target: $("#target1") }); 
1049             switch (item.id) {
1050                 case "save":
1051                     var json = Save();
1052                     if(json)
1053                     {
1054                         alert(json.Msg);
1055                     }
1056                     mbox.hide();
1057                     return;
1058                 case "leadersigncompleted":
1059                     //工作交办
1060                     //var handlerSetRet = showDialog(\'@Url.Action("OfficeSetHandler")\' + \'?instanceID=@ViewBag.InstanceID\', \'\', 480,500);
1061                     //if(handlerSetRet)
1062                     //{
1063                         var nextStateID="分管领导签批";
1064                         var url = \'@Url.Action("_LeaderDeliver")\' + "?instanceID=@(ViewBag.InstanceID)&nextStateID="+nextStateID;
1065                         
1066                         $("#opinion").val($("#txtOpinion").val());
1067 
1068                         url+="&currentStateID="+\'@ViewBag.CurrentStateID\';
1069 
1070                         var fkid = \'@(!string.IsNullOrEmpty(Request["fkid"]) ? Request["fkid"] : "")\';
1071                         url += "&fkid=" + fkid;
1072 
1073                         //是否发送短信
1074                         url+=AddSendMessageParam();
1075 
1076                         //获取手写时的批注图片信息
1077                         url+=GetWriteBoardUrl();
1078 
1079                         $.post(encodeURI(url), $(\'form\').serializeArray()).done(function (json) {
1080                             alert(json.Msg);
1081                             mbox.hide();
1082                             if (json.Success)
1083                             {
1084                                 window.close();
1085                             }
1086                         });
1087                     //}
1088                     return;
1089                 case "fgleadersigncompleted":
1090                     //分管领导审核
1091                     var nextStateID="主办处室办理";
1092                     var url = \'@Url.Action("_fgLeaderDeliver")\' + "?instanceID=@(ViewBag.InstanceID)&nextStateID="+nextStateID;
1093 
1094 //                    if ($("#txtOpinion").length != 0 && $("#txtOpinion").val()) {
1095 //                        url += "&opinion=" + $("#txtOpinion").val();
1096 //                    }
1097 
1098                     $("#opinion").val($("#txtOpinion").val());
1099 
1100                     url+="&currentStateID="+\'@ViewBag.CurrentStateID\';
1101                     //是否发送短信
1102                     url+=AddSendMessageParam();
1103 
1104                     var fkid = \'@(!string.IsNullOrEmpty(Request["fkid"]) ? Request["fkid"] : "")\';
1105                     url += "&fkid=" + fkid;
1106 
1107                     //获取手写时的批注图片信息
1108                     url+=GetWriteBoardUrl();
1109 
1110                     $.post(encodeURI(url), $(\'form\').serializeArray()).done(function (json) {
1111                         alert(json.Msg);
1112                         mbox.hide();
1113                         if (json.Success){
1114                             window.close();
1115                         }
1116                     });
1117                     return;
1118                 case "senddeptcy":
1119                     var nextStateID = "处室内部人员传阅";
1120                     var url = \'@Url.Action("_DeptInnerChuanyue")\' + "?instanceID=@(ViewBag.InstanceID)"+"&nextStateID="+nextStateID;
1121 
1122 //                    if ($("#txtOpinion").length != 0 && $("#txtOpinion").val()) {
1123 //                        url += "&opinion=" + $("#txtOpinion").val();
1124 //                    }
1125 
1126                     var txtopinion=$("#txtOpinion").val();
1127 
1128                     url+="&currentStateID="+\'@ViewBag.CurrentStateID\';
1129                     url+=GetWriteBoardUrl();
1130 
1131                     var fkid = \'@(!string.IsNullOrEmpty(Request["fkid"]) ? Request["fkid"] : "")\';
1132                     url += "&fkid=" + fkid;
1133 
1134                     //是否发送短信
1135                     url+=AddSendMessageParam();
1136 
1137                     $.post(encodeURI(url),{opinion:txtopinion}).done(function (json) {
1138                         alert(json.Msg);
1139                         mbox.hide();
1140                     });
1141                     return;
1142                 case "monitor":
1143                     if ("@ViewBag.InstanceID"){
1144                         showDialog(\'@Url.Action("FlowMonitor", "Workflow")\' + \'?instanceID=@ViewBag.InstanceID\', \'\', 800);
1145                     }
1146                     else    {
1147                         alert("流程尚未开始!");
1148                     }
1149 
1150                     mbox.hide();
1151                     return;
1152             }
1153          }
1154 
1155          function Save()
1156          {
1157             //控件值检测
1158             if(!CheckControl())
1159             {
1160                 return false;
1161             }
1162             
1163             //数据保存
1164             $.ajax({
1165                 url: \'@Url.Action("_NewOne")\',
1166                 type: \'POST\',
1167                 async:false,
1168                 error: function (xhr, status) {
1169                     alert(status);
1170                 },
1171                 data: $(\'form\').serializeArray(),
1172                 success: function (json) {
1173                     if (json.Success) {
1174                         $(\'#ID\').val(json.Data);
1175                     }
1176                     result = json;
1177                 }
1178             });
1179             return result;
1180          }
1181          //控件值检测
1182         function CheckControl()
1183         {            
1184             if(\'@ViewBag.CurrentStateID\'==\'收文登记\')
1185             {
1186                 /*来文编号*/
1187                 if($.trim($("#Comenumber").val())=="")
1188                 {
1189                     alert("【来文编号】不能为空!");
1190                     return false;
1191                 }
1192                 /*收文编号*/
1193                 if(!CheckReceivedNumber())
1194                 {
1195                     return false;
1196                 }
1197             }
1198             
1199             
1200             /*收文类型必须选择*/
1201             var ddlReceivedtype=$("#Receivedtype").data("tDropDownList");
1202             if (!(ddlReceivedtype && ddlReceivedtype.value())&&ddlReceivedtype.enabled) {
1203                 alert("【收文类型】必须选择!");
1204                 return false;
1205             }
1206             /*来文标题*/
1207             if($.trim($("#Swtitle").val())=="")
1208             {
1209                 alert("【来文标题】不能为空!");
1210                 return false;
1211             }
1212             /*是否归档*/
1213             if(\'@ViewBag.CurrentStateID\'==\'结束归档\')
1214             {
1215                 var ddl=$("#ISENDFLOW").data("tDropDownList");
1216                 if(ddl)
1217                 {   
1218                     var ddlTimelimit=$("#Timelimit").data("tDropDownList");
1219                     if(ddl.value()=="1"&&ddlTimelimit.value()=="0")
1220                     {
1221                         alert("请选择【归档期限】!");
1222                         return false;
1223                     }
1224                     else if(ddl.value()=="0"&&ddlTimelimit.value()!="0")
1225                     {
1226                         alert("未归档时不能选择【归档期限】!");
1227                         return false;
1228                     }
1229                 }
1230             }
1231             return true;
1232         }
1233 
1234         /* 收文编号的检测 */
1235         function CheckReceivedNumber()
1236         {
1237             if(\'@ViewBag.CurrentStateID\'=="收文登记")
1238             {
1239                 var temp=$.trim($("#Receivednumber").val());
1240                 if(temp=="")
1241                 {
1242                     alert("【收文编号】不能为空!");
1243                     return false;
1244                 }
1245                 //收文编号的长度必须是8位=4位年份+4位流水号
1246                 if(temp.length!=8)
1247                 {
1248                     alert("【收文编号】的长度必须是8位!");
1249                     return false;
1250                 }
1251                 //收文编号前四位必须当前年度
1252                 if(temp.substring(0, 4)!=\'@ViewBag.CurrentYear\')
1253                 {
1254                     alert("【收文编号】的前四位必须为当前年度!");
1255                     return false;
1256                 }
1257                 
1258                 //收文编号后四位必须是流水号
1259                 var strvalue=0;
1260                 var strLast=temp.substring(4);
1261                 for(var i=0;i<4;i++)
1262                 {
1263                     var tempvalue=parseInt(strLast.substring(i,i+1));                        
1264                     if(isNaN(tempvalue))
1265                     {
1266                         alert("【收文编号】的后四位必须为正实数的流水号!");
1267                         return false;
1268                     }
1269                     if(tempvalue>0)
1270                     {
1271                         strvalue=tempvalue;
1272                     }
1273                 }
1274                 if(strvalue==0)
1275                 {
1276                     alert("【收文编号】的后四位中的流水号必须大于0!");
1277                     return false;
1278                 }
1279             }
1280             return true;
1281         }
1282 
1283         /* 【办公室拟办】和【领导签批】环节的添加批语 */
1284         function Add_Opinion()
1285         {
1286         @{
1287             if (ViewBag.CurrentStateID == "办公室拟办" || ViewBag.CurrentStateID == "领导签批" || ViewBag.CurrentStateID == "分管领导签批")
1288             {
1289                  <text>
1290                     var handlerSetRet = showDialog(\'@Url.Action("OfficeSetHandler")\' + \'?instanceID=@ViewBag.InstanceID&currentStateId=@ViewBag.CurrentStateID\', \'\', 550,500);
1291                     if(!handlerSetRet)
1292                     {
1293                         return;
1294                     }
1295                     //Modify by 叶宝平 添加“领导签批”环节
1296                     if ("@ViewBag.CurrentStateID" == "办公室拟办" || "@ViewBag.CurrentStateID" == "领导签批"|| "@ViewBag.CurrentStateID" == "分管领导签批")
1297                     {
1298                         var tempuser="";
1299                         var ddlUser = $("#cbx领导签批");
1300                         if (ddlUser && ddlUser.val()) {
1301                             tempuser=ddlUser.val();
1302                         }
1303                         if($.trim(tempuser)!="")
1304                         {
1305                              tempuser=tempuser+"局长";
1306                         }
1307 
1308                         if(tempuser.length==0)
1309                         {
1310                             handlerSetRet=handlerSetRet.substring(1,handlerSetRet.length);
1311                         }
1312 
1313                         $("#txtOpinion").val(""+tempuser+handlerSetRet);
1314                     }
1315                  </text>
1316             }            
1317           }
1318         }
1319 
1320         /* 收文类型的变更事件 */
1321         function onChange_RecieveType()
1322         {
1323             var ddlReceivedtype=$("#Receivedtype").data("tDropDownList");
1324             var tempcontrol=document.getElementById("btnAdd");
1325             //办理件
1326             if (ddlReceivedtype && ddlReceivedtype.value()=="1"&&ddlReceivedtype.enabled) {
1327                 if(tempcontrol)
1328                 {
1329                     tempcontrol.style.display="";
1330                 }
1331             }
1332             else
1333             {//传阅件
1334                 if(tempcontrol)
1335                 {
1336                     tempcontrol.style.display="none";
1337                 }
1338             }
1339         }
1340 
1341         /*是否归档的变更事件*/
1342         function onChange_IsEndFlow()
1343         {
1344             var ddl=$("#ISENDFLOW").data("tDropDownList");
1345             if(ddl)
1346             {   
1347                 var ddlTimelimit=$("#Timelimit").data("tDropDownList");
1348                 //
1349                 if(ddl.value()=="0")
1350                 {
1351                     var selectItem = function (dataItem) {
1352                         //dataItem argument is a ComboBox data item.
1353                         return dataItem.Value == "0";
1354                     }
1355                     ddlTimelimit.select(selectItem);
1356                 }
1357             }
1358         }
1359 
1360         /*浏览上传的附件信息*/
1361         function OpenAttachView(baseinfoid, attachnameid, extension) {
1362             var strUrl = \'@(ViewBag.AttachVirtualPath)WorkFlow/\' + baseinfoid + \'/\' + attachnameid + extension;
1363             window.open(strUrl);
1364         }
1365 
1366         /*打开上传管理窗口*/
1367         function Upload(attachKind) {
1368             if(!$(\'#ID\').val())
1369             {
1370                 alert("请先保存!");
1371                 return;
1372             }
1373             var kind = attachKind || \'swfj\';
1374             //引用路径发生变化,需修改 modify by 齐树宾 12.07.04
1375             var url = \'@Url.Action("UploadManage", "UploadFile")\' + \'?baseInfoID=\'+$(\'#ID\').val()+\'&attachType=2&attachKind=\'+kind+\'&rn=\' + Math.random();
1376             mdialog=$.ligerDialog.open({ url: url, title: \'材料上传\', allowClose:false, height: 380,top:100,width: 550, buttons: [ { text: \'上传\', onclick: function (item, dialog) { window.frames[1].updateFiles();} }, { text: \'关闭\', onclick: function (item, dialog) { ShowUploads(attachKind); dialog.close(); } } ] });        
1377         }
1378         function ShowUploads(attachKind)
1379         { 
1380             if(!attachKind||attachKind=="")
1381             {   //流转附件上传
1382                 $("#upfiles").html(window.frames[1].getFiles());
1383             }
1384             else{
1385                 //正文上传
1386                 var fileName = window.frames[1].getFileName();
1387                 LoadPDF(fileName);
1388             }
1389            
1390         }
1391         /*PDF正文加载*/
1392         function LoadPDF(fileName)
1393         {
1394             var newSrc = \'@(ViewBag.AttachVirtualPath)WorkFlow/\' + fileName;
1395         if (fileName.length == 37) {
1396                 newSrc = "";
1397             }  
1398             document.getElementById("frmPDF").src = newSrc;
1399         }
1400 
1401         function Reload()
1402         {
1403             window.location = \'@Url.Action("FileFlow", "Receive")\'+"?receiveID=" + $(\'#ID\').val()+"&rn="+Math.random();
1404         }
1405     </script>
1406                  }
1407 @helper ShowOpinion(string stateID, WorkFlowFacadeEncap wfEncap, bool isMainFlow = true)
1408     { 
1409         if (!string.IsNullOrEmpty(ViewBag.InstanceID))
1410         {
1411             //Start
1412             string instanceID = ViewBag.InstanceID;
1413             var instance = wfEncap.WFService.getWFInstanceBasic(Guid.Parse(instanceID));
1414             var tempInstanceID = Guid.Empty == Guid.Parse(instance.masterInstanceID) ? instanceID : instance.masterInstanceID;
1415             //从业务表中获取当前环节的意见信息
1416             BusinessFacade bService = new BusinessFacade();
1417             var auditingIdeas = bService.GetAuditingIdeaModels(tempInstanceID, stateID);
1418             if (auditingIdeas != null && auditingIdeas.Count > 0)
1419             {
1420         <ul>
1421             @{
1422                 for (int i = 0; i < auditingIdeas.Count; i++)
1423                 {
1424                     var op = auditingIdeas[i];
1425                     var opinion = op.Auditidea;
1426 
1427                     //获取当前意见是手写方式的图片信息
1428                     var drawingContentSmall = string.Empty;
1429                     if (op.Handwriteboardsmall != null)
1430                     {
1431                         drawingContentSmall = Convert.ToBase64String(op.Handwriteboardsmall);
1432                     }
1433 
1434 
1435                     if (!string.IsNullOrEmpty(opinion) || !string.IsNullOrEmpty(drawingContentSmall))
1436                     {
1437                         if (!string.IsNullOrEmpty(opinion))
1438                         {
1439                                 <div style="float: left">@(opinion)</div>
1440                         }
1441                         else if (!string.IsNullOrEmpty(drawingContentSmall))
1442                         {
1443                                 <a href="javascript:void(0)" onclick="javascript:Opinion_Click(\'@(op.ID)\')"><img alt="批注" src="data:image/jpeg;base64,@(drawingContentSmall)" /></a>                                       
1444                         }
1445 
1446                     }
1447                       <br /> 
1448                 <div style="float: right">@op.Auditdepartment @op.Auditpersonname @op.Auditdate.ToString("yyyy-MM-dd")</div>
1449                     if (i != auditingIdeas.Count - 1)
1450                     {<br />}
1451 
1452 
1453                 }
1454                 }   
1455         </ul>
1456             }
1457             //End
1458         }
1459         if (ViewBag.CurrentStateID == stateID)
1460         {
1461             <textarea rows="3" cols="60" id="txtOpinion" style="width: 70%;border:1px solid #347FA4; margin-top:3px;"></textarea>
1462             if (ViewBag.CurrentStateID == "办公室拟办")
1463             {
1464                 <input type="button" id="btnAdd" value="添加批语" onclick="javascript:Add_Opinion();" />
1465             }
1466             if (ViewBag.CurrentStateID == "领导签批" || ViewBag.CurrentStateID == "分管领导签批" || ViewBag.CurrentStateID == "领导阅示" || ViewBag.CurrentStateID == "传阅" || ViewBag.CurrentStateID == "主办处室办理")
1467             {
1468                 <div id="inputOpinion">
1469                     <text>批语:</text>
1470                     @Html.DropDownList("fmDefaultOpinion", (IEnumerable<SelectListItem>)ViewBag.DefaultOpinions, new { @style = "width:30%;", @onchange = "fmDefaultOpinion_onChange" })
1471                     <a href="#" onclick="javascript:cuidDefaultOpinion()" style="margin: 5px; display: inline-block;
1472                         color: Black;">维护批语</a>
1473                 </div>
1474                 <img id="tempOpinion" name="tempOpinion" alt="批注" width="150px" height="120px" style="display:none"  />
1475              
1476                 <input type="button" id="writeOpinion" value="打开手写板" onclick="javascript:$(\'#txtOpinion\').ShowWriter(true)" />
1477                 <input type="radio"  id="rdoIdeaStyle1" name="rdoIdeaStyle" onclick="javascript:onChange_inputStyle(\'0\');"/><text>键盘</text>
1478                 <input type="radio" id="rdoIdeaStyle2" name="rdoIdeaStyle" onclick="javascript:onChange_inputStyle(\'1\');" /><text>手写</text> 
1479                 if (ViewBag.CurrentStateID == "领导签批" || ViewBag.CurrentStateID == "分管领导签批")
1480                 {
1481                     <input type="button" id="btnModify" value="更改批语" onclick="javascript:Add_Opinion();" />                
1482                 }
1483             }
1484             if (ViewBag.CurrentStateID == "主办处理人阅办" || ViewBag.CurrentStateID == "主办处室办理" || ViewBag.CurrentStateID == "分管领导签批")
1485             {                
1486                  <text><br /><input type ="checkbox" onclick="javascript:isAddSchedule();" id ="checkSchedule" />日程添加: </text> 
1487                 <table class="Winstar-panel" width="100%" border="0" id ="tableSchedule" align="center" cellpadding="0">              
1488                 <tr>
1489                     <td class="Winstar-panel-body" style ="border-color:transparent">
1490                         <table class="Winstar-form-table" width="100%" border="0" cellspacing="0" cellpadding="0" style ="border-color:transparent">                              
1491               <tr>
1492                                 <td class="Winstar-form-table-title" align="center">
1493                                     <font color="red">*</font>主 题:
1494                                 </td>
1495                                 <td colspan="3" class="Winstar-form-table-value" align ="left" style ="text-align:left">
1496                                     @Html.TextBox("ScheduleTitle", "", new { style = "width:75%;" })
1497                                 </td>
1498                             </tr>                         
1499                             <tr>
1500                                 <td class="Winstar-form-table-title" width="15%" align="center">
1501                                     <font color="red">*</font>开始时间:
1502                                 </td>
1503                                 <td class="Winstar-form-table-value" width="35%" align ="left" style ="text-align:left">
1504                                     @Html.EPLib().DateTimePicker().Name("StartDate").Value(DateTime.Now).InputHtmlAttributes(new { @id = "StartDate" })
1505                                </td>
1506                                 <td class="Winstar-form-table-title" width="15%" align="center">
1507                                     <font color="red">*</font>结束时间:
1508                                 </td>
1509                                 <td class="Winstar-form-table-value" width="35%" align ="left" style ="text-align:left">
1510                                     @Html.EPLib().DateTimePicker().Name("EndDate").Value(DateTime.Now).InputHtmlAttributes(new { @id = "EndDate" })
1511                                 </td>
1512                             </tr>                          
1513                             <tr>
1514                                 <td class="Winstar-form-table-title" align="center">
1515                                     <font color="red">*</font>内 容:
1516                                 </td>
1517                                 <td colspan="3" class="Winstar-form-table-value">
1518                                     @Html.TextArea("ScheduleRemark", "", new { style = "width:99%; height:100px;" })
1519                                 </td>
1520                             </tr>
1521                         </table>
1522                     </td>
1523                 </tr>
1524             </table>
1525            <script type ="text/javascript"> 
1526                //日程模块的显示和隐藏
1527                function isAddSchedule() { 
1528                    if ($("#checkSchedule").attr("checked")) {
1529                        $("#tableSchedule").show();
1530                    }
1531                    else {
1532                        $("#tableSchedule").hide();
1533                    }
1534                }
1535             </script>
1536             }
1537         }
1538 }
1539 
1540 @*显示委托信息*@
1541 @helper ShowDelegate(string stateID, WorkFlowFacadeEncap wfEncap, TransferFacade ptfFacade, bool isMaster = true)
1542     {        
1543         //获取实例ID*******************************************************************************
1544         var tempInstanceID = wfEncap.GetInstanceID(stateID, ViewBag.MasterInstanceID, isMaster);
1545         //获取环节办理人
1546         var transactuser = ptfFacade.GetTransactUserByState(tempInstanceID, stateID);
1547         //获取委托信息
1548         if (@ViewBag.CurrentUser.UserId != transactuser)
1549         {
1550             DelegationInfoModel delegationmodel = wfEncap.GetDelegationInfo(tempInstanceID, transactuser, stateID);
1551             if (delegationmodel != null)
1552             {//不为空时说明存在委托信息
1553                 <ul>
1554                     @{
1555                         <li style="clear: both;">
1556                             <div style="float: left; width:20%;"></div>
1557                             <div style="float: right; color:Red">委托信息:@delegationmodel.DelegationDepartment  @delegationmodel.DelegationUserName  @delegationmodel.DelegationTime.ToString("yyyy-MM-dd")</div>
1558                         </li>
1559                         }
1560                 </ul>
1561             }
1562         }   
1563 }
1564 
1565 <script type="text/javascript">
1566     //意见录入方式变更事件
1567     function onChange_inputStyle(state) {
1568         var inputcontrol = document.getElementById(\'inputOpinion\'); //键盘时用
1569         var writecontrol = document.getElementById(\'writeOpinion\'); //手写时用
1570         var control = document.getElementById(\'txtOpinion\');
1571 
1572         if (state == 1) {//手写
1573             control.style.display = "none";
1574             control.value = "";
1575             if (inputcontrol) {
1576                 inputcontrol.style.display = "none";
1577             }
1578             if (writecontrol) {
1579                 writecontrol.style.display = "";
1580             }
1581         }
1582         else {//键盘
1583             control.style.display = "";
1584             if (inputcontrol) {
1585                 inputcontrol.style.display = "";
1586             }
1587             if (writecontrol) {
1588                 writecontrol.style.display = "none";
1589             }
1590         }
1591     }
1592 
1593     function Opinion_Click(ideaID) {
1594         showDialog(\'@Url.Action("ImageDisplay", "Dispatch")\' + \'?id=\' + ideaID + "&rn=" + Math.random(), \'\', 800, 800);
1595     }
1596 </script>
1597 <script type="text/javascript">
1598     function GetSelectedUsers(sender) {
1599         $("#" + sender).parent().attr("title", $("#" + sender).val());
1600     }
1601 </script>
1602 
1603 <script type="text/javascript">
1604     var tree;
1605     function showCirculatePersons(nextStateID) {
1606 
1607         var ddlReceivedtype = $("#Receivedtype").data("tDropDownList");
1608         var receivedtype = ddlReceivedtype.value();
1609         if (receivedtype != 2) {
1610             alert("请确认【收件类型】是否是传阅件!");
1611             return;
1612         }
1613 
1614         var nodes = "";
1615         nodes = "[{text:\'全局\'";
1616 
1617         if (tree) {
1618             tree.clear();
1619         }
1620 
1621         $.post("/Receive/GetLeaderAndPartLeaderList", { swId: $("#ID").val() }, function (result) {
1622             nodes += ",children:[{text:\'局长及分管领导\',children:[";
1623             $.each(result.UserList, function (i, n) {
1624                 nodes += "{id:\'" + n.ID + "\',text:\'" + n.Displayname + "\',ischecked:" + result.CheckedList[i] + "},";
1625             });
1626             nodes = nodes.substr(0, nodes.length - 1);
1627             nodes += "]}";
1628 
1629             $.post("/Receive/GetMiddleLevelCadreList", { swId: $("#ID").val() }, function (result1) {
1630                 nodes += ",{text:\'中层领导\',children:[";
1631                 $.each(result1.UserList, function (i1, n1) {
1632                     nodes += "{id:\'" + n1.ID + "\',text:\'" + n1.Displayname + "\',ischecked:" + result1.CheckedList[i1] + "},";
1633                 });
1634                 nodes = nodes.substr(0, nodes.length - 1);
1635                 nodes += "]}";
1636 
1637                 $.post("/Receive/GetCommonWorkerList", { swId: $("#ID").val() }, function (result2) {
1638                     nodes += ",{text:\'工作人员\',children:[";
1639                     $.each(result2.UserList, function (i2, n2) {
1640                         nodes += "{id:\'" + n2.ID + "\',text:\'" + n2.Displayname + "\',ischecked:" + result2.CheckedList[i2] + "},";
1641                     });
1642                     nodes = nodes.substr(0, nodes.length - 1);
1643                     nodes += "]}";
1644 
1645                     nodes += "]}]";
1646                     tree = $("#treeCirculatePersons").ligerTree({ data: eval(\'(\' + nodes + \')\') });
1647                     //tree.collapseAll();
1648                 });
1649             });
1650         });
1651 
1652         $.ligerDialog.open({
1653             target: $("#divCirculatePersons"),
1654             buttons: [{ text: "确定", onclick: function (item, dialog) {
1655                 var mbox = $.ligerDialog.open({ target: $("#target1") });
1656                 dialog.hide();
1657 
1658                 var userIds = "";
1659                 var checkedNodes = tree.getChecked();
1660 
1661                 for (var i = 0; i < checkedNodes.length; ++i) {
1662                     var userId = checkedNodes[i].data.id;
1663                     if (userId != undefined && userId != "undefined") {
1664                         userIds += "," + userId;
1665                     }
1666                 }
1667 
1668                 if (userIds.length > 0 && userIds.indexOf(",") != -1) {
1669                     userIds = userIds.substr(1, userIds.length);
1670                 } else {
1671                     if ("@ViewBag.CurrentStateID" == "领导阅示") {
1672                         alert("请选择要传阅的人员!");
1673                         mbox.hide();
1674                         return;
1675                     }
1676                 }
1677 
1678                 if (\'@ViewBag.CurrentStateID\' == "办公室拟办") {
1679                     //提交至后台保存全局传阅人员
1680                     $.post("/Receive/SaveAllCirculate", { swId: $("#ID").val(), persons: userIds.replace(\';\', \',\') }, function (json) {
1681                         if (json.Success) {
1682                             //提交后台获取拟办意见
1683                             $.post("/Receive/GetOpinion", { persons: userIds.replace(\';\', \',\') }, function (result) {
1684                                 $("#txtOpinion").val(result.Data);
1685 
1686                                 $.post("/Receive/GetLeader", function (leader) {
1687                                     $("#value领导阅示").val(leader.Data);
1688                                     ExcuteFun("领导阅示", mbox);
1689                                 });
1690                             });
1691                         } else {
1692                             alert(json.Message);
1693                         }
1694                     });
1695                 } else if ("@ViewBag.CurrentStateID" == "领导阅示") {
1696 
1697                     //发送到下一个环节
1698                     var url = "/Receive/SendToNext" + "?templateID=@(ViewBag.TemplateID)&receiveID=" + $(\'#ID\').val() + "&nextStateID=" + nextStateID;
1699 
1700                     //                    if ($("#txtOpinion").length != 0 && $("#txtOpinion").val()) {
1701                     //                        url += "&opinion=" + $("#txtOpinion").val();
1702                     //                    }
1703 
1704                     $("#opinion").val($("#txtOpinion").val());
1705 
1706                     if (userIds) {
1707                         //                        var nextUserIds = userIds.replace(\';\', \',\');
1708                         //                        url += "&nextUserID=" + nextUserIds;
1709                         $("#nextUserIDs").val(userIds);
1710                     }
1711 
1712                     if (\'@ViewBag.InstanceID\') {
1713                         url += "&instanceID=@ViewBag.InstanceID";
1714                     }
1715 
1716                     url += "&currentStateID=" + \'@ViewBag.CurrentStateID\';
1717 
1718                     var fkid = \'@(!string.IsNullOrEmpty(Request["fkid"]) ? Request["fkid"] : "")\';
1719                     url += "&fkid=" + fkid;
1720 
1721                     url += GetWriteBoardUrl();
1722 
1723                     url += AddSendMessageParam();
1724 
1725                     $.post(encodeURI(url), $(\'form\').serializeArray()).done(function (json) {
1726                         alert(json.Msg);
1727 
1728                         mbox.hide();
1729                         if (json.Success) {
1730                             $("#nextUserIDs").val("");
1731                             window.close();
1732                         }
1733                     });
1734                 }
1735             }
1736             }, {
1737                 text: \'取消\',
1738                 onclick: function (item, dialog) {
1739                     dialog.hide();
1740                 }
1741             }]
1742         });
1743     }
1744 </script>
1745 <script type="text/javascript">
1746     function printSw() {
1747         var id = $("#ID").val();
1748 
1749         if (id != "") {
1750             var instanceId = \'@(Model == null ? "" : Model.Instanceid)\';
1751             $.post("/Receive/PrintSw?swId=" + id + "&instanceId=" + instanceId, null, function (result) {
1752                 if (result.Data.Success) {
1753                     showMaxWin("/Print/Index?url=" + result.Data.URL + "&bh=" + result.Data.BH, \'\');
1754                 } else {
1755                     $.ligerDialog.error(result.Data.Message, "错误");
1756                 }
1757             });
1758         }
1759         else {
1760             alert("请先保存!");
1761         }
1762     }
1763 </script>