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/PrintZhiyihan.cshtml | 162 ++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 115 insertions(+), 47 deletions(-)
diff --git a/zhengcaioa/zhengcaioa/Views/CooperOrder/PrintZhiyihan.cshtml b/zhengcaioa/zhengcaioa/Views/CooperOrder/PrintZhiyihan.cshtml
index d1af538..3d045b4 100644
--- a/zhengcaioa/zhengcaioa/Views/CooperOrder/PrintZhiyihan.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/CooperOrder/PrintZhiyihan.cshtml
@@ -40,7 +40,7 @@
<link href="~/css/plugins/toastr/toastr.min.css" rel="stylesheet" />
<link href="~/css/plugins/webuploader/webuploader.css" rel="stylesheet" />
-
+
<!-- jqgrid-->
@*<link href="~/css/plugins/jqgrid/ui.jqgrid.css" rel="stylesheet">*@
@@ -65,26 +65,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.GysName</span></td>
</tr>
<tr>
- <td width="60%" align="left">鍦板潃锛�<span style="width:290px;font-size:13pt;">@Model.GysAddress</span></td>
- <td width="40%" align="left">閭紪锛�<span style="width:160px;">@Model.GysPostcode</span></td>
+ <td width="60%" align="left">鍦板潃锛�<span style="width:290px;">@Model.GysAddress</span></td>
+ <td width="40%" align="left">@(string.IsNullOrEmpty(Model.GysPostcode)?"":"閭紪锛�" )<span style="width:160px;">@Model.GysPostcode</span></td>
</tr>
<tr>
<td align="left">鑱旂郴浜猴細<span style="width:265px;">@Model.GysContacts </span></td>
@@ -101,11 +126,11 @@
</tr>
<tr>
<td align="left">鍦板潃@(i!=0?(i+""):"")锛�<span style="width:290px;font-size:13pt;">@challengecomplaintShouquandaibiaoDTOs[i].Dizhi </span></td>
- <td align="left">閭紪@(i!=0?(i+""):"")锛�<span style="width:160px;">@challengecomplaintShouquandaibiaoDTOs[i].Youbian </span></td>
+ <td align="left">@(string.IsNullOrEmpty(challengecomplaintShouquandaibiaoDTOs[i].Youbian)?"":"閭紪")@(i!=0?(i+""):"")锛�<span style="width:160px;">@challengecomplaintShouquandaibiaoDTOs[i].Youbian </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 style="width:415px;font-size:13pt;">@Model.XmName </span></td>
@@ -121,36 +146,96 @@
<td colspan="2" align="left">閲囪喘鏂囦欢鑾峰彇鏃ユ湡锛�<span style="width:395px;">@Model.DocumentsDateName </span></td>
</tr>
<tr>
- <td colspan="2" style="font-family:'SimHei';">涓夈�佽川鐤戜簨椤瑰叿浣撳唴瀹�</td>
+ <td colspan="2"><b>涓夈�佽川鐤戜簨椤瑰叿浣撳唴瀹�</b></td>
</tr>
@{
@for (int i = 0; i < challengeItemDTOs.Count; i++)
{
- <tr>
- <td colspan="2">
- 璐ㄧ枒浜嬮」@((i + 1) + "")锛�<span style="text-indent:10px">@challengeItemDTOs[i].QuestionName </span>
- <br />
- 浜嬪疄渚濇嵁锛�<span>@challengeItemDTOs[i].Evidential</span>
- <br />
- @for (int j = 0; j < challengeItemDTOs[i].sysCodeDtls.Count; j++)
+ if (challengeItemDTOs.Count == 1)
+ {
+ <tr>
+ <td colspan="2">
+ 璐ㄧ枒浜嬮」锛�<span style="text-indent:10px">@challengeItemDTOs[i].QuestionName </span>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ 浜嬪疄渚濇嵁锛欯Html.Raw("<span>" + (string.IsNullOrEmpty(challengeItemDTOs[i].Evidential) ? "" : challengeItemDTOs[i].Evidential.Replace(" ", " ").Replace("\r", "<br/>")) + "</span>");
+ </td>
+ </tr>
+
+ @for (int j = 0; j < challengeItemDTOs[i].sysCodeDtls.Count; j++)
+ {
+ if (challengeItemDTOs[i].sysCodeDtls.Count == 1)
{
+ <tr>
+ <td colspan="2">
+ @Html.Raw("娉曞緥渚濇嵁锛�<span>銆�" + challengeItemDTOs[i].sysCodeDtls[j].CodeSn + "銆�" + challengeItemDTOs[i].sysCodeDtls[j].Classify2 + "锛�" + challengeItemDTOs[i].sysCodeDtls[j].Contents + "</span>")
+ </td>
+ </tr>
+ }
+ else
+ {
+ <tr>
+ <td colspan="2">
+ @Html.Raw("娉曞緥渚濇嵁" + (j + 1) + "锛�<span>銆�" + challengeItemDTOs[i].sysCodeDtls[j].CodeSn + "銆�" + challengeItemDTOs[i].sysCodeDtls[j].Classify2 + "锛�" + challengeItemDTOs[i].sysCodeDtls[j].Contents + "</span>")
+ </td>
+ </tr>
-
- @Html.Raw("娉曞緥渚濇嵁" + (j + 1) + "锛�")<span>@challengeItemDTOs[i].sysCodeDtls[j].CodeSn</span>
- <br />
- @Html.Raw("鍐呭" + (j + 1) + "锛�")<span>@challengeItemDTOs[i].sysCodeDtls[j].Contents</span>
- <br />
}
- </td>
- </tr>
+ }
+
+
+
+ }
+ else
+ {
+ <tr>
+ <td colspan="2">
+ 璐ㄧ枒浜嬮」@((i + 1) + "")锛�<span style="text-indent:10px">@challengeItemDTOs[i].QuestionName </span>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ 浜嬪疄渚濇嵁@((i + 1) + "")锛� @Html.Raw("<span>" + (string.IsNullOrEmpty(challengeItemDTOs[i].Evidential) ? "" : challengeItemDTOs[i].Evidential.Replace(" ", " ").Replace("\r", "<br/>")) + "</span>");
+ </td>
+ </tr>
+
+ @for (int j = 0; j < challengeItemDTOs[i].sysCodeDtls.Count; j++)
+ {
+
+
+ if (challengeItemDTOs[i].sysCodeDtls.Count == 1)
+ {
+ <tr>
+ <td colspan="2">
+ @Html.Raw("娉曞緥渚濇嵁锛�<span>銆�" + challengeItemDTOs[i].sysCodeDtls[j].CodeSn + "銆�" + challengeItemDTOs[i].sysCodeDtls[j].Classify2 + "锛�" + challengeItemDTOs[i].sysCodeDtls[j].Contents + "</span>")
+
+ </td>
+ </tr>
+ }
+ else
+ {
+ <tr>
+ <td colspan="2">
+ @Html.Raw("娉曞緥渚濇嵁" + (j + 1) + "锛�<span>銆�" + challengeItemDTOs[i].sysCodeDtls[j].CodeSn + "銆�" + challengeItemDTOs[i].sysCodeDtls[j].Classify2 + "锛�" + challengeItemDTOs[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>
@@ -163,36 +248,14 @@
<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>
</div>
</div>
@@ -203,6 +266,9 @@
<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>
@@ -234,7 +300,9 @@
}
-
+ function daochuword() {
+ $("#content").wordExport("璐ㄧ枒鍑紷(Html.Raw(Model.GysName))"); //fileName涓哄鍑虹殑word鏂囦欢鐨勫懡鍚�,content涓鸿瀵煎嚭鐨刪tml鍐呭瀹瑰櫒
+ }
--
Gitblit v1.9.1