|
@using DTO;
|
@using Newtonsoft.Json;
|
@{List<ActionEntity> actionlist = ViewData["ActionInfo"] as List<ActionEntity>; }
|
<!DOCTYPE html>
|
<html>
|
<head>
|
<meta charset="utf-8">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="Pragma" content="no-cache">
|
<meta http-equiv="Cache-Control" content="no-siteapp" />
|
<meta http-equiv="Cache-Control" content="no-cache">
|
<meta http-equiv="Expires" content="0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
<meta name="renderer" content="webkit">
|
<title>@(ViewBag.PageTitle + " - " + SiteConfig.SiteName)</title>
|
<meta name="keywords" content="@SiteConfig.Keywords">
|
<meta name="description" content="@SiteConfig.Description">
|
<meta name="author" content="@SiteConfig.Author">
|
<link rel="shortcut icon" href="@SiteConfig.ShortcutIcon">
|
<link href="~/css/bootstrap.min.css" rel="stylesheet">
|
<link href="~/css/font-awesome.min.css" rel="stylesheet">
|
<link href="~/css/animate.min.css" rel="stylesheet">
|
|
<link href="~/css/plugins/iCheck/custom.css" rel="stylesheet">
|
<link href="~/css/style.min.css" rel="stylesheet">
|
<link href="~/css/plugins/chosen/chosen.css" rel="stylesheet">
|
<link href="~/js/plugins/layer/skin/layer.css" rel="stylesheet">
|
<link href="~/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
|
<link href="~/css/style.min.css" rel="stylesheet">
|
<!-- jqgrid-->
|
<link href="~/css/plugins/jqgrid/ui.jqgrid.css" rel="stylesheet">
|
<script language="javascript" src="~/js/jquery.min.js" type="text/javascript"></script>
|
<script src="~/js/bootstrap.min.js"></script>
|
<script src="~/js/plugins/bootstro/bootstro.js"></script>
|
<link href="~/js/plugins/bootstro/bootstro.css" rel="stylesheet" />
|
|
<!--容器-->
|
|
|
<script language="javascript" src="~/js/datehelper.js" type="text/javascript"></script>
|
<script language="javascript" src="~/js/plugins/query/jquery.query-object.js" type="text/javascript"></script>
|
<script language="javascript" src="~/js/plugins/iCheck/icheck.min.js" type="text/javascript"></script>
|
<script language="javascript" src="~/js/plugins/chosen/chosen.jquery.js" type="text/javascript"></script>
|
<script language="javascript" src="~/js/plugins/datapicker/bootstrap-datepicker.js" type="text/javascript"></script>
|
<script language="javascript" src="~/js/plugins/layer/layer.js" type="text/javascript"></script>
|
<script src="~/js/plugins/jqgrid/jquery.jqGrid.min.js" type="text/javascript"></script>
|
<script src="~/js/plugins/jqgrid/i18n/grid.locale-cn.js" type="text/javascript"></script>
|
<script src="~/js/plugins/toastr/toastr.min.js" type="text/javascript"></script>
|
|
<script language="javascript" src="~/js/common-layout.js" type="text/javascript"></script>
|
<script src="~/js/plugins/layer/laydate/laydate.js" type="text/javascript"></script>
|
<script src="~/js/plugins/iTexbox/itextbox.js" type="text/javascript"></script>
|
<script src="~/js/plugins/iuploader/iuploader.js"></script>
|
<script language="javascript" src="~/js/edit.js?v=8" type="text/javascript"></script>
|
<script src="~/js/TUJS.js"></script>
|
<script language="javascript" type="text/javascript">
|
var controllist = []; //控件列表
|
var saveurl = "/Liaotian/Save";//保存url
|
var adddataurl = "";//添加时默认数据url返回json数据
|
var editurl = "/Liaotian/EditLiaotian";//编辑时获取数据的url返回json数据
|
var submiturl = "";//提交时配置的url 返回json数据
|
var verifyurl = "";//审核通过时配置的url 返回json数据
|
var verifyfailedurl = "";//审核不通过时配置的url 返回json数据
|
var nullifyurl = "";//废弃取消单据时的url 返回json数据
|
var deldtlurl = "";//删除单据明细时时配置的url 返回json数据
|
var comment = "";//对流程进行说明的内容,放在最下面
|
|
var editjson = undefined;
|
var savedata = undefined; //不使用框架获取值时使用此参数
|
var isauto = false; //不使用框架获取值时此参数设置为true
|
var selectoptions = undefined;
|
var _accountantNode = '会计审批';//会计审批节点 判断是否会计节点对象
|
var _cashierNode = "出纳审批";
|
var savesuccessmsg = ""//保存成功的提示
|
var id = '';
|
|
Verify.isEmptyMsg = '为空';
|
Verify.isShortLengthMsg = '长度过长';
|
/**/
|
Verify.isLongLengthMsg = '长度过长';
|
/**/
|
|
</script>
|
@RenderSection("headerStyle", false)
|
</head>
|
<body class="gray-bg">
|
<form id="formtest">
|
<div class="wrapper wrapper-content" id="ibox-content" style="padding:15px;">
|
|
</div>
|
|
@*<div id="aa"></div>
|
<textarea id="t"></textarea>*@
|
|
|
|
<div class="ibox-content" id="top" style="z-index:100; position:fixed; height:50px; width:100%;bottom:0;text-align: right; padding-top:8px ">
|
|
|
|
<div class="" style="float:right" data-bootstro-width="500px" data-bootstro-content="功能按钮:“保存”,“删除”">
|
@foreach (var item in actionlist)
|
{
|
<a style="margin-left:4px; border-radius:4px;" class="btn btn-success @(item.OpenType==1? "J_menuItem": "") @(item.ActionName.IndexOf("删除")>-1?"btn-default":"")" @(item.OpenType == 2 ? "target=_blank" : "") @(item.OpenType != 0 ? "href=" + item.ActionUrl + "" : "") @(item.OpenType == 0 ? "onclick=_page" + item.ActionFun + "()" : "")>
|
<i class="@item.PageIco"></i> <span class="bold">@item.ActionName</span>
|
</a>
|
|
}
|
|
</div>
|
<div class="bootstro" style="float:left; width:400px;height:40px" id="divexam" data-bootstro-width="500px" data-bootstro-content="当前业务单据基础信息:单据类型,申请人,单据状态,当前节点,当前节点审批人">
|
</div>
|
<div class="bootstro" style="float:left; margin-left:50px; height:40px;width:200px; border:0px solid aquamarine ; overflow:auto" id="divcomment" data-bootstro-content="当前业务单据操作说明"></div>
|
</div>
|
|
|
|
|
@*//<i class="fa fa-search animated bounceInLeft" id="selectbtn" style="z-index:100;top:200px; right:60px ;position:fixed;font-size:xx-large; text-align:center; vertical-align:middle;padding-top:10px; width:50px; height:50px; color:orangered;border-radius:25px;border: 1px solid cornflowerblue; background-color:cornflowerblue;cursor:pointer"></i>*@
|
|
<i class="animated bounceInLeft" id="selectbtn" style="background-image:url(/img/document_add.png) ; z-index:100;top:200px; right:60px ;position:fixed;font-size:xx-large; text-align:center; vertical-align:middle;padding-top:10px; width:48px; height:48px; color:orangered; cursor:pointer"></i>
|
|
|
|
<div style="z-index:100;top:260px; right:60px ;position:fixed;border: 1px solid cornflowerblue; display:none" id="select">
|
|
<i>原始单据选择</i>
|
<div class="input-group col-sm-5" id="selecttxt" style="width:250px">
|
</div>
|
<br />
|
</div>
|
|
</form>
|
|
|
<script language="javascript" type="text/javascript">
|
var ischeck = true;
|
var panel = 0;
|
var panel1 = 0;
|
var id = '';
|
var isEdit = false;
|
//grid方法
|
$.jgrid.defaults.styleUI = 'Bootstrap';
|
$(document).ready(function () {
|
$("#selectbtn").hide();
|
|
$("[data-toggle='tooltip']").tooltip({ html: true });
|
|
|
|
if (selectoptions != undefined && selectoptions.visible != undefined && selectoptions.visible) {
|
$("#selectbtn").show();
|
$("#selecttxt").iTexbox(selectoptions);
|
|
var ttname = "";
|
if (selectoptions.label != undefined && selectoptions.label != "") {
|
ttname = selectoptions.label
|
}
|
if (selectoptions.remark != undefined && selectoptions.remark != "") {
|
ttname += '|' + selectoptions.remark
|
}
|
if (ttname != "") {
|
// $("#selectbtn").attr("title", ttname);
|
}
|
$("#selectbtn").click(function () {
|
$("#selecttxt").clear();
|
$("#selecttxt").search();
|
});
|
// $("#selectbtn").attr("data-bootstro-step", "0");
|
$("#selectbtn").attr("data-bootstro-content", ttname);
|
$("#selectbtn").attr("data-bootstro-placement", "left");
|
$("#selectbtn").addClass("bootstro");
|
|
|
// 动画效果
|
|
}
|
else {
|
|
}
|
$("#divcomment").html(comment);
|
//取地址参数
|
var url = window.location.href;
|
|
// if (url.substring(url.length - 1) == '/') url = url.substring(0, url.length - 1);
|
|
// var checkid = url.substring(url.lastIndexOf('/') + 1);
|
|
//var regcheckid = new RegExp("^[0-9]*$");
|
//if (regcheckid.test(checkid))
|
// id = checkid;
|
if (id == null || id == undefined || id == '') {
|
var checkid = getUrlParam("id");
|
// if (regcheckid.test(checkid))
|
id = checkid;
|
if (id == null || id == undefined || id == '') {
|
id = '';
|
isEdit = false;
|
} else {
|
isEdit = true;
|
}
|
}
|
else { isEdit = true; }
|
|
|
//创建控件没调用
|
create(controllist, 'ibox-content', isEdit);
|
if (typeof (_afterLoadUI) == "function") {
|
_afterLoadUI();
|
}
|
//var hh = document.body.clientHeight - 168;
|
//$("#div_content").height(hh);
|
|
ShowBootstro();
|
$(".i-checks").iCheck({ checkboxClass: "icheckbox_square-green", radioClass: "iradio_square-green" });
|
$(".chosen-container").each(function () {
|
var disabled = $(this).attr("iscanadd");
|
var addv = $(this).attr("addvisible");
|
var editv = $(this).attr("editvisible");
|
|
if (addv == "true") {
|
|
if (disabled != undefined && disabled == 'true') {
|
$(this).chosen({ iscanadd: true });
|
//
|
//$(this).val("");
|
//$(this).trigger("chosen:updated");
|
}
|
else {
|
$(this).chosen({ iscanadd: false });
|
}
|
|
}
|
});
|
$("div[labtype='upload']").each(function () {
|
$(this).iuploader();
|
});
|
$("div[labtype='itxt']").each(function () {
|
var tcurl = $(this).attr("url");
|
var _isMulti = $(this).attr("isMulti");
|
var searchEnd = eval($(this).attr("searchEnd"));
|
var clearEnd = eval($(this).attr("clearEnd"));
|
if (_isMulti == undefined) {
|
_isMulti = false;
|
|
}
|
var op = {
|
url: tcurl, isMulti: _isMulti, searchEnd: searchEnd, clearEnd: clearEnd
|
|
};
|
$(this).iTexbox(op);
|
var defultva = $(this).attr("defultvalue");
|
if (defultva != undefined && defultva != "") {
|
var md = $(this).attr("defultvaluemode");
|
if (md == undefined) { md = "add"; }
|
if (md == "all" || (md == "add" && !isEdit) || (md == "edit" && isEdit)) {
|
|
defultva = defultva.replace(new RegExp("#", "gm"), "\"");
|
var jsons = jQuery.parseJSON(defultva);
|
$(this).ival(jsons);
|
}
|
}
|
|
});
|
;
|
if (true) { //id != null && id != undefined && id != ''
|
if (typeof (_beforeLoadData) === "function") {
|
_beforeLoadData();
|
}
|
$("#divsprz").css("display", "block");
|
var editdata = '{ "id": ' + id + ' }';
|
if (editurl.indexOf("?") != -1) {
|
editurl = editurl + "&id=" + id;
|
} else {
|
editurl = editurl + "?id=" + id;
|
}
|
|
$.ajax({
|
url: editurl,
|
type: 'GET',
|
data: editdata,
|
dataType:'json',
|
contentType: "application/json;charset=utf-8",
|
success: function (data) {
|
|
editjson = data;
|
|
//加入审批信息
|
if (!isauto) {
|
$.each(data, function (key, value) {
|
if (typeof (value) == "object") {
|
// console.log("一级对象" + key + "");
|
if (value != null && value != undefined) {
|
$.each(value, function (itemkey, itemvalue) {
|
if (typeof (itemvalue) == "object") {
|
if (itemvalue != null || itemvalue != undefined) {
|
// console.log("二级对象" + itemkey + " 非null");
|
if (itemkey != 0) {
|
addpanel(key, false);
|
}
|
$.each(itemvalue, function (childkey, childvalue) {
|
// console.log("二级下级设置值" + childkey + " - " + itemkey + "");
|
setval("div[name='" + key + itemkey + "'] [name='" + childkey + "']", childvalue, itemvalue);
|
});
|
}
|
}
|
else {
|
//console.log("二级设置值" + itemkey + " 非null" + itemvalue + "-" + value);
|
setval("div[name='" + key + "'] [name='" + itemkey + "']", itemvalue, value);
|
//if (itemkey == "current_status") {
|
// if (itemvalue == "S") { $("#statusimg").attr("src", "/img/status/01.png"); }
|
// if (itemvalue == "A") { $("#statusimg").attr("src", "/img/status/audit.png"); }
|
// if (itemvalue == "V") { $("#statusimg").attr("src", "/img/status/audited.png"); }
|
// if (itemvalue == "C") { $("#statusimg").attr("src", "/img/status/end.png"); }
|
// if (itemvalue == "D") { $("#statusimg").attr("src", "/img/status/cancel.png"); }
|
// if (itemvalue == "F") { $("#statusimg").attr("src", "/img/status/fail.png"); }
|
//}
|
}
|
});
|
}
|
}
|
else {
|
// console.log("一级对象值" + key + "");
|
setval("[name='" + key + "']", value, data);
|
}
|
});
|
|
$("*").each(function () {
|
|
|
var labtype = $(this).attr("labtype");
|
if (labtype == undefined || labtype == null || labtype == '') {
|
//if ($(this).attr('grouptype') == "Vdata") {
|
// $(this).css("display", "none");
|
//}
|
}
|
else {
|
|
|
//if ($(this).attr('disabled') == undefined) {
|
if ($(this).attr('editdisabled') == "true" || $(this).attr('editdisabled') == undefined || $(this).attr('editdisabled') == null || $(this).attr('editdisabled') == '') {
|
//$(this).removeAttr("disabled");
|
//if ($(this).attr('labtype') == "itxt") {
|
// $(this).disabled(false);
|
//}
|
}
|
else {
|
if ($(this).attr('labtype') == "itxt") {
|
$(this).disabled(true);
|
return;
|
}
|
if ($(this).attr('labtype') == "upload") {
|
$(this).iuploader("disabled", true);
|
return;
|
}
|
$(this).attr("disabled", "disabled");
|
}
|
//}
|
if ($(this).attr('editvisible') == undefined || $(this).attr('editvisible') == null || $(this).attr('editvisible') == '') {
|
if ($(this).attr('labtype') == "itxt" || $(this).attr('labtype') == "upload") { $(this).removeAttr("style"); }
|
else {
|
if (labtype != "combox") {
|
$(this).css("display", "block");
|
}
|
}
|
}
|
else {
|
if ($(this).attr('editvisible') == "true") {
|
if ($(this).attr('labtype') == "itxt" || $(this).attr('labtype') == "upload") { $(this).removeAttr("style"); }
|
else {
|
if (labtype != "combox") {
|
$(this).css("display", "block");
|
}
|
}
|
}
|
else {
|
$(this).css("display", "none");
|
}
|
}
|
}
|
});
|
}
|
else {
|
|
if (typeof (_outLoad) === "function") {
|
ischeck = _outLoad();
|
if (!ischeck) { return; }
|
|
}
|
}
|
|
if (typeof (_afterLoadData) === "function") {
|
_afterLoadData(editjson);
|
}
|
},
|
error: function () {
|
msg.err('页面错误');
|
}
|
});
|
//编辑界面复制
|
}
|
else {
|
|
|
//$.post("/WorkFlow/GetInitData", function (result) {
|
// $("input[name='usersn']").val(result.data.usersn);
|
// $("input[name='username']").val(result.data.username);
|
// $("input[name='userbranch']").val(result.data.userbranch);
|
// $("input[name='userdept']").val(result.data.userdept);
|
// $("input[name='userpost']").val(result.data.userpost);
|
// $("input[name='useremail']").val(result.data.useremail);
|
// $("input[name='usermanager']").val(result.data.usermanager);
|
// $("input[name='managerusersn']").val(result.data.managerusersn);
|
// $("input[name='createtime']").val(result.data.createtime);
|
// $("input[name='payee']").val(result.data.payee);
|
// // $("input[name='bank_name']").val(result.data.bank_name);
|
|
|
// $("[name='bank_name'] option[value='" + result.data.bank_name + "']").attr("selected", "selected")
|
|
// $("input[name='open_bank']").val(result.data.open_bank);
|
// $("input[name='bank_no']").val(result.data.bank_no);
|
//});
|
$("#divsprz").css("display", "none");
|
if (adddataurl != '') {
|
$.post(adddataurl, function (result) {
|
if (result != null && result != '' && result != undefined) {
|
$.each(result, function (i, item) {
|
$("#" + item.name).val(item.value);
|
});
|
}
|
});
|
}
|
// $("#statusimg").attr("src", "/img/status/00.png");
|
}
|
//$(".fa-plus-square").click(function () {
|
// if (id != undefined && id != 0) {
|
// if (editjson.userdata.current_status == 'S' || editjson.userdata.current_status == 'F') {
|
// addpanel($(".fa-plus-square"),true);
|
// }
|
// else
|
// {
|
// return;
|
// }
|
|
// }
|
// else {
|
// addpanel($(".fa-plus-square"),true);
|
// }
|
// // 点击 + 增加选项卡 后执行
|
// //if (typeof (_afterClickAddpanel) === "function") {
|
// // _afterClickAddpanel();
|
// //}
|
// //msg.info("新增明细成功");
|
//});
|
|
|
|
|
|
});
|
function ShowBootstro() {
|
|
return;
|
$.ajax({
|
url: '/Sys/GuideInfo/GetDocVersion1Vist',
|
type: 'POST',
|
data: "{ 'gtype':'" + saveurl + "' }",
|
contentType: "application/json;charset=utf-8",
|
success: function (data) {
|
if (data != true) {
|
ToShowBootstro();
|
}
|
|
}
|
});
|
|
|
|
}
|
|
//获取url中的参数
|
function getUrlParam(name) {
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
|
var r = window.location.search.substr(1).match(reg); //匹配目标参数
|
if (r != null) return unescape(r[2]); return null; //返回参数值
|
}
|
function ToShowBootstro() {
|
bootstro.start(".bootstro", {
|
onComplete: function (params) {
|
toCloseBootstro();
|
},
|
onExit: function (params) {
|
toCloseBootstro();
|
},
|
});
|
}
|
function toCloseBootstro() {
|
msg.suc("您可以再次通过【操作说明】按钮打开指引");
|
$.ajax({
|
url: '/Sys/GuideInfo/DocVersion1VistEnd',
|
type: 'POST',
|
data: "{ 'gtype':'" + saveurl + "' }",
|
contentType: "application/json;charset=utf-8",
|
success: function (data) {
|
|
}
|
});
|
}
|
|
var strthisname = "";
|
var isoldname = '';
|
function addpanel(name, ishand) {
|
//console.log(name);
|
if (ishand || ishand == 'true') {
|
//if (editjson!=undefined&& editjson.userdata != undefined)
|
// {
|
// if (editjson.userdata.current_status != 'S' && editjson.userdata.current_status != 'F') {
|
|
// layer.alert("当前单据状态不允许新增明细");
|
// return;
|
// }
|
// }
|
|
}
|
console.log(name);
|
if (typeof (name) == "object") {
|
thisname = $(name).attr("item");
|
panel++;
|
} else {
|
if (strthisname != name) {
|
panel1 = 0;
|
panel1++;
|
panel = panel1;
|
strthisname = name;
|
} else {
|
panel1++;
|
panel = panel1;
|
}
|
thisname = name + "0";
|
}
|
var thisnamename = $("div[name='row" + thisname + "']").attr("item");
|
var panelcount = $("div[name^='row" + $("div[name='row" + thisname + "']").attr("item") + "']").length + 1;
|
var data = $("div[name=row" + thisname + "]").attr("data");
|
var label = $("div[name=row" + thisname + "]").attr("label");
|
var button = $("div[name=row" + thisname + "]").attr("button");
|
var issave = $("div[name=row" + thisname + "]").attr("issave");
|
var jsondata = JSON.parse(data);
|
var htmls = '';
|
htmls += '<div class="row" name="row' + thisnamename + panel + '" control="panel" issave=' + issave + ' item=' + thisnamename + ' label="' + label + '" button="' + button + '" data=\'' + JSON.stringify(jsondata) + '\'><div class="col-sm-12">';
|
htmls += ' <div class="ibox float-e-margins">';
|
htmls += ' <div class="ibox-title"><h5>';
|
htmls += ' <i class="fa fa-list"></i> ' + label + ' <span style=\'color:#63B8FF\'>' + panelcount + '</span></h5><div class="ibox-tools" style="float:right; top:-3px;"> <a class="collapse-link" onclick="collapseBox(this);"><i title="折叠/展开明细" class="fa fa-chevron-up"></i></a> <a class="collapse-link" >';
|
if (button == "true") {
|
htmls += ' <i class="fa fa-plus-square" style="color:#2b4490" onclick="addpanel(this,true);" title="新增明细" item="' + thisnamename + panel + '"></i> ';
|
|
}
|
htmls += ' <i class="fa fa-minus-square" style="color:red" title="删除明细" onclick="deldoc(\'' + thisnamename + panel + '\');"></i>';
|
htmls += ' </a>';
|
htmls += ' </div></div>';
|
htmls += ' <div id="div_content" class="ibox-content"><div class="clearfix layer-area" key="' + thisnamename + '" style="margin: 5px" labtype="panel" name="' + thisnamename + panel + '"';
|
if (issave == "false") {
|
htmls += ' issave="false" ';
|
}
|
else {
|
htmls += ' issave="true" ';
|
}
|
if (button == "true") {
|
htmls += ' button="true" ';
|
}
|
else {
|
htmls += ' button="false" ';
|
}
|
htmls += '>';
|
if (isEdit || isEdit == 'true') {
|
htmls += createdg(jsondata, true);
|
}
|
else {
|
htmls += createdg(jsondata, false);
|
}
|
htmls += ' </div></div>';
|
|
htmls += ' </div>';
|
htmls += ' </div></div>';
|
|
//取最后一个
|
$("div[name^='row" + thisnamename + "']").last().after(htmls);
|
//$("div[name=row" + thisname + "]").after(htmls);
|
$(".i-checks").iCheck({ checkboxClass: "icheckbox_square-green", radioClass: "iradio_square-green" });
|
|
$(".chosen-container").each(function () {
|
var disabled = $(this).attr("iscanadd");
|
var addv = $(this).attr("addvisible");
|
var editv = $(this).attr("editvisible");
|
|
|
if ((!isEdit && addv == "true") || (isEdit && editv == "true")) {
|
if (disabled != undefined && disabled == 'true') {
|
$(this).chosen({ iscanadd: true });
|
}
|
else {
|
$(this).chosen({ iscanadd: false });
|
}
|
}
|
});
|
$("div[name='" + thisnamename + panel + "'] [labtype='upload']").each(function () {
|
$(this).iuploader();
|
});
|
$("div[name='" + thisnamename + panel + "'] [labtype='itxt']").each(function () {
|
var tcurl = $(this).attr("url");
|
var _isMulti = $(this).attr("isMulti");
|
var searchEnd = eval($(this).attr("searchEnd"));
|
var clearEnd = eval($(this).attr("clearEnd"));
|
|
if (_isMulti == undefined) {
|
_isMulti = false;
|
|
}
|
var op = {
|
url: tcurl, isMulti: _isMulti, searchEnd: searchEnd, clearEnd: clearEnd
|
|
};
|
$(this).iTexbox(op);
|
var defultva = $(this).attr("defultvalue");
|
|
|
|
if (defultva != undefined && defultva != "") {
|
|
var md = $(this).attr("defultvaluemode");
|
if (md == undefined) { md = "add"; }
|
if (md == "all" || (md == "add" && !isEdit) || (md == "edit" && isEdit)) {
|
|
defultva = defultva.replace(new RegExp("#", "gm"), "\"");
|
var jsons = jQuery.parseJSON(defultva);
|
$(this).ival(jsons);
|
}
|
|
|
|
}
|
|
|
//if (item.defultvalue != undefined) {
|
// ctrlhtml += ' value="' + item.defultvalue + '" ';
|
//}
|
|
|
});
|
if (ishand || ishand == 'true') {
|
$("html,body").animate({ scrollTop: $("div[name='" + thisnamename + panel + "']").offset().top - 60 }, 1000);
|
}
|
$("[data-toggle='tooltip']").tooltip({ html: true });
|
if (ishand || ishand == 'true') {
|
// 点击 + 增加选项卡 后执行
|
if (typeof (_afterClickAddpanel) === "function") {
|
_afterClickAddpanel();
|
}
|
|
msg.info("保存成功");
|
}
|
}
|
|
|
|
function setval(key, value, prvleveldata) {
|
var labtype = $(key).attr("labtype");
|
var capital = $(key).attr("capital");
|
if (labtype == "txt") {
|
$(key).val(value);
|
if (capital != null && capital != undefined && capital != '') {
|
var name = $(key).attr("name");
|
convertCurrency(name, capital);
|
}
|
}
|
if (labtype == "number") {
|
$(key).val(value);
|
if (capital != null && capital != undefined && capital != '') {
|
var name = $(key).attr("name");
|
convertCurrency(name, capital);
|
}
|
}
|
if (labtype == "clockpicker") {
|
|
$(key).val(value);
|
}
|
if (labtype == "date") {
|
|
if (value.indexOf('Date') > -1) {
|
var dateFormat = $(key).attr("dateFormat");
|
if (dateFormat != null && dateFormat != undefined && dateFormat != '') {
|
value = JsonDateToDate(value).Format(dateFormat);
|
} else {
|
value = JsonDateToDate(value).Format("YYYY-MM-dd hh:mm:ss");
|
}
|
}
|
if (!/^1-01-01/.test(value)) {
|
$(key).val(value);
|
}
|
}
|
if (labtype == "checkbox") {
|
$(key).each(function () {
|
if (this.value == value)
|
$(this).iCheck('check');
|
});
|
}
|
if (labtype == "combox") {
|
var iscanadd = $(key).attr("iscanadd");
|
var data = $(key).attr("data");
|
var jsondata = JSON.parse(data);
|
var datahas = false;
|
if (iscanadd != undefined && iscanadd == 'true') {
|
$.each(jsondata, function (n, selectitem) {
|
if (selectitem.code == value) {
|
$(key).val(value);
|
datahas = true;
|
}
|
});
|
if (!datahas) {
|
$(key).append("<option value='" + value + "' selected='true'>" + value + "</option>");
|
//$(key).chosen({ iscanadd: true });
|
|
}
|
$(key).trigger("chosen:updated");
|
}
|
else {
|
$(key).val(value);
|
}
|
// $("[name='bank_name'] option[value='" + result.data.bank_name + "']").attr("selected", "selected")
|
}
|
if (labtype == "password") {
|
$(key).val(value);
|
}
|
if (labtype == "email") {
|
$(key).val(value);
|
}
|
if (labtype == "textarea") {
|
$(key).val(value);
|
}
|
if (labtype == "radio") {
|
$(key).each(function () {
|
if (this.value == value) { $(this).iCheck('check'); }
|
else { $(this).removeAttr("checked"); }
|
});
|
}
|
if (labtype == "itxt") {
|
if (value != null && value != '' && value != undefined) {
|
var txtname = $(key).attr("txtname");
|
if (txtname == null || txtname == undefined || prvleveldata == null || prvleveldata == undefined) {
|
$(key).ival(value, value);
|
}
|
else {
|
var txtval = "";
|
$.each(prvleveldata, function (pkey, pvalue) {
|
if (pkey.toString() == txtname) {
|
txtval = pvalue
|
}
|
});
|
$(key).ival(value, txtval);
|
}
|
}
|
}
|
if (labtype == "upload") {
|
$(key).iuploader('val', value);
|
}
|
}
|
function deldoc(name) {
|
var panectlname = $("div[name='" + name + "']").attr("key");// lable type =panel 的名称
|
var thisnamecount = $("div[name^='row" + panectlname + "']").length;
|
if (thisnamecount <= 1) {
|
msg.info('只剩一个明细了,不能删除', '0');
|
return false;
|
}
|
if (typeof (_beforeDeleteData) === "function") {
|
_beforeDeleteData.call(this, name);
|
}
|
if (editjson == undefined) {
|
$("div[name='row" + name + "']").remove();
|
AutoInput();
|
msg.info("删除成功");
|
return;
|
}
|
|
var inputobj = $("div[name='" + name + "'] input[key='true']");
|
var ival = $(inputobj).val();
|
if (ival == undefined || ival == "" || ival == "0") {
|
$("div[name='row" + name + "']").remove();
|
AutoInput();
|
msg.info("删除成功");
|
return;
|
}
|
|
|
//var jsonStr = "{Id:" + "'" + id + "'" + ",DtlId:" + "'" + ival + "'" + "}";
|
|
|
$.ajax({
|
url: deldtlurl,
|
type: 'POST',
|
data: { Id: id, DtlId: ival},
|
dataType: "json",
|
//contentType: "application/json;charset=utf-8",
|
success: function (data) {
|
//data = JSON.parse(data);
|
var issuccess = data.Result;
|
if (issuccess) {
|
$("div[name='row" + name + "']").remove();
|
AutoInput();
|
// msg.suc('删除成功');
|
|
parent.layer.msg('删除成功', { icon: 6 });
|
}
|
else {
|
// msg.err(data.Message);
|
parent.layer.msg(data.Message, { icon: 5 });
|
}
|
},
|
error: function () {
|
msg.err('页面出错');
|
}
|
});
|
|
|
|
}
|
function doResize() {
|
$("table").each(function () {
|
$(this).jqGrid('setGridWidth', $("#top").width() - 40);
|
});
|
}
|
|
var ischeckclient = true;
|
function getjsonval(name) {
|
var panelname = '';
|
var panelname1 = '';
|
var json = '';
|
var ishaspanel = false;
|
var panelcount = 0;
|
var panelkey = '';
|
var panelkey1 = '';
|
var button = '';
|
if (name == '') {
|
|
ischeckclient = true;
|
$("*").each(function () {
|
var labtype = $(this).attr("labtype");
|
if (labtype == undefined || labtype == null || labtype == '' || labtype == 'null') {
|
|
return true;
|
}
|
if (labtype == "panel") {
|
panelcount++;
|
var issave = $(this).attr("issave");
|
var button1 = $(this).attr("button");
|
if (issave == "false") { }
|
else {
|
panelname = $(this).attr("name");
|
panelkey1 = $(this).attr("key");
|
if (panelkey != panelkey1) {
|
panelkey = panelkey1;
|
if (panelname == "userdata") {
|
ishaspanel = false;
|
json += '"userdata":{' + getjsonval(panelname) + '},';
|
if (ischeckclient == false) { return false; }
|
}
|
else {
|
if (ishaspanel) {
|
|
json = json.substring(0, json.length - 1);
|
if (button == "true") {
|
json += '],';
|
}
|
}
|
if (button1 == "true") {
|
button = button1;
|
ishaspanel = true;
|
json += '"' + $(this).attr("key") + '":[{';
|
json += getjsonval(panelname) + '},';
|
if (ischeckclient == false) { return false; }
|
}
|
else {
|
ishaspanel = false;
|
button = button1;
|
json += '"' + $(this).attr("key") + '":{';
|
json += getjsonval(panelname) + '},';
|
if (ischeckclient == false) { return false; }
|
}
|
}
|
}
|
else {
|
ishaspanel = true;
|
button = button1;
|
json += '{' + getjsonval(panelname) + '},';
|
if (ischeckclient == false) { return false; }
|
}
|
}
|
}
|
});
|
if (panelcount = 2) {
|
if (button == "true") {
|
json = json.substring(0, json.length - 1);
|
json += '],';
|
}
|
}
|
}
|
else {
|
//panel下的所有控件
|
var hasname = false;
|
$("div[name=" + name + "] *").each(function () {
|
var labtype = $(this).attr("labtype");
|
var name = $(this).attr("name");
|
var issave = $(this).attr("issave");
|
var display = $(this).css("display");
|
if (issave == "false") { }
|
else {
|
if (labtype == undefined || labtype == null || labtype == '' || labtype == 'null') {
|
|
return true;
|
}
|
else {
|
hasname = false;
|
var val = $(this).val();
|
if (val == null) {
|
val = "";
|
}
|
var name = $(this).attr("name");
|
var ismust = $(this).attr("ismust");
|
var reg = $(this).attr("reg");
|
var size = $(this).attr("size");
|
var label = $(this).attr("label");
|
var length = $(this).attr("length");
|
if (labtype == "checkbox") {
|
if (json.indexOf(name) >= 0) { hasname = true; }
|
else {
|
$("input[name='" + name + "']:checkbox").each(function () {
|
if (true == $(this).is(':checked')) {
|
val += $(this).val() + ",";
|
}
|
});
|
val = val.substring(0, val.length - 1);
|
}
|
}
|
if (labtype == "radio") {
|
if (json.indexOf(name) >= 0) { hasname = true; }
|
else {
|
$("input[name='" + name + "']:radio").each(function () {
|
if (true == $(this).is(':checked')) {
|
val = $(this).val() + ",";
|
}
|
});
|
val = val.substring(0, val.length - 1);
|
}
|
}
|
if (labtype == "itxt") {
|
val = $(this).ival();
|
}
|
if (labtype == "upload") {
|
val = $(this).iuploader('val');
|
}
|
if (ismust && ismust == "true" && val.length == 0 && (display == undefined || display != "none")) {
|
ischeck = false;
|
layer.alert(label + '为空', { icon: 5 });
|
$(this).focus();
|
ischeckclient = false;
|
$("[data-toggle='tooltip']").tooltip({ html: true });
|
return false;
|
}
|
if (val.length > 0) {
|
if (length == "long") {
|
if (val.length > 4000) {
|
ischeck = false;
|
layer.alert(label + '过长', { icon: 5 });
|
$(this).focus();
|
$("[data-toggle='tooltip']").tooltip({ html: true });
|
return false;
|
}
|
} else {
|
if (val.length > 100) {
|
ischeck = false;
|
layer.alert(label + '过长', { icon: 5 });
|
$(this).focus();
|
$("[data-toggle='tooltip']").tooltip({ html: true });
|
return false;
|
}
|
}
|
}
|
if (reg != undefined && reg != null && reg != '' && (display == undefined || display != "none")) {
|
// var patt1 = new RegExp(eval("/^[0-9]*$/"));
|
// var patt1 = new RegExp(eval(reg));
|
var patt1 = new RegExp(reg);
|
// var patt1 =eval(reg);
|
if (!patt1.test(val)) {
|
ischeck = false;
|
layer.alert(label + '格式化失败', { icon: 5 });
|
$(this).focus();
|
ischeckclient = false;
|
$("[data-toggle='tooltip']").tooltip({ html: true });
|
return false;
|
}
|
}
|
if (size != undefined && size != null && size != '' && (display == undefined || display != "none")) {
|
if (size.indexOf('-') != -1) {
|
if (size.indexOf('s') != -1) {
|
ischeck = false;
|
var length = size.replace("s", "");
|
var len = length.split('-');
|
var reglength = '/^[\u4E00-\u9FA5\uf900-\ufa2d\w\.\s]{6,18}$/';
|
reglength = reglength.replace("6", len[0]).replace("18", len[1]);
|
var patt1 = new RegExp(eval(reglength));
|
if (!patt1.test(val)) {
|
layer.alert(label + '至少' + len[0] + '个字符,最多' + len[1] + '个字符', { icon: 5 });
|
|
$(this).focus();
|
ischeckclient = false;
|
$("[data-toggle='tooltip']").tooltip({ html: true });
|
return false;
|
}
|
}
|
}
|
else {
|
if (val.length > length && (display == undefined || display != "none")) {
|
ischeck = false;
|
layer.alert(label + '过长'.repeat("100", length) + length, { icon: 5 });
|
$(this).focus();
|
ischeckclient = false;
|
$("[data-toggle='tooltip']").tooltip({ html: true });
|
return false;
|
}
|
}
|
}
|
if (hasname == false) {
|
json += '"' + name + '":"' + val + '",';
|
}
|
}
|
}
|
});
|
json = json.substring(0, json.length - 1);
|
}
|
return json;
|
}
|
//大写解决方案
|
// Firefox, Google Chrome, Opera, Safari, Internet Explorer from version 9
|
function OnInput(name, capital) {
|
//val = $("input[name='" + name + "']").val();
|
convertCurrency(name, capital);
|
}
|
// Internet Explorer
|
function OnPropChanged(name, capital) {
|
//val = $("input[name='" + name + "']").val();
|
convertCurrency(name, capital);
|
}
|
|
function OnInputTotal(name, total) {
|
var alltotal = 0;
|
$("input[total='" + total + "']").each(function () {
|
|
var val = parseFloat($(this).val());
|
alltotal += val;
|
});
|
$("input[name='" + total + "']").val(alltotal);
|
convertCurrency(total, $("input[name='" + total + "']").attr("capital"));
|
}
|
|
function OnPropChangedTotal(name, total) {
|
var alltotal = 0;
|
$("input[total='" + total + "']").each(function () {
|
var val = parseFloat($(this).val());
|
alltotal += val;
|
});
|
$("input[name='" + total + "']").val(alltotal);
|
convertCurrency(total, $("input[name='" + total + "']").attr("capital"));
|
}
|
//function hideGroup(panename, grouptypename) {
|
// $("#ibox-content div[key='" + panename + "'] [grouptype='" + grouptypename + "']").hide();
|
|
//}
|
function hideGroup(panename, grouptypename, obj) {
|
if (obj != undefined) {
|
|
return $(obj).parent().parent().parent().find("[grouptype='" + grouptypename + "']").hide();
|
|
} else {
|
$("div[key='" + panename + "'] [grouptype='" + grouptypename + "']").hide();
|
}
|
|
}
|
|
//function showGroup(panename, grouptypename) {
|
// $("#ibox-content div[key='" + panename + "'] [grouptype='" + grouptypename + "']").show();
|
// // $("div[key='" + panename + "'] [grouptype='" + grouptypename + "']").css("display", "block");
|
//}
|
function showGroup(panename, grouptypename, obj) {
|
if (obj != undefined) {
|
|
return $(obj).parent().parent().parent().find("[grouptype='" + grouptypename + "']").show();
|
|
}
|
else {
|
|
$("#ibox-content div[key='" + panename + "'] [grouptype='" + grouptypename + "']").show();
|
}
|
|
|
// $("div[key='" + panename + "'] [grouptype='" + grouptypename + "']").css("display", "block");
|
}
|
|
//分组是否可用
|
function enableGroup(panename, grouptypename, isEnable, ctlname) {
|
|
|
var ctllike = "";
|
if (ctlname != undefined) {
|
ctllike = "[name='" + ctlname + "']";
|
}
|
var data = $("div[key='" + panename + "'] [grouptype='" + grouptypename + "']" + ctllike);
|
|
$.each(data, function (index, item) {
|
enableCtl(item, isEnable);
|
});
|
|
|
}
|
|
function enableAll(isEnable) {
|
|
|
$('[labtype]').each(function (i, item) {
|
enableCtl(item, isEnable);
|
});
|
|
//$(".ibox-content > div > div").each(function (i, item) {
|
// enableCtl(item, isEnable);
|
//});
|
}
|
//控件是否可用
|
function enableCtl(obj, isEnable) {
|
var labtype = $(obj).attr("labtype");
|
if (labtype == undefined) {
|
return;
|
}
|
if (labtype == "txt") {
|
if (isEnable) { $(obj).removeAttr("readonly"); } else { $(obj).attr("readonly", "readonly"); }
|
}
|
if (labtype == "date") {
|
|
if (isEnable) {
|
|
$(obj).removeAttr("disabled");
|
$(obj).attr("readonly", "readonly");
|
} else {
|
$(obj).attr("disabled", "disabled");
|
$(obj).removeAttr("readonly");
|
}
|
}
|
if (labtype == "checkbox") {
|
|
if (isEnable) { $(obj).removeAttr("disabled"); } else { $(obj).attr("disabled", "disabled"); }
|
}
|
if (labtype == "combox") {
|
|
var iscanadd = $(obj).attr("iscanadd");
|
if (iscanadd == "true") {
|
$(obj).prop('disabled', !isEnable).trigger("chosen:updated")
|
}
|
else {
|
if (isEnable) { $(obj).removeAttr("disabled"); } else { $(obj).attr("disabled", "disabled"); }
|
|
}
|
}
|
if (labtype == "password") {
|
|
if (isEnable) { $(obj).removeAttr("readonly"); } else { $(obj).attr("readonly", "readonly"); }
|
}
|
if (labtype == "email") {
|
if (isEnable) { $(obj).removeAttr("readonly"); } else { $(obj).attr("readonly", "readonly"); }
|
}
|
if (labtype == "textarea") {
|
if (isEnable) { $(obj).removeAttr("readonly"); } else { $(obj).attr("readonly", "readonly"); }
|
}
|
if (labtype == "radio") {
|
if (isEnable) { $(obj).removeAttr("disabled"); } else { $(obj).attr("disabled", "disabled"); }
|
}
|
if (labtype == "itxt") {
|
|
$(obj).disabled(!isEnable);
|
}
|
if (labtype == "upload") {
|
|
$(obj).iuploader("disabled", isEnable);
|
}
|
|
}
|
|
function _pageAutoClose() {
|
if (typeof (_pageOwnAutoClose) === "function") {
|
return _pageOwnAutoClose();
|
} else {
|
if (typeof (parent.window._reloadPageData) === "function") {
|
parent.window._reloadPageData();
|
}
|
var index = parent.layer.getFrameIndex(window.name);
|
parent.layer.isRefresh = true;
|
parent.layer.closeAll('loading');
|
if (index == undefined) {
|
tab.close(window.location.pathname + window.location.search);
|
} else {
|
parent.layer.close(index)
|
}
|
return false;
|
}
|
|
}
|
|
function _pageSave() {//获取值x
|
|
|
var jsonStr = "";
|
ischeck = true;
|
|
if (typeof (_parSaveCheck) === "function") {
|
ischeck = _parSaveCheck();
|
if (!ischeck) { return; }
|
|
}
|
if (!isauto) {
|
jsonStr += getjsonval('');
|
jsonStr = jsonStr.substring(0, jsonStr.length - 1)
|
jsonStr = '{' + jsonStr + '}';
|
}
|
else {
|
jsonStr = savedata;
|
}
|
// $("#aa").html(jsonStr);
|
if (!ischeck) { return false; }
|
if (jsonStr == "") { return false; }
|
|
if (typeof (_beforeSaveData) === "function") {
|
jsonStr = _beforeSaveData(jsonStr);
|
}
|
|
$.ajax({
|
url: saveurl,
|
type: 'POST',
|
data: JSON.parse(jsonStr),//{ "jsonStrs": jsonStr},
|
//contentType: "application/json;charset=utf-8",
|
dataType: 'json',
|
success: function (data) {
|
//console.log(JSON.stringify(data));
|
//data = JSON.stringify(data)
|
|
console.log(data);
|
//data = JSON.parse(data);
|
console.log(typeof (data));
|
var issuccess = data.Result;
|
var sysid = data.ReturnID;
|
var successMsg = savesuccessmsg == "" ? '保存成功' : savesuccessmsg;
|
if (issuccess) {
|
|
if (typeof (_afterSaveSucc) === "function") {
|
layer.alert(successMsg, function () {
|
setTimeout(function () {
|
var result = _afterSaveSucc();
|
if (result == undefined) {
|
|
return;
|
}
|
return;
|
|
}, 500);
|
|
return;
|
});
|
|
}
|
if (id != null && id != undefined && id != '') {
|
layer.alert(successMsg, { icon: 6 }, function () {
|
if (typeof (_afterSaveData) === "function") {
|
_afterSaveData();
|
} else {
|
//location.reload(true);
|
_pageAutoClose();//自动关闭页面方法
|
}
|
});
|
}
|
else {
|
layer.alert(successMsg, { icon: 6 }, function () {
|
if (typeof (_afterSaveData) === "function") {
|
_afterSaveData();
|
|
} else {
|
//if (self.location.href.substr(0, self.location.href.length - 1) == '/') {
|
// self.location.href = self.location.href + sysid + '';
|
//}
|
//else {
|
// if (self.location.href.indexOf('id') < 0) {
|
// self.location.href = self.location.href + '/' + sysid + '';
|
// }
|
//}
|
_pageAutoClose();//自动关闭页面方法
|
}
|
});
|
}
|
}
|
else {
|
// msg.err(data.Message);
|
parent.layer.alert(data.Message, { icon: 5 });
|
}
|
},
|
error: function () {
|
msg.err('页面出错');
|
}
|
});
|
};
|
|
|
|
|
|
function _pageNullify() {
|
if (editjson == undefined || id == 0 || id == "0" || id == "") {
|
msg.err('无法这么做');
|
return;
|
}
|
|
msg.yesno("确认是否删除?",
|
function () {
|
var jsonStr = "{Id:" + id + ",Remark:''}";
|
$.ajax({
|
url: nullifyurl,
|
type: 'POST',
|
data: { Id: id, Remark: '' },
|
dataType:'json',
|
//contentType: "application/json;charset=utf-8",
|
success: function (data) {
|
//data = JSON.parse(data);
|
var issuccess = data.Result;
|
if (issuccess) {
|
|
if (typeof (_afterNullifySucc) === "function") {
|
|
parent.layer.msg('删除成功', { icon: 6 });
|
setTimeout(function () {
|
var result = _afterNullifySucc();
|
if (result == undefined) {
|
|
return;
|
}
|
return;
|
|
}, 500);
|
|
return;
|
}
|
|
parent.layer.msg('删除成功', { icon: 6 });
|
|
//location.reload(true)
|
_pageAutoClose();//自动关闭页面方法
|
}
|
else {
|
|
parent.layer.msg(data.Message, { icon: 5 });
|
}
|
},
|
error: function () {
|
msg.err('删除失败');
|
}
|
});
|
},
|
function () {
|
msg.info("页面出错");
|
});
|
|
|
|
|
|
|
|
|
|
|
}
|
|
function _pagePrint() {
|
|
if (editjson == undefined) {
|
/**/
|
msg.err("数据不正确,不允许当前操作");
|
/**/
|
return;
|
}
|
if (id == 0) {
|
msg.err("当前数据还未保存,不允许打印");
|
return;
|
}
|
|
window.open('/WF/Print/PrintFlow/' + id, "_blank");
|
|
|
}
|
|
function hideselectbtn() {
|
$("#selectbtn").hide();
|
|
$("#selectbtn").removeClass("bootstro");
|
}
|
// var isfirst = false;//临时处理,需要单独处理
|
|
|
|
//根据 分组名称 分组序列 字段名称获取对象的值
|
function GetObjVal(panelname, ctrlname, length) {
|
return GetVal(GetObj(panelname, ctrlname, length));
|
|
|
}
|
//获取某级别对象
|
function GetObj(panelname, ctrlname, length) {
|
|
// var obj= $("div[name='" + panelname + length + "'] [name='" + ctrlname + "']");
|
var parent = $("div[item='" + panelname + "']");
|
|
var obj = $(parent[length]).find("[name='" + ctrlname + "']");
|
|
//var obj = $("div[name='" + panelname + length + "'] [name='" + ctrlname + "']");
|
return obj;
|
}
|
|
//获取同级 其他名称的对象
|
function getLevelObj(obj, boxname) {
|
return $(obj).parent().parent().parent().find("[name='" + boxname + "']")
|
}
|
|
//获取对象的值 各类控件
|
function GetVal(obj) {
|
var labtype = $(obj).attr("labtype");
|
var name = $(obj).attr("name");
|
var issave = $(obj).attr("issave");
|
var display = $(obj).css("display");
|
|
if (labtype == undefined || labtype == null || labtype == '') {
|
return "";
|
}
|
hasname = false;
|
var val = $(obj).val();
|
var name = $(obj).attr("name");
|
var ismust = $(obj).attr("ismust");
|
var reg = $(obj).attr("reg");
|
var size = $(obj).attr("size");
|
var label = $(obj).attr("label");
|
var length = $(obj).attr("length");
|
if (labtype == "checkbox") {
|
|
$(obj).each(function () {
|
if (true == $(this).is(':checked')) {
|
val += $(this).val() + ",";
|
}
|
});
|
val = val.substring(0, val.length - 1);
|
|
}
|
if (labtype == "radio") {
|
var objsss = $(obj).filter(':checked');
|
val = objsss.val();
|
//$(obj).each(function () {
|
|
|
|
// if (true == $(this).is(':checked')) {
|
// val = $(this).val() + ",";
|
// }
|
//});
|
//val = val.substring(0, val.length - 1);
|
|
}
|
if (labtype == "itxt") {
|
val = $(obj).ival();
|
}
|
if (labtype == "upload") {
|
val = $(obj).iuploader('val');
|
}
|
|
return val;
|
}
|
function addPaneldata(key, itemvalue, isfirst) {
|
var addpindex = $("div[key='" + key + "']").length;
|
|
if (isfirst == true) {
|
|
|
addpindex = 0;
|
}
|
else {
|
addpanel($(".fa-plus-square"));
|
}
|
|
$.each(itemvalue, function (childkey, childvalue) {
|
// console.log("二级下级设置值" + childkey + " - " + itemkey + "");
|
setval("div[name='" + key + panel + "'] [name='" + childkey + "']", childvalue, itemvalue);
|
|
});
|
AutoInput();
|
}
|
function AutoInput() {
|
$("[total]").trigger("input");
|
$("[capital]").trigger("input");
|
|
|
}
|
//上传功能
|
function upload(obj) {
|
|
}
|
//上传文件显示
|
function operate(obj) {
|
|
}
|
</script>
|
@RenderSection("footerScripts", false)
|
<script src="/js/content.min.js" type="text/javascript"></script>
|
|
</body>
|
</html>
|