From c2bd119aba05cee7fcb7eb8f2dd39ee4781b885c Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期五, 11 三月 2022 14:21:07 +0800 Subject: [PATCH] 质疑投诉打印格式修改 --- zhengcaioa/zhengcaioa/Views/CooperOrder/Printtousushu.cshtml | 175 ++++++++++++++++++++++++++++++++++------------------------ 1 files changed, 102 insertions(+), 73 deletions(-) diff --git a/zhengcaioa/zhengcaioa/Views/CooperOrder/Printtousushu.cshtml b/zhengcaioa/zhengcaioa/Views/CooperOrder/Printtousushu.cshtml index 4666fa0..0f4e6b3 100644 --- a/zhengcaioa/zhengcaioa/Views/CooperOrder/Printtousushu.cshtml +++ b/zhengcaioa/zhengcaioa/Views/CooperOrder/Printtousushu.cshtml @@ -69,26 +69,51 @@ @*<script src="~/js/plugins/iTexbox/itextbox.js" type="text/javascript"></script>*@ @*<script src="~/js/plugins/iuploader/iuploader.js"></script>*@ <script src="~/js/TUJS.js"></script> + <script language="javascript" src="~/js/fileSaver.js" type="text/javascript"></script> + <script language="javascript" src="~/js/jquery.wordexport.js" type="text/javascript"></script> </head> <body class="gray-bg" style="overflow:auto"> <form id="formtest"> <div class="wrapper wrapper-content" id="ibox-content" style="padding:15px;"> <div class="row"> <div id="content" style="overflow-y:auto;height:100%;background: #fff;width:850px; margin: 0 auto;"> + <style type="text/css"> + table { + width: 595px; + font-size: 16pt; + font-family: 'FangSong'; + background: #fff; + line-height: 1.5; + } + + span { + font-size: 16pt; + display: inline; + /* border-bottom: 1px dashed #111;*/ + } + + s22pan:after { + content: ''; + display: inline; + width: 100%; + margin-top: -5px; + /* border-bottom: 1px dashed #111;*/ + } + </style> <div id="page1" style="page-break-after:always;"> <table border="0" align="center" cellpadding="3" cellspacing="0"> <tr> <td colspan="2" style="font-size:29.3px;text-align:center">鎶曡瘔涔︼紙姝f湰锛�</td> </tr> <tr> - <td colspan="2" style="font-family:'SimHei';">涓�銆佹姇璇夌浉鍏充富浣撳熀鏈俊鎭�</td> + <td colspan="2" ><b>涓�銆佹姇璇夌浉鍏充富浣撳熀鏈俊鎭�</b></td> </tr> <tr> <td colspan="2" align="left">鎶曡瘔浜猴細<span style="width:460px;">@Model.TsrName</span></td> </tr> <tr> - <td width="60%" align="left">鍦板潃锛�<span style="width:290px;font-size:13pt;">@Model.TsrAddress</span></td> - <td width="40%" align="left">閭紪锛�<span style="width:160px;">@Model.TsrPostcode</span></td> + <td width="60%" align="left">鍦板潃锛�<span style="width:290px;">@Model.TsrAddress</span></td> + <td width="40%" align="left">@(string.IsNullOrEmpty(Model.TsrPostcode)?"":"閭紪锛�")<span style="width:160px;">@Model.TsrPostcode</span></td> </tr> <tr> <td colspan="2" align="left">娉曞畾浠h〃浜�/涓昏璐熻矗浜猴細<span style="width:460px;">@Model.TsrCorporation</span></td> @@ -109,7 +134,7 @@ </tr> <tr> <td align="left">鍦板潃@(i!=0?(i+""):"")锛�<span style="width:290px;font-size:13pt;">@complaintShouquandaibiaoDTOs[i].Dizhi </span></td> - <td align="left">閭紪@(i!=0?(i+""):"")锛�<span style="width:160px;">@complaintShouquandaibiaoDTOs[i].Youbian </span></td> + <td align="left">@(string.IsNullOrEmpty(complaintShouquandaibiaoDTOs[i].Youbian)?"":"閭紪锛�")@(i!=0?(i+""):"")锛�<span style="width:160px;">@complaintShouquandaibiaoDTOs[i].Youbian </span></td> </tr> } @for (int i = 0; i < complaintRespondentDTOs.Count; i++) @@ -121,7 +146,7 @@ </tr> <tr> <td align="left">鍦板潃锛�<span style="width:290px;font-size:13pt;">@complaintRespondentDTOs[i].Address </span></td> - <td align="left">閭紪锛�<span style="width:160px;">@complaintRespondentDTOs[i].Postcode </span></td> + <td align="left">@(string.IsNullOrEmpty(complaintRespondentDTOs[i].Postcode)?"":"閭紪锛�")<span style="width:160px;">@complaintRespondentDTOs[i].Postcode </span></td> </tr> <tr> <td align="left">鑱旂郴浜猴細<span style="width:290px;">@complaintRespondentDTOs[i].Contacts </span></td> @@ -135,7 +160,7 @@ </tr> <tr> <td align="left">鍦板潃@(i+1)锛�<span style="width:290px;font-size:13pt;">@complaintRespondentDTOs[i].Address </span></td> - <td align="left">閭紪@(i+1)锛�<span style="width:160px;">@complaintRespondentDTOs[i].Postcode </span></td> + <td align="left">@(string.IsNullOrEmpty(complaintRespondentDTOs[i].Postcode)?"":"閭紪锛�")@(i+1)锛�<span style="width:160px;">@complaintRespondentDTOs[i].Postcode </span></td> </tr> <tr> <td align="left">鑱旂郴浜篅(i+1)锛�<span style="width:290px;">@complaintRespondentDTOs[i].Contacts </span></td> @@ -154,7 +179,7 @@ </tr> <tr> <td align="left">鍦板潃锛�<span style="width:290px;font-size:13pt;">@complaintGongyingshangDTOs[i].Dizhi </span></td> - <td align="left">閭紪锛�<span style="width:160px;">@complaintGongyingshangDTOs[i].Youbian </span></td> + <td align="left">@(string.IsNullOrEmpty(complaintGongyingshangDTOs[i].Youbian)?"":"閭紪锛�")<span style="width:160px;">@complaintGongyingshangDTOs[i].Youbian </span></td> </tr> <tr> <td align="left">鑱旂郴浜猴細<span style="width:290px;font-size:13pt;">@complaintGongyingshangDTOs[i].Dizhi </span></td> @@ -168,7 +193,7 @@ </tr> <tr> <td align="left">鍦板潃@(i+1)锛�<span style="width:290px;font-size:13pt;">@complaintGongyingshangDTOs[i].Dizhi </span></td> - <td align="left">閭紪@(i+1)锛�<span style="width:160px;">@complaintGongyingshangDTOs[i].Youbian </span></td> + <td align="left">@(string.IsNullOrEmpty(complaintGongyingshangDTOs[i].Youbian)?"":"閭紪锛�")@(i+1)锛�<span style="width:160px;">@complaintGongyingshangDTOs[i].Youbian </span></td> </tr> <tr> <td align="left">鑱旂郴浜篅(i+1)锛�<span style="width:290px;font-size:13pt;">@complaintGongyingshangDTOs[i].Dizhi </span></td> @@ -179,7 +204,7 @@ } <tr> - <td colspan="2" style="font-family:'SimHei';">浜屻�佹姇璇夐」鐩熀鏈儏鍐�</td> + <td colspan="2" ><b>浜屻�佹姇璇夐」鐩熀鏈儏鍐�</b></td> </tr> <tr> <td colspan="2" align="left">閲囪喘椤圭洰鐨勫悕绉帮細<span style="width:415px;font-size:13pt;">@Model.XmName </span></td> @@ -203,7 +228,7 @@ <td align="left">鍏憡鏈熼檺锛�<span style="width:160px;">@Model.ResultnoticeDateName </span></td> </tr> <tr> - <td colspan="2" style="font-family:'SimHei';">涓夈�佽川鐤戝熀鏈儏鍐�</td> + <td colspan="2" ><b>涓夈�佽川鐤戝熀鏈儏鍐�</b></td> </tr> <tr> <td align="left" colspan="2"> @@ -229,7 +254,7 @@ </tr> <tr> - <td colspan="2" style="font-family:'SimHei';">鍥涖�佹姇璇変簨椤瑰叿浣撳唴瀹�</td> + <td colspan="2" ><b>鍥涖�佹姇璇変簨椤瑰叿浣撳唴瀹�</b></td> </tr> @{ @@ -240,60 +265,79 @@ <tr> <td colspan="2"> 鎶曡瘔浜嬮」锛�<span style="text-indent:10px">@complaintItemDTOs[i].QuestionName </span> - <br /> - 浜嬪疄渚濇嵁锛� @Html.Raw("<span>" + (string.IsNullOrEmpty(complaintItemDTOs[i].Evidential) ? "" : complaintItemDTOs[i].Evidential.Replace(" ", " ").Replace("\r", "<br/>")) + "</span>"); - <br /> - @for (int j = 0; j < complaintItemDTOs[i].sysCodeDtls.Count; j++) - { - - - if (complaintItemDTOs[i].sysCodeDtls.Count == 1) - { - @Html.Raw("娉曞緥渚濇嵁锛�<span>銆�" + complaintItemDTOs[i].sysCodeDtls[j].CodeSn + "銆�" + complaintItemDTOs[i].sysCodeDtls[j].Classify2 + "锛�" + complaintItemDTOs[i].sysCodeDtls[j].Contents + "</span>") - <br /> - } - else - { - @Html.Raw("娉曞緥渚濇嵁" + (j + 1) + "锛�<span>銆�" + complaintItemDTOs[i].sysCodeDtls[j].CodeSn + "銆�" + complaintItemDTOs[i].sysCodeDtls[j].Classify2 + "锛�" + complaintItemDTOs[i].sysCodeDtls[j].Contents + "</span>") - <br /> - - } - } </td> </tr> + <tr> + <td colspan="2"> + 浜嬪疄渚濇嵁锛� @Html.Raw("<span>" + (string.IsNullOrEmpty(complaintItemDTOs[i].Evidential) ? "" : complaintItemDTOs[i].Evidential.Replace(" ", " ").Replace("\r", "<br/>")) + "</span>"); + </td> + </tr> + + @for (int j = 0; j < complaintItemDTOs[i].sysCodeDtls.Count; j++) + { + + + if (complaintItemDTOs[i].sysCodeDtls.Count == 1) + { + <tr> + <td colspan="2"> + @Html.Raw("娉曞緥渚濇嵁锛�<span>銆�" + complaintItemDTOs[i].sysCodeDtls[j].CodeSn + "銆�" + complaintItemDTOs[i].sysCodeDtls[j].Classify2 + "锛�" + complaintItemDTOs[i].sysCodeDtls[j].Contents + "</span>") + </td> + </tr> + } + else + { + <tr> + <td colspan="2"> + @Html.Raw("娉曞緥渚濇嵁" + (j + 1) + "锛�<span>銆�" + complaintItemDTOs[i].sysCodeDtls[j].CodeSn + "銆�" + complaintItemDTOs[i].sysCodeDtls[j].Classify2 + "锛�" + complaintItemDTOs[i].sysCodeDtls[j].Contents + "</span>") + </td> + </tr> + + } + } + } else { <tr> <td colspan="2"> 鎶曡瘔浜嬮」@((i+1)+"")锛�<span style="text-indent:10px">@complaintItemDTOs[i].QuestionName </span> - <br /> - 浜嬪疄渚濇嵁@((i+1)+"")锛欯Html.Raw("<span>" +(string.IsNullOrEmpty(complaintItemDTOs[i].Evidential)?"": complaintItemDTOs[i].Evidential.Replace(" ", " ").Replace("\r", "<br/>")) + "</span>"); - <br /> - @for (int j = 0; j < complaintItemDTOs[i].sysCodeDtls.Count; j++) - { - - - if (complaintItemDTOs[i].sysCodeDtls.Count == 1) - { - @Html.Raw("娉曞緥渚濇嵁锛�<span>銆�" + complaintItemDTOs[i].sysCodeDtls[j].CodeSn + "銆�" + complaintItemDTOs[i].sysCodeDtls[j].Classify2 + "锛�" + complaintItemDTOs[i].sysCodeDtls[j].Contents + "</span>") - <br /> - } - else - { - @Html.Raw("娉曞緥渚濇嵁" + (j + 1) + "锛�<span>銆�" + complaintItemDTOs[i].sysCodeDtls[j].CodeSn + "銆�" + complaintItemDTOs[i].sysCodeDtls[j].Classify2 + "锛�" + complaintItemDTOs[i].sysCodeDtls[j].Contents + "</span>") - <br /> - - } - } </td> </tr> + <tr> + <td colspan="2"> + 浜嬪疄渚濇嵁@((i+1)+"")锛欯Html.Raw("<span>" + (string.IsNullOrEmpty(complaintItemDTOs[i].Evidential) ? "" : complaintItemDTOs[i].Evidential.Replace(" ", " ").Replace("\r", "<br/>")) + "</span>"); + </td> + </tr> + @for (int j = 0; j < complaintItemDTOs[i].sysCodeDtls.Count; j++) + { + + + if (complaintItemDTOs[i].sysCodeDtls.Count == 1) + { + <tr> + <td colspan="2"> + @Html.Raw("娉曞緥渚濇嵁锛�<span>銆�" + complaintItemDTOs[i].sysCodeDtls[j].CodeSn + "銆�" + complaintItemDTOs[i].sysCodeDtls[j].Classify2 + "锛�" + complaintItemDTOs[i].sysCodeDtls[j].Contents + "</span>") + </td> + </tr> + } + else + { + <tr> + <td colspan="2"> + @Html.Raw("娉曞緥渚濇嵁" + (j + 1) + "锛�<span>銆�" + complaintItemDTOs[i].sysCodeDtls[j].CodeSn + "銆�" + complaintItemDTOs[i].sysCodeDtls[j].Classify2 + "锛�" + complaintItemDTOs[i].sysCodeDtls[j].Contents + "</span>") + </td> + </tr> + + } + } + } } } <tr> - <td colspan="2" style="font-family:'SimHei';">浜斻�佷笌鎶曡瘔浜嬮」鐩稿叧鐨勬姇璇夎姹�</td> + <td colspan="2" ><b>浜斻�佷笌鎶曡瘔浜嬮」鐩稿叧鐨勬姇璇夎姹�</b></td> </tr> <tr> <td colspan="2" align="left">璇锋眰锛�<span>@Model.RequestInfoName</span></td> @@ -306,35 +350,13 @@ <td align="left">鍏珷锛�</td> </tr> <tr> - <td colspan="2" align="left">鏃ユ湡锛�</td> + <td colspan="2" align="left">鏃ユ湡锛欯DateTime.Now.ToString("yyyy-MM-dd")</td> </tr> </table> </div> - <style type="text/css"> - table { - width: 595px; - font-size: 16pt; - font-family: 'FangSong'; - background: #fff; - line-height: 1.5; - } - span { - font-size: 15pt; - display: inline; - border-bottom: 1px dashed #111; - } - - s22pan:after { - content: ''; - display: inline; - width: 100%; - margin-top: -5px; - border-bottom: 1px dashed #111; - } - </style> </div> </div> @@ -346,6 +368,10 @@ <a class="btn btn-success" href="javascript:void(0)" onclick="printWin();" style="margin-left:4px; border-radius:4px;"> <i class="glyphicon glyphicon-ok"></i> <span class="bold">鎵撳嵃</span> + </a> + + <a class="btn btn-success" href="javascript:void(0)" onclick="daochuword();" style="margin-left:4px; border-radius:4px;"> + <i class="glyphicon glyphicon-ok"></i> <span class="bold">瀵煎嚭word</span> </a> </div> </div> @@ -376,6 +402,9 @@ return false; } + function daochuword() { + $("#content").wordExport("鎶曡瘔涔(Html.Raw(Model.TsrName))"); //fileName涓哄鍑虹殑word鏂囦欢鐨勫懡鍚�,content涓鸿瀵煎嚭鐨刪tml鍐呭瀹瑰櫒 + } -- Gitblit v1.9.1