Преглед изворни кода

web 流程任务打印表单

应县
yxq пре 1 година
родитељ
комит
86b108b838
2 измењених фајлова са 40 додато и 16 уклоњено
  1. +18
    -8
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jqprint/jqprint.css
  2. +22
    -8
      Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js

+ 18
- 8
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jqprint/jqprint.css Прегледај датотеку

@@ -528,16 +528,24 @@ td,th {
.titletd {
border:none!important;
}
.inputname {
text-align: right;
width: 40mm;
.input {
text-align: center;
font-size: 20px
}

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

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

+ 22
- 8
Learun.Framework.Ultimate V7/Learun.Application.Web/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js Прегледај датотеку

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

//// 打印表单
a.jqprintForm = function (data) {
a.jqprintForm = function (data,cssUrl) {
b = a.fn.jqprint.defaults;
if (b.operaSupport && a.browser.opera) {
var c = window.open("", "jqPrint-preview");
@@ -160,9 +160,11 @@
}
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) {
if (_item.type == 'gird' && _item.data.length > 0) {
if (num > 0 && num < 24) {
@@ -207,7 +209,7 @@
if (_item.textList) {
_text = String(_item.textList);
}
var $td = a('<td colspan="' + _item.col + '">' + _text + '</td>');
var $td = a('<td colspan="' + _item.col + '"' + 'class="col_' + _item.col + '">' + _text + '</td>');

$tr.append('<td colspan="' + _item.col + '">' + _item.name + ':</td>');
$tr.append($td);
@@ -220,15 +222,23 @@

}
else if (_item.type == 'anodeinfo') {
if (num >= 0 && num < 24) {
if (!anodeinfoIng) {
anodeinfoIng = true

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

var colspan = 24 - _item.col;
$tr.append('<td colspan="' + _item.col + '">' + _item.title + ':</td>');
var __$td = a('<td class="anodeinfo"colspan="' + colspan + '" ><div class="anodeinfod" >' + _item.content + '</div></td>');
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>');

var _$div = __$td.find('div');

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

$tr.append(__$td);

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


Loading…
Откажи
Сачувај