Browse Source

web 流程任务 打印

应县
yxq 1 year ago
parent
commit
fe44265b72
2 changed files with 25 additions and 44 deletions
  1. +12
    -19
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jqprint/jqprint.css
  2. +13
    -25
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js

+ 12
- 19
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jqprint/jqprint.css View File

@@ -10,7 +10,7 @@
/* Document
========================================================================== */

html {
html {
font-family: sans-serif; /* 1 */
line-height: 1.15; /* 2 */
-ms-text-size-adjust: 100%; /* 3 */
@@ -528,24 +528,19 @@ td,th {
.titletd {
border:none!important;
}
.input {
text-align: center;
font-size: 20px
.inputname {
text-align: right;
width: 26mm;
}
.input.col_6{
width: 0mm;
}

.input.inputname {
text-align: center;
}
td.col_6{
max-width: 200px;
}
.anodeinfod {
position: relative;
width: 100%;
height: 170px;
height: 95px;
padding: 8px;
text-align: left;
font-size: 18px !important;
}

.anodeinfod .tuser, .anodeinfod .tdate {
@@ -557,10 +552,8 @@ td,th {
bottom: 10px;
}
.anodeinfod img {
height: 70px;
position: absolute;
top: 50px;
right: 0;
left: 0;
margin: 0 auto;
height:60px;
position:absolute;
top:10px;
right:100px;
}

+ 13
- 25
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js View File

@@ -140,7 +140,7 @@
};

//// 打印表单
a.jqprintForm = function (data,cssUrl) {
a.jqprintForm = function (data) {
b = a.fn.jqprint.defaults;
if (b.operaSupport && a.browser.opera) {
var c = window.open("", "jqPrint-preview");
@@ -160,12 +160,12 @@
}
d.write("<title></title><style>@page{size: auto;margin: 0mm;}html{background-color: #FFFFFF;margin: 0px;}body{border: solid 1px blue;margin: 100mm;}</style >");
d.write("<link type='text/css' rel='stylesheet' href='" + top.$.rootUrl + "/Content/jquery/plugin/jqprint/jqprint.css' />");
if (cssUrl) d.write("<link type='text/css' rel='stylesheet' href='" + top.$.rootUrl + cssUrl + "' />");
var $table = a('<table></table>');
var num = 24;
var $tr = a('<tr></tr>');
var anodeinfoIng = false
$.each(data, function (_index, _item) {
console.log(_item.type,_item.name,_item.col,_item)
if(_item.text == '==请选择==') _item.text = ''
if (_item.type == 'gird' && _item.data.length > 0) {
if (num > 0 && num < 24) {
$table.append($tr);
@@ -202,16 +202,16 @@
}
else if (_item.type == 'input') {
var colspan = _item.col * 2 - 1;
var _text = '';
var _text = '';
if (_item.text) {
_text = _item.text;
}
if (_item.textList) {
_text = String(_item.textList);
}
var $td = a('<td colspan="' + _item.col + '"' + 'class="col_' + _item.col + '">' + _text + '</td>');
$tr.append('<td colspan="' + _item.col + '">' + _item.name + ':</td>');
}
var $td = a('<td class="input col_' + _item.col + '" >' + _text + (_item.name == '备注'?'按时鉴定会加上客户端按时鉴定会加上客户端按时鉴定会加上客户端按时鉴定会加上客户端按时鉴定会加上客户端按时鉴定会加上客户端按时鉴定会加上客户端按时鉴定会加上客户端按时鉴定会加上客户端':'') + '</td>');
$td.attr('colspan', colspan);
$tr.append('<td class="input inputname" >' + '好' +_item.name + ':</td>');
$tr.append($td);
num = num - colspan - 1;
if (num <= 0) {
@@ -222,23 +222,15 @@

}
else if (_item.type == 'anodeinfo') {
if (!anodeinfoIng) {
anodeinfoIng = true

if (num >= 0 && num < 24) {
$table.append($tr);
$tr = a('<tr></tr>');
num = 24;
}

let isLast = false
if (!data[_index + 1] || data[_index + 1].type != 'anodeinfo') {
anodeinfoIng = false
isLast = true
}

$tr.append('<td class="input inputname" style="font-size:18px;">' + _item.title + ':</td>');
var __$td = a('<td class="anodeinfo" width="400px" colspan="' + (isLast ? "23" : "11") + '" ><div class="anodeinfod" >' + _item.content + '</div></td>');

$tr.append('<td class="input inputname" >' + _item.title + ':</td>');
var __$td = a('<td class="anodeinfo" colspan="23" ><div class="anodeinfod" >' + _item.content + '</div></td>');
var _$div = __$td.find('div');

_$div.append('<div class="tuser" >' + _item.user + '</div>');
@@ -252,12 +244,8 @@

$tr.append(__$td);

num = num - 12;
if (num <= 0 || isLast) {
num = 24;
$table.append($tr);
$tr = a('<tr></tr>');
}
$table.append($tr);
$tr = a('<tr></tr>');
}
else {
var _colspan = _item.col * 2;


Loading…
Cancel
Save