提交 b994dd7c authored 作者: 王子杰's avatar 王子杰

首次提交

上级 68ea253a
This source diff could not be displayed because it is too large. You can view the blob instead.
/**
* Created by jhj on 2017/5/23.
*/
//保存按钮
function saveBdcSpbxx() {
var arry=new Array();
var a = 1;
$.blockUI({message: "请稍等......"});
$("input[name='qlrid']").each(function (i, n) {
var id = $(n).val();
var o = new Object();
o['qlrid'] = $(n).val();
o['proid'] = $("#proid").val();
o['qlrlx'] = $("#qlrlx_" + id).val();
o['qlbl'] = $("#qlbl_" + id).val();
o['qlrmc'] = $("#qlrmc_" + id).val();
o['qlrsfzjzl'] = $("#qlrsfzjzl_" + id).val();
o['qlrzjh'] = $("#qlrzjh_" + id).val();
o['sxh'] = a;
++a;
arry.push(o);
});
var s = JSON.stringify(arry);
$.ajax({
url: bdcdjUrl+"/bdcdjSpbxx/saveBdcSpbxx",
type: 'POST',
dataType: 'json',
data: $("#spbForm").serialize() + '&' + $.param({s: s}),
success: function (data) {
setTimeout($.unblockUI, 10);
if (isNotBlank(data)) {
if (data.msg == "success") {
//保存签名
$.ajax({
url: "${bdcdjUrl}/sign/updateSignOpinon",
type: 'POST',
dataType: 'json',
data: $("#spbForm").serialize(),
success: function () {
alert("保存成功");
window.location.reload();
},
error: function () {
window.location.reload();
}
});
}
}
},
error: function (data) {
alert("保存失败");
}
});
}
$(document).ready(function () {
$("#sqrqk").attr("rowspan", sqrQk(i));
changelisten();
initHistoryZd();
addBorderToDiffHistoryZd();
});
//权利人增加行
function qlrAdd() {
var row_num = "tr_" + e;
var tr = '<tr id="' + row_num + '" >'
+ '<input type="hidden" id="fbcz" name="fbcz" value="' + e + '" />'
+ '<input type="hidden" id="qlrid" name="qlrid" value="' + e + '" />'
+ '<input type="hidden" id="qlrlx_' + e + '" name="qlrlx" value="qlr"/>'
+ '<th style="text-align:center; background: #EEEEEE;" colspan="3" >'
+ '<label name="">权利人姓名(名称)</label></th>'
+ '<td colspan="3">'
+ '<input type="text" id="qlrmc_' + e + '" name="qlrmc" value="" /></td>'
+ '<th style="text-align:center; background: #EEEEEE;" colspan="2" >'
+ '<label name="">共有比例</label></th>'
+ '<td colspan="2" style="border-right-style:none;">'
+ '<input type="text" id="qlbl_' + e + '" name="qlbl" value="" /></td>'
+ '<td colspan="1" style="border-left-style:none;">'
+ '<a onclick="qlrDel(' + e + ')"><i class="ace-icon glyphicon glyphicon-remove"></i></a> '
+ '</td></tr>'
+ '<tr id="' + row_num + '" >'
+ '<th style="text-align:center; background: #EEEEEE;" colspan="3" >'
+ '<label name="">身份证件种类</label></th>'
+ '<td colspan="3">'
+ '<select name="qlrsfzjzl" id="qlrsfzjzl_' + e + '"> <option value="1" >身份证</option> <option value="2">港澳台身份证</option> <option value="3">护照</option><option value="4">户口簿</option><option value="5">军官证(士兵证</option><option value="6">组织机构代码</option><option value="7">营业执照</option><option value="8">其它</option></select>'
+ '<th style="text-align:center; background: #EEEEEE;" colspan="2" >'
+ '<label name="">证件号</label></th>'
+ '<td colspan="3">'
+ '<input type="text" id="qlrzjh_' + e + '" name="qlrzjh" value="" />'
+ '</td></tr>';
$("#tr_qlr").before(tr);//确定增加行数的位置
i = i + 2;
++e;
$("#sqrqk").attr("rowspan", sqrQk(i));
initSpb();
}
//义务人增加行
function ywrAdd() {
var row_num = "tr_" + e;
var tr = '<tr id="' + row_num + '" >'
+ '<input type="hidden" id="qlrid" name="qlrid" value="' + e + '" />'
+ '<input type="hidden" id="qlrlx_' + e + '" name="qlrlx" value="ywr" />'
+ '<th style="text-align:center; background: #EEEEEE;" colspan="3" >'
+ '<label name="">义务人姓名(名称)</label></th>'
+ '<td colspan="3">'
+ '<input type="text" id="qlrmc_' + e + '" name="qlrmc" value="" /></td>'
+ '<th style="text-align:center; background: #EEEEEE;" colspan="2" >'
+ '<label name="">共有比例</label></th>'
+ '<td colspan="2" style="border-right-style:none;">'
+ '<input type="text" id="qlbl_' + e + '" name="qlbl" value=" " /></td>'
+ '<td colspan="1" style="border-left-style:none;">'
+ '<a onclick="qlrDel(' + e + ')"><i class="ace-icon glyphicon glyphicon-remove"></i></a> '
+ '</td></tr>'
+ '<tr id="' + row_num + '" >'
+ '<th style="text-align:center; background: #EEEEEE;" colspan="3" >'
+ '<label name="">身份证件种类</label></th>'
+ '<td colspan="3">'
+ '<select name="qlrsfzjzl" id="qlrsfzjzl_' + e + '"> <option value="1" >身份证</option> <option value="2">港澳台身份证</option> <option value="3">护照</option><option value="4">户口簿</option><option value="5">军官证(士兵证</option><option value="6">组织机构代码</option><option value="7">营业执照</option><option value="8">其它</option></select>'
+ '<th style="text-align:center; background: #EEEEEE;" colspan="2" >'
+ '<label name="">证件号</label></th>'
+ '<td colspan="3">'
+ '<input type="text" id="qlrzjh_' + e + '" name="qlrzjh" value="" />'
+ '</td></tr>';
$("#tr_ywr").before(tr);//确定增加行数的位置
i = i + 2;
++e;
$("#sqrqk").attr("rowspan", sqrQk(i));
}
//删除行
function qlrDel(o) {
var row = "tr_" + o;
$.blockUI({message: "请稍等......"});
$.ajax({
url: bdcdjUrl+"/bdcdjSqsxx/delBdcQlr",
type: 'POST',
dataType: 'json',
data: $.param({s: o}),
success: function (data) {
setTimeout($.unblockUI, 10);
if (isNotBlank(data)) {
if (data.msg == "success") {
$("tr[id='" + row + "']").remove();//删除当前行
i = i - 6;
$("#sqrqk").attr("rowspan", sqrQk(i));
changFbcz();
limGyfs();
}
}
},
error: function (data) {
alert("删除失败");
}
});
}
\ No newline at end of file
/**
* Created by jhj on 2017/5/23.
*/
//保存按钮
function saveBdcSqsxx() {
var arry = [];
var a = 1;
$.blockUI({message: "请稍等......"});
$("input[name='qlrid']").each(function (i, n) {
var id = $(n).val();
var o = new Object();
o['qlrid'] = $(n).val();
o['proid'] = $("#proid").val();
o['qlrlx'] = $("#qlrlx_" + id).val();
o['qlbl'] = $("#qlbl_" + id).val();
o['qlrmc'] = $("#qlrmc_" + id).val();
o['qlrsfzjzl'] = $("#qlrsfzjzl_" + id).val();
o['qlrzjh'] = $("#qlrzjh_" + id).val();
o['qlrtxdz'] = $("#qlrtxdz_" + id).val();
o['qlryb'] = $("#qlryb_" + id).val();
o['qlrfddbr'] = $("#qlrfddbr_" + id).val();
o['qlrfddbrdh'] = $("#qlrfddbrdh_" + id).val();
o['qlrdlr'] = $("#qlrdlr_" + id).val();
o['qlrdlrdh'] = $("#qlrdlrdh_" + id).val();
o['qlrdljg'] = $("#qlrdljg_" + id).val();
o['qlrdlrzjzl'] = $("#qlrdlrzjzl_" + id).val();
o['qlrdlrzjh'] = $("#qlrdlrzjh_" + id).val();
o['gyfs'] = $("#gyfs_" + id).val();
o['qygyr'] = $("#qygyr_" + id).val();
o['sxh'] = a;
++a;
arry.push(o);
});
var s = JSON.stringify(arry);
$.ajax({
url: bdcdjUrl+"/bdcdjSqsxx/saveBdcSqsxx",
type: 'POST',
data: $("#sqsForm").serialize() + '&' + $.param({s: s}),
success: function (data) {
setTimeout($.unblockUI, 10);
if (isNotBlank(data)) {
if (data.msg == "success") {
window.location.reload();
alert("保存成功");
}
}
},
error: function (data) {
alert("保存失败");
}
});
}
$(document).ready(function () {
//重定义行
$("#sqrqk").attr("rowspan", sqrQk(i));
changelisten();
initHistoryZd();
addBorderToDiffHistoryZd();
});
//权利人增加行
function qlrAdd() {
var proid =$("#proid").val();
var qlrSize=$("#bdcQlrSize").val();
$.ajax({
url: bdcdjUrl+"/bdcdjSqsxx/addQlr",
type: 'POST',
data: {proid: proid, qlrlx: 'qlr',bdcQlrSize:qlrSize},
success: function (data) {
if(data){
setTimeout($.unblockUI, 10);
window.location.reload();
}
},
error: function (jqXHR, exception) {
alert("添加权利人失败");
}
});
}
//义务人增加行
function ywrAdd() {
var proid =$("#proid").val();
var ywrSize=$("#bdcYwrSize").val();
$.ajax({
url: bdcdjUrl+"/bdcdjSqsxx/addQlr",
type: 'POST',
async:false,
data: {proid: proid, qlrlx: 'ywr',bdcQlrSize:ywrSize},
success: function (data) {
if(data){
setTimeout($.unblockUI, 10);
window.location.reload();
}
},
error: function (jqXHR, exception) {
alert("添加义务人失败");
}
});
}
//删除行
function qlrDel(o) {
var row = "tr_" + o;
$.blockUI({message: "请稍等......"});
$.ajax({
url: bdcdjUrl+"/bdcdjSqsxx/delBdcQlr",
type: 'POST',
dataType: 'json',
data: $.param({s: o}),
success: function (data) {
setTimeout($.unblockUI, 10);
if (isNotBlank(data)) {
if (data.msg == "success") {
setTimeout($.unblockUI, 10);
window.location.reload();
}
}
},
error: function (data) {
alert("删除失败");
}
});
}
/**
* Created by jhj on 2017/5/23.
*/
function addBorderToDiffHistoryZd() {
$.ajax({
url: bdcdjUrl+"/bdcZddb/getHistoryZd",
type: 'POST',
data: {proid: '${proid!}', zdbInfo: 'false'},
success: function (data) {
if (isNotBlank(data)) {
addBorder(data);
}
},
error: function (jqXHR, exception) {
alert("获取字段对比失败");
}
});
}
function initHistoryZd() {
$.ajax({
url: bdcdjUrl+"/bdcZddb/getHistoryZd",
type: 'POST',
data: {proid: '${proid!}', zdbInfo: 'true'},
success: function (data) {
if (isNotBlank(data)) {
showHover(data);
}
},
error: function (jqXHR, exception) {
alert("获取字段对比失败");
}
});
}
function showHover(data) {
var zdmc = data.zdmc;
var zdvalue = data.zdvalue;
for (var i = 0; i < zdmc.length; i++) {
var mc = String(zdmc[i]);
var djValue = $("#" + mc).val();
$("#" + mc).attr("data-toggle", "tooltip");
$("#" + mc).attr("title", "原权籍数据为:" + zdvalue["" + mc]);
$("#" + mc).tooltip();
}
}
function addBorder(data) {
var zdmc = data.zdmc;
var zdvalue = data.zdvalue;
for (var i = 0; i < zdmc.length; i++) {
var mc = String(zdmc[i]);
var djValue = $("#" + mc).val();
if (djValue != undefined && djValue != zdvalue["" + mc]) {
$("#" + mc).css("border-color", "red");
}
}
}
//初始化是否有共有比例并改变共有方式
function changGyfs() {
var blnumber = 0;
$("input[name='fbcz']").each(function (i, n) {
var qlrid = $(n).val();
var qlbl = $("#qlbl_" + qlrid).val();
if (qlbl.replace(/\s/g, "") == "") {
qlbl = 0;
}
blnumber = blnumber + parseInt(qlbl);
});
if (blnumber != 1 && blnumber != 0) {
$("#afgy").attr("checked", "checked");
alert("权利人比例之和不为1!")
}
}
//验证共有比例是否为整数
function ValidateGybl(gybl) {
var gz = /^\d+(\.\d{2})?$/;
if (!gz.test(gybl))
return "请正确输入两位小数!";
}
//计算权利人数量并对分别持证方式进行更改
function changFbcz() {
var a = 0;
$("input[name='fbcz']").each(function (i, n) {
++a;
});
if (a == 1) {
$("#sqfbcz").attr("disabled", true);
}
else {
$("#sqfbcz").attr("disabled", false);
}
}
//删除行
function qlrDel(o) {
debugger;
var row = "tr_" + o;
$.blockUI({message: "请稍等......"});
$.ajax({
url: bdcdjUrl+"/bdcdjSpbxx/delBdcQlr",
type: 'POST',
dataType: 'json',
data: $.param({s: o}),
success: function (data) {
setTimeout($.unblockUI, 10);
if (isNotBlank(data)) {
if (data.msg == "success") {
$("tr[id='" + row + "']").remove();//删除当前行
i = i - 2;
$("#sqrqk").attr("rowspan", sqrQk(i));
changFbcz();
}
}
},
error: function (data) {
alert("删除失败");
}
});
}
//重定义申请人情况合并行数
function sqrQk(i) {
return parseInt($("#rowsize").val()) + i;
}
//初始化一些监听事件
function changelisten() {
//验证身份证证件号合法性
$("input[name='qlrzjh']").change(function () {
var index = $(this).attr('id');
var y = index.indexOf("_");
var id = index.substr(y + 1);
var qlrsfzjzl = $("#qlrsfzjzl_" + id).val();
var sId = $("#qlrzjh_" + id).val();
if (qlrsfzjzl == 1) {
var msg = ValidateIdCard(sId);
if (msg != null) {
alert(msg);
}
}
});
//填写共有比例计算权利人共有比例是否总计为1
$("input[name='qlbl']").change(function () {
var gybl = $(this).val();
var msg = ValidateGybl(gybl);
if (msg != null) {
alert(msg);
}
else {
changGyfs();
}
});
///计算权利人数量并对分别持证进行更改
changFbcz();
//验证共有方式
var gyfsArr=new Array();
$("select[name='qlrGyfs']").each(function (i, n) {
var errorMsg="共有方式错误";
var gyfs = $(n).val();
var qlrSize=$("#bdcQlrSize").val();
if(qlrSize<2&&gyfs==2){
showError(n,errorMsg);
}
if(qlrSize==2){
var gyfsObj=new Object();
gyfsObj.id=n;
gyfsObj.gyfs=gyfs;
gyfsArr.push(gyfsObj);
}
});
checkGyfs(gyfsArr);
}
function checkGyfs(gyfsArr){
var errorMsg="共有方式错误";
if(gyfsArr.length>0&&(gyfsArr[0].gyfs!=gyfsArr[1].gyfs)){
for(var i=0;i<gyfsArr.length;i++){
showError(gyfsArr[i].id,errorMsg);
}
}
}
function showError(n,errorMsg){
var qlrid=n.id.split('_')[1];
$("#error_"+qlrid).css("background-color", " #f2dede");
$("#error_"+qlrid).css("border-color", "#ebccd1");
$("#error_"+qlrid).css("border", "1px solid transparent");
$("#error_"+qlrid).css("border-radius", "4px");
$("#error_"+qlrid).css("width", "80px");
$("#error_"+qlrid).css("color", " #c33");
$("#error_"+qlrid).css("display", "inline-block");
$("#error_"+qlrid).html(errorMsg);
}
function qllxCz(cellvalue, options, rowObject) {
return '<div >' +
'<div><button type="button" class="btn btn-primary" onclick="glQlxx(\'' + rowObject.QLID + '\',\'' + rowObject.QLLXDM + '\',\'' + rowObject.PROID + '\',\'' + "ywr" + '\')">义务人</button><button type="button" class="btn btn-primary" onclick="glQlxx(\'' + rowObject.QLID+ '\',\'' + rowObject.QLLXDM + '\',\'' + rowObject.PROID + '\',\'' + "qlr" + '\')">权利人</button></div>'+
'</div>'
}
function checkSqr() {
var check='';
$.ajax({
url: bdcdjUrl+"/bdcdjSqrxx/checkSqr?sqrid=" + sqrid,
type: 'GET',
async:false,
success: function (data) {
setTimeout($.unblockUI, 10);
if (isNotBlank(data)) {
if (data.msg == "success") {
check='true';
}else{
alert("请先保存申请人");
}
}
},
error: function (data) {
alert("请先保存申请人");
}
});
return check;
}
function glQlxx(qlid,qllxdm,proid,qlrlx) {
var check=checkSqr();
if(check=='true') {
var wiid = $("#wiid").val();
$.blockUI({message: "正在关联,请稍等……"});
$.ajax({
url: bdcdjUrl + "/bdcdjSqrxx/glSqr?sqrid=" + sqrid + "&proids=" + proid + "&qlids=" + qlid + "&qllxdms=" + qllxdm + "&qlrlx=" + qlrlx,
type: 'POST',
dataType: 'json',
success: function (data) {
setTimeout($.unblockUI, 10);
if (isNotBlank(data)) {
if (data.msg == "success") {
alert("关联成功");
$.ajax({
type: 'get',
async: true,
url: bdcdjUrl+"/wfProject/updateWorkFlow?wiid="+ wiid,
success: function (data) {
}
});
var dataUrl = bdcdjUrl + "/bdcdjSlxx/getQlxxPagesJson?wiid=" + wiid;
tableReload("qlxx-grid-table", dataUrl, '', '', '');
}
}
},
error: function (data) {
alert("关联失败");
}
});
}
}
function glQlr(qlrlx){
if ($mulData.length == 0) {
alert("请至少选择一条数据!");
return;
}
var check=checkSqr();
if(check=='true') {
var wiid = $("#wiid").val();
var qlids = "";
var proids = "";
var qllxdms = "";
for (var i = 0; i < $mulData.length; i++) {
qlids += $mulData[i].QLID + ",";
proids += $mulData[i].PROID + ",";
qllxdms += $mulData[i].QLLXDM + ",";
}
if (qlids != null && qlids != "") {
qlids = qlids.substring(0, qlids.length - 1);
}
if (proids != null && proids != "") {
proids = proids.substring(0, proids.length - 1);
}
if (qllxdms != null && qllxdms != "") {
qllxdms = qllxdms.substring(0, qllxdms.length - 1);
}
$.blockUI({message: "正在关联,请稍等……"});
$.ajax({
url: bdcdjUrl + "/bdcdjSqrxx/glSqr?sqrid=" + sqrid + "&proids=" + proids + "&qlids=" + qlids + "&qllxdms=" + qllxdms + "&qlrlx=" + qlrlx,
type: 'POST',
dataType: 'json',
success: function (data) {
setTimeout($.unblockUI, 10);
if (isNotBlank(data)) {
if (data.msg == "success") {
alert("关联成功");
$.ajax({
type: 'get',
async: true,
url: bdcdjUrl+"/wfProject/updateWorkFlow?wiid="+ wiid,
success: function (data) {
}
});
var dataUrl = bdcdjUrl + "/bdcdjSlxx/getQlxxPagesJson?wiid=" + wiid;
tableReload("qlxx-grid-table", dataUrl, '', '', '');
}
}
},
error: function (data) {
alert("关联失败");
}
});
}
}
function saveQlrxx() {
$.blockUI({message: "请稍等……"});
$.ajax({
url: bdcdjUrl+"/bdcdjSqrxx/saveSqrxx",
type: 'POST',
data: $("#sqrForm").serialize(),
success: function (data) {
setTimeout($.unblockUI, 10);
if (data != null && data != "") {
if (data.msg == "success") {
alert("保存成功");
//window.parent.hideModel();
var contentFrame=window.parent.document.getElementById("contentFrame");
if(contentFrame!=null){
var frameMain=contentFrame.contentWindow.document.getElementById("frameMain");
if(frameMain!=null){
var contentPane=frameMain.contentWindow;
if(contentPane!=null)
contentPane.refreshGrid('sqr');
}
}
}
}
},
error: function (data) {
alert("保存失败");
}
});
}
function addQlrxx() {
$.ajax({
url: bdcdjUrl+"/bdcdjSqrxx/saveSqrxx",
type: 'POST',
data: $("#sqrForm").serialize(),
success: function (data) {
setTimeout($.unblockUI, 10);
if (data != null && data != "") {
if (data.msg == "success") {
alert("保存成功");
var contentFrame=window.parent.document.getElementById("contentFrame");
if(contentFrame!=null){
var frameMain=contentFrame.contentWindow.document.getElementById("frameMain");
if(frameMain!=null){
var contentPane=frameMain.contentWindow;
if(contentPane!=null)
contentPane.refreshGrid('sqr');
}
}
document.location.reload();
}
}
},
error: function (data) {
alert("保存失败");
}
});
}
/**
* Created by jhj on 2017/5/17.
*/
$(document).ready(function () {
//重定义行
$("#sqrqk").attr("rowspan", sqrQk(i));
changelisten();
});
//保存前验证共有方式,持证方式,共有比例是否为1
function beforeSave() {
$("input[name='fbcz']").each(function (i, n) {
var qlrid = $(n).val();
var qlbl = $("#qlbl_" + qlrid).val();
if (qlbl.replace(/\s/g, "") != "") {
var msg = ValidateGybl(qlbl);
if (msg != null || msg != undefined) {
return msg;
}
}
});
var msggyfs = changGyfs();
if (msggyfs != null || msggyfs != undefined) {
return msggyfs;
}
var sqfbcz = $("input[name='sqfbcz']:checked").val();
var gyfs = $("input[name='gyfs']:checked").val();
var a = 0;
$("input[name='fbcz']").each(function (i, n) {
++a;
});
if (a == 1 && sqfbcz == "是") {
return "持证方式选择错误!";
}
if (a != 1 && gyfs == 0) {
return "共有方式选择错误!";
}
}
//验证共有比例是否为整数
function ValidateGybl(gybl) {
var gz = /^0+(\.\d{1,2})?$/;
if (!gz.test(gybl)) {
return "请正确输入以0开头的两位小数!";
}
}
function changelisten() {
//验证权利人身份证证件号合法性
$("input[name='qlrzjh']").change(function () {
var index = $(this).attr('id');
var y = index.lastIndexOf("_");
var id = index.substr(y + 1);
var qlrsfzjzl = $("#qlr_qlrsfzjzl_" + id).val();
var sId = $("#qlr_qlrzjh_" + id).val();
if (qlrsfzjzl == 1) {
var msg = ValidateIdCard(sId);
if (msg != null) {
alert(msg);
}
}
});
//验证义务人身份证证件号合法性
$("input[name='ywrzjh']").change(function () {
var index = $(this).attr('id');
var y = index.lastIndexOf("_");
var id = index.substr(y + 1);
var qlrsfzjzl = $("#qlr_qlrsfzjzl_" + id).val();
var sId = $("#qlr_qlrzjh_" + id).val();
if (qlrsfzjzl == 1) {
var msg = ValidateIdCard(sId);
if (msg != null) {
alert(msg);
}
}
});
//集成身份证读卡器qlrmc
$("input[name='qlrmc']").dblclick(function () {
var index = $(this).attr('id');
var y = index.lastIndexOf("_");
var id = index.substr(y + 1);
var qlrzjh = "qlr_qlrzjh_" + id;
ReadIDCardNew(index, qlrzjh);
});
//填写共有比例计算权利人共有比例是否总计为1
$("input[name='qlbl']").change(function () {
var gybl = $(this).val();
var msg = ValidateGybl(gybl);
if (msg != null) {
alert(msg);
return false;
}
var msggyfs = changGyfs();
if (msggyfs != null) {
alert(msggyfs);
}
});
///计算权利人数量并对分别持证进行更改
changFbcz();
limGyfs();
}
function changGyfs() {
var blnumber = 0;
$("input[name='fbcz']").each(function (i, n) {
var qlrid = $(n).val();
var qlbl = $("#qlbl_" + qlrid).val();
if (qlbl.replace(/\s/g, "") == "") {
qlbl = 0;
}
else {
$("#afgy").attr("checked", "checked");
}
blnumber = blnumber + parseFloat(qlbl);
});
if (blnumber != 1 && blnumber != 0) {
return "权利人比例之和不为1!";
}
}
//计算权利人数量并对分别持证进行更改
function changFbcz() {
var a = 0;
$("input[name='fbcz']").each(function (i, n) {
++a;
});
if (a == 1) {
$("#sqfbcz").attr("disabled", true);
}
else {
$("#sqfbcz").attr("disabled", false);
}
}
//计算权利人数量并对共有方式进行权限限制
function limGyfs() {
var a = 0;
$("input[name='fbcz']").each(function (i, n) {
++a;
});
if (a == 1) {
$("[name='gyfs']").attr("disabled", true);
}
else {
$("[name='gyfs']").attr("disabled", false);
}
}
//重定义申请人情况合并行数
function sqrQk(i) {
return parseInt($("#rowsize").val()) + i;
}
/**
* Created by songhaowen on 2017/5/16.
*/
//保存按钮
function saveBdcSpbxx() {
var msgarry = [];//放入验证消息
$("input[name='qlrzjh']").each(function (i, n) {
var index = $(n).attr('id');
var y = index.lastIndexOf("_");
var id = index.substr(y + 1);
var qlrsfzjzl = $("#qlrsfzjzl_" + id).val();
var sId = $("#qlrzjh_" + id).val();
if (qlrsfzjzl == 1) {
var zjmsg = ValidateIdCard(sId);
if (zjmsg != null && zjmsg != undefined) {
msgarry.push(zjmsg);
}
}
});
if (msgarry != null && msgarry != undefined && msgarry.length > 0) {
alert(msgarry[0]);
return false;
}
var ms = beforeSave();
if (ms != null && ms != undefined) {
alert(ms);
return false;
}
save();
}
function save(){
var arry = []
var a = 1;
$.blockUI({message: "请稍等......"});
$("input[name='qlrid']").each(function (i, n) {
var id = $(n).val();
var o = new Object();
o['qlrid'] = $(n).val();
o['proid'] = $("#proid").val();
o['qlrlx'] = $("#qlrlx_" + id).val();
o['qlbl'] = $("#qlbl_" + id).val();
o['qlrmc'] = $("#qlrmc_" + id).val();
o['qlrsfzjzl'] = $("#qlrsfzjzl_" + id).val();
o['qlrzjh'] = $("#qlrzjh_" + id).val();
o['qlrtxdz'] = $("#qlrtxdz_" + id).val();
o['qlryb'] = $("#qlryb_" + id).val();
o['qlrfddbr'] = $("#qlrfddbr_" + id).val();
o['qlrfddbrdh'] = $("#qlrfddbrdh_" + id).val();
o['qlrdlr'] = $("#qlrdlr_" + id).val();
o['qlrdlrdh'] = $("#qlrdlrdh_" + id).val();
o['qlrdljg'] = $("#qlrdljg_" + id).val();
o['qlrdlrzjzl'] = $("#qlrdlrzjzl_" + id).val();
o['qlrdlrzjh'] = $("#qlrdlrzjh_" + id).val();
o['sxh'] = a;
++a;
arry.push(o);
});
var s = JSON.stringify(arry);
$.ajax({
url: bdcdjUrl+"/bdcdjBatchSpbxx/saveBdcSpbxx",
type: 'POST',
dataType: 'json',
data: $("#spbForm").serialize() + '&' + $.param({s: s}),
success: function (data) {
setTimeout($.unblockUI, 10);
if (isNotBlank(data)) {
if (data.msg == "success") {
//保存签名
$.ajax({
url: bdcdjUrl+"/sign/updateSignOpinon",
type: 'POST',
dataType: 'json',
data: $("#spbForm").serialize(),
success: function () {
alert("保存成功");
window.location.reload();
},
error: function () {
window.location.reload();
}
});
}
}
},
error: function (data) {
alert("保存失败");
}
});
}
//审批表打印
function printSpb(){
var proid = $("#proid").val();
var url=reportUrl+"/ReportServer?reportlet=print%2Fbdc_spb.cpt&op=write&proid="+proid;
showIndexModel(url,"打印审批表",1000,550,false);
}
/**
* Created by songhaowen on 2017/5/16.
*/
//保存按钮
function saveBdcSqsxx() {
var msgarry = [];//放入验证消息
$("input[name='qlrzjh']").each(function (i, n) {
var index = $(n).attr('id');
var y = index.lastIndexOf("_");
var id = index.substr(y + 1);
var qlrsfzjzl = $("#qlrsfzjzl_" + id).val();
var sId = $("#qlrzjh_" + id).val();
if (qlrsfzjzl == 1) {
var zjmsg = ValidateIdCard(sId);
if (zjmsg != null && zjmsg != undefined) {
msgarry.push(zjmsg);
}
}
});
if (msgarry != null && msgarry != undefined && msgarry.length > 0) {
alert(msgarry[0]);
return false;
}
var ms = beforeSave();
if (ms != null && ms != undefined) {
alert(ms);
return false;
}
save();
}
function save(){
var arry = []
var a = 1;
$.blockUI({message: "请稍等......"});
$("input[name='qlrid']").each(function (i, n) {
var id = $(n).val();
var o = new Object();
o['qlrid'] = $(n).val();
o['proid'] = $("#proid").val();
o['qlrlx'] = $("#qlrlx_" + id).val();
o['qlbl'] = $("#qlbl_" + id).val();
o['qlrmc'] = $("#qlrmc_" + id).val();
o['qlrsfzjzl'] = $("#qlrsfzjzl_" + id).val();
o['qlrzjh'] = $("#qlrzjh_" + id).val();
o['qlrtxdz'] = $("#qlrtxdz_" + id).val();
o['qlryb'] = $("#qlryb_" + id).val();
o['qlrfddbr'] = $("#qlrfddbr_" + id).val();
o['qlrfddbrdh'] = $("#qlrfddbrdh_" + id).val();
o['qlrdlr'] = $("#qlrdlr_" + id).val();
o['qlrdlrdh'] = $("#qlrdlrdh_" + id).val();
o['qlrdljg'] = $("#qlrdljg_" + id).val();
o['qlrdlrzjzl'] = $("#qlrdlrzjzl_" + id).val();
o['qlrdlrzjh'] = $("#qlrdlrzjh_" + id).val();
o['sxh'] = a;
++a;
arry.push(o);
});
var s = JSON.stringify(arry);
$.ajax({
url: bdcdjUrl+"/bdcdjBatchSqsxx/saveBdcSqsxx",
type: 'POST',
dataType: 'json',
data: $("#sqsForm").serialize() + '&' + $.param({s: s}),
success: function (data) {
setTimeout($.unblockUI, 10);
if (isNotBlank(data)) {
if (data.msg == "success") {
alert("保存成功");
window.location.reload();
}
}
},
error: function (data) {
alert("保存失败");
}
});
}
//申请书打印
function printSqs() {
var proid = $("#proid").val();
var url = reportUrl + "/ReportServer?reportlet=print%2Fbdc_fdcq_sqs_pl.cpt&op=write&proid=" + proid;
showIndexModel(url, "打印申请书", 1000, 550, false);
}
\ No newline at end of file
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
$.jgrid.defaults.responsive = true;
$.jgrid.defaults.styleUI = 'Bootstrap';
$(function () {
/*判断浏览器是否是ie8 解决ie8弹出框居中问题*/
var ua = navigator.userAgent.toLowerCase();
if (window.ActiveXObject) {
if (ua.match(/msie ([\d.]+)/)[1] == '8.0') {
$(window).resize(function () {
$.each($(".moveModel > .modal-dialog"), function () {
$(this).css("left", ($(window).width() - $(this).width()) / 2);
$(this).css("top", "40px");
})
})
}
}
//下拉框 含搜索的
$('.chosen-select').chosen({allow_single_deselect: true, no_results_text: "无匹配数据", width: "100%"});
//resize the chosen on window resize
$(window).on('resize.chosen', function () {
$.each($('.chosen-select'), function (index, obj) {
$(obj).next().css("width", 0);
var w = $(obj).parent().width();
$(obj).next().css("width", w);
});
$.each($('.chosen-single-select'), function (index, obj) {
$(obj).next().css("width", 0);
var e = $(obj).parent().width();
$(obj).next().css("width", e);
})
}).trigger('resize.chosen');
//绑定回车键
$(document).keydown(function(event){
if(event.keyCode==13){
$("#search").trigger("click");
}
});
$("#SaveBtn").click(function () {
var msg = valiteData(".tableA");
if (msg && msg != 'undefined')
tipInfo(msg);
else
valiteValue();
});
/*表单校验 end*/
$(".hideButton").click(function () {
$("#tableForm").find(".form-control").tooltip("destroy").removeAttr("aria-invalid").removeAttr("title").removeAttr("style");
$('#tableForm')[0].reset();
$(".Pop").hide();
$("#valiteType").val("");
$("#dm").removeAttr("disabled");
});
//生成表格
BdcFyTableConfigGrid();
fillTable();
//新增
$("#addData").click(function () {
$("#limitTablePop,#modal-backdrop-pop").show();
$(window).trigger('resize.chosen');
$("#title").html("新增配置");
$("#valiteType").val("add");
$('#tableForm')[0].reset();
$("#dm").removeAttr("disabled");
});
//删除
$("#delData").click(function () {
var ids = $('#limit-table-grid-table').jqGrid('getGridParam', 'selarrrow');
delRule(ids, configUrl + "/bdcZdFy/delBdcZdFy", "limit-table-grid-table");
});
//修改
$("#updateData").click(function () {
var ids = $('#limit-table-grid-table').jqGrid('getGridParam', 'selarrrow');
if (ids.length == 0) {
tipInfo("请选择一条数据!");
return;
}
if (ids.length > 1) {
tipInfo("只能同时修改一条数据!");
return;
}
var data = $('#limit-table-grid-table').getRowData(ids);
$("#title").html("修改配置");
$("#dm").attr("disabled", "disabled");
$("#dm").val(data.DM);
$("#fymc").val(data.MC);
$("#valiteType").val("update");
//字段赋值
$("#limitTablePop,#modal-backdrop-pop").show();
$(window).trigger('resize.chosen');
});
$("#search").click(function () {
var fymc = $("#fymcSearch").val();
$("#limit-table-grid-table").jqGrid('setGridParam', {
datatype: 'json',
page: 1,
url: configUrl + "/bdcZdFy/getBdcZdFyPagesJson?mc=" + encodeURI(fymc)
}).trigger("reloadGrid"); //重新载入
});
//resize to fit page size
$(window).on('resize.jqGrid', function () {
var contentWidth;
if ($("#limitTableContent").width() > 0) {
contentWidth = $("#limitTableContent").width();
}
$("#limit-table-grid-table").jqGrid('setGridWidth', contentWidth);
});
//获取列表数据
function fillTable() {
$("#limit-table-grid-table").jqGrid('setGridParam', {
datatype: 'json',
page: 1,
url: configUrl + "/bdcZdFy/getBdcZdFyPagesJson",
postData: {}
}).trigger("reloadGrid"); //重新载入
}
})
//删除判断是否没有选择数据
function delRule(ids, url, gridId) {
if (ids.length == 0) {
tipInfo("请选择一条数据!");
return;
}
showConfirmDialog("删除", "是否删除?", "del", "'" + ids + "','" + url + "','" + gridId + "'", "", "");
}
//打开table页面
function toLimitTable() {
$("#limitTablePop").hide();
$("#myModal").show();
}
//提示
function tipInfo(msg) {
bootbox.dialog({
message: "<h3><b>" + msg + "</b></h3>",
title: "",
buttons: {
main: {
label: "关闭",
className: "btn-primary",
}
}
});
}
//auth表格初始化
function BdcFyTableConfigGrid() {
var grid_selector = "#limit-table-grid-table";
var pager_selector = "#limit-table-grid-pager";
//resize on sidebar collapse/expand
var parent_column = $(grid_selector).closest('[class*="col-"]');
$(document).on('settings.ace.jqGrid', function (ev, event_name, collapsed) {
if (event_name === 'sidebar_collapsed' || event_name === 'main_container_fixed') {
$(grid_selector).jqGrid('setGridWidth', parent_column.width());
}
});
jQuery(grid_selector).jqGrid({
datatype: "local",
height: 'auto',
jsonReader: {id: 'DM'},
colNames: ['法院代码', '法院名称','dm'],
colModel: [
{name: 'DM', index: 'DM', width: '50%', sortable: false},
{name: 'MC', index: 'MC', width: '50%', sortable: false},
{name: 'DM', index: 'DM', width: '0%', sortable: false, hidden: true}
],
viewrecords: true,
rowNum: 5,
rowList: [5, 10, 15],
pagerpos: "left",
pager: pager_selector,
altRows: false,
multiboxonly: true,
multiselect: true,
loadComplete: function () {
var table = this;
setTimeout(function () {
updatePagerIcons(table);
enableTooltips(table);
$(grid_selector).jqGrid('setGridWidth', $("#limitTableContent").width());
}, 0);
},
ondblClickRow: function (rowid) {
},
caption: "",
autowidth: true
});
}
//replace icons with FontAwesome icons like above
function updatePagerIcons(table) {
var replacement =
{
'ui-icon-seek-first': 'ace-icon fa fa-angle-double-left bigger-140',
'ui-icon-seek-prev': 'ace-icon fa fa-angle-left bigger-140',
'ui-icon-seek-next': 'ace-icon fa fa-angle-right bigger-140',
'ui-icon-seek-end': 'ace-icon fa fa-angle-double-right bigger-140'
};
$('.ui-pg-table:not(.navtable) > tbody > tr > .ui-pg-button > .ui-icon').each(function () {
var icon = $(this);
var $class = $.trim(icon.attr('class').replace('ui-icon', ''));
if ($class in replacement) icon.attr('class', 'ui-icon ' + replacement[$class]);
})
}
function enableTooltips(table) {
$('.navtable .ui-pg-button').tooltip({container: 'body'});
$(table).find('.ui-pg-div').tooltip({container: 'body'});
}
function valiteValue() {
if (isNaN($("#dm").val())) {
tipInfo("法院代码请输入数字!");
return false;
}
$.ajax({
url: configUrl + '/bdcZdFy/valite?valiteType=' + $("#valiteType").val(),
type: 'get',
data: {dm: $("#dm").val(), mc: $("#fymc").val()},
success: function (data) {
if (data && data != 'undefiend') {
alert(data);
} else {
saveorupdate();
}
},
error: function (data) {
}
});
}
function saveorupdate() {
$.ajax({
url: configUrl + '/bdcZdFy/saveBdcZdFy?dm=' + encodeURI($("#dm").val()) + "&mc=" + encodeURI($("#fymc").val()) ,
type: 'post',
dataType: 'json',
success: function (data) {
alert(data.result);
$("#limitTablePop,#modal-backdrop-pop").hide();
//此处可以添加对查询数据的合法验证
$("#limit-table-grid-table").jqGrid('setGridParam', {
datatype: 'json',
page: 1
}).trigger("reloadGrid"); //重新载入
$('#tableForm')[0].reset();
},
error: function (data) {
alert("保存失败");
$("#limitTablePop,#modal-backdrop-pop").hide();
$('#tableForm')[0].reset();
}
});
}
function del(ids, url, gridId) {
$.getJSON(url + "?ids=" + encodeURIComponent(ids), {}, function (jsonData) {
setTimeout($.unblockUI, 10);
alert(jsonData.result);
$('#' + gridId).trigger("reloadGrid");
})
}
\ No newline at end of file
$(function () {
doBefore();
var zsbhSyUrl = bdcdjUrl + "/bdcZsbhSy/getBdcZsbhSyPagesJson";
sdInitTable();
tableReload("sd-grid-table", zsbhSyUrl, {
dcxc: $("#sd_search").val(),
zsid: zsid,
zsbh: zsbh
});
//搜索事件
$("#sd_search_btn").click(function () {
tableReload("sd-grid-table", zsbhSyUrl, {
dcxc: $("#sd_search").val()
});
})
//单元号高级查询的搜索按钮事件
$("#sdGjSearchBtn").click(function () {
var bdcdyh = $('#searchBdcdyh').val();
var fzr = $('#searchFzr').val();
var bdcqzh = $('#searchBdcqzh').val();
var zsbh = $('#searchZsbh').val();
var fzrq = $('#searchFzrq').val();
tableReload("sd-grid-table", zsbhSyUrl, {
dcxc: "",
bdcdyh: bdcdyh,
fzr: fzr,
bdcqzh: bdcqzh,
zsbh: zsbh,
fzrq: fzrq
});
})
$(".sdSearchPop-modal,.newPro-modal").draggable({opacity: 0.7, handle: 'div.modal-header'});
//单元号高级查询的搜索按钮事件
$("#djsjHide,#ywsjHide,#tipHide,#tipCloseBtn").click(function () {
if (this.id == "djsjHide") {
$("#djsjSearchPop").hide();
$("#djsjSearchForm")[0].reset();
} else if (this.id == "ywsjHide") {
$("#ywsjSearchPop").hide();
$("#ywsjSearchForm")[0].reset();
} else if (this.id == "tipHide" || this.id == "tipCloseBtn") {
$("#modal-backdrop").hide();
$("#tipPop").hide();
}
});
});
function doBefore() {
/*判断浏览器是否是ie8 解决ie8弹出框居中问题*/
var ua = navigator.userAgent.toLowerCase();
if (window.ActiveXObject) {
if (ua.match(/msie ([\d.]+)/)[1] == '8.0') {
$(window).resize(function () {
$.each($(".moveModel > .modal-dialog"), function () {
$(this).css("left", ($(window).width() - $(this).width()) / 2);
$(this).css("top", "40px");
})
})
}
}
/* 文字水印 */
$(".watermarkText").watermark();
$(document).keydown(function (event) {
if (event.keyCode == 13) { //绑定回车
}
});
$(window).on('resize.chosen', function () {
$.each($('.chosen-select'), function (index, obj) {
$(obj).next().css("width", 0);
var w = $(obj).parent().width();
$(obj).next().css("width", w);
})
}).trigger('resize.chosen');
$('.chosen-select').chosen({allow_single_deselect: true, no_results_text: "", width: "100%"});
}
function readyBeforeInit(grid_selector, pager_selector, id) {
//绑定回车键
enterButton(id);
//resize to fit page size
$(window).on('resize.jqGrid', function () {
$(grid_selector).jqGrid('setGridWidth', $(".page-content").width());
});
//resize on sidebar collapse/expand
var parent_column = $(grid_selector).closest('[class*="col-"]');
$(document).on('settings.ace.jqGrid', function (ev, event_name, collapsed) {
if (event_name === 'sidebar_collapsed' || event_name === 'main_container_fixed') {
$(grid_selector).jqGrid('setGridWidth', parent_column.width());
}
});
}
function sdInitTable() {
var grid_selector = "#sd-grid-table";
var pager_selector = "#sd-grid-pager";
readyBeforeInit(grid_selector, pager_selector, 'sd_search');
jQuery(grid_selector).jqGrid({
datatype: "local",
height: 'auto',
jsonReader: {id: 'ZSID'},
colNames: ['序列', '证书编号', '不动产单元', '不动产权证号', '打印人', '打印日期', 'ZSID'],
colModel: [
{
name: 'XL',
index: '',
width: '3%',
sortable: false,
formatter: function (cellvalue, options, rowObject) {
return '<span style="font-family: cursive;"> ' + rowObject.ROWNUM_ + '</span>'
}
},
{name: 'ZSBH', index: 'ZSBH', width: '8%', sortable: false},
{name: 'BDCDYH', index: 'BDCDYH', width: '10%', sortable: false},
{name: 'BDCQZH', index: 'BDCQZH', width: '15%', sortable: false},
{name: 'FZR', index: 'FZR', width: '10%', sortable: false},
{
name: 'FZRQ',
index: 'FZRQ',
width: '10%',
sortable: false,
formatter: function (cellvalue, options, rowObject) {
if (!cellvalue) {
return "";
}
var value = cellvalue;
var data = new Date(value).Format("yyyy年MM月dd日");
return data;
}
},
{name: 'ZSID', index: 'ZSID', width: '0%', sortable: false, hidden: true}
],
viewrecords: true,
rowNum: 7,
//rowList: [7, 15, 20],
pager: pager_selector,
pagerpos: "left",
altRows: false,
multiboxonly: false,
multiselect: false,
rownumbers: false,
loadComplete: function () {
var table = this;
setTimeout(function () {
updatePagerIcons(table);
enableTooltips(table);
//resize
$(grid_selector).jqGrid('setGridWidth', $(".tableHeader").width());
}, 0);
//如果7条设置宽度为auto,如果少于7条就设置固定高度
setHeight(grid_selector);
},
editurl: "", //nothing is saved
caption: "",
autowidth: true
});
}
function tableReload(table, Url, data) {
var jqgrid = $("#" + table);
jqgrid.setGridParam({url: Url, datatype: 'json', page: 1, postData: data});
jqgrid.trigger("reloadGrid");//重新加载JqGrid
}
function enableTooltips(table) {
$('.navtable .ui-pg-button').tooltip({container: 'body'});
$(table).find('.ui-pg-div').tooltip({container: 'body'});
}
function updatePagerIcons(table) {
var replacement =
{
'ui-icon-seek-first': 'ace-icon fa fa-angle-double-left bigger-140',
'ui-icon-seek-prev': 'ace-icon fa fa-angle-left bigger-140',
'ui-icon-seek-next': 'ace-icon fa fa-angle-right bigger-140',
'ui-icon-seek-end': 'ace-icon fa fa-angle-double-right bigger-140'
};
$('.ui-pg-table:not(.navtable) > tbody > tr > .ui-pg-button > .ui-icon').each(function () {
var icon = $(this);
var $class = $.trim(icon.attr('class').replace('ui-icon', ''));
if ($class in replacement) icon.attr('class', 'ui-icon ' + replacement[$class]);
})
}
function closeDialog(id) {
var x = '#' + id;
$(x).hide();
clearSearchDialog();
}
function showDialog(id) {
if (id == 'addSel') {
var chk_value = $('#sd-grid-table').jqGrid('getGridParam', 'selarrrow');
for (var i = 0; i < chk_value.length; i++) {
var rowData = $('#sd-grid-table').jqGrid('getRowData', chk_value[i]);
$('#bdcdyh').val(rowData.BDCDYH);
$('#qlr').val(rowData.QLR);
$('#zl').val(rowData.ZL);
$('#xzyy').val(rowData.JSYY);
$('#cqzh').val(rowData.CQZH);
}
$("#addSdData").show();
} else if (id == 'sdShow') {
$("#sdSearchPop").show();
}
relocateDialog(id);
}
function showModal() {
$('#myModal').show();
relocateDialog('myModal');
}
function closeModal() {
$('#myModal').hide();
relocateDialog('addSel');
}
function reload() {
var url = bdcdjUrl + "/bdcJsxx/getBdcJsxxPagesJson";
tableReload("sd-grid-table", url, '', '');
}
function clearSearchDialog() {
$('#searchBdcdyh').val('');
$('#searchFzr').val('');
$('#searchBdcqzh').val('');
$('#searchZsbh').val('');
}
function enterButton(id) {
$('#' + id).keydown(function (event) {
if (event.keyCode == 13) {
$('#' + id + '_btn').click();
}
});
}
function setHeight(grid_selector) {
if ($(grid_selector).jqGrid("getRowData").length == 7) {
$(grid_selector).jqGrid("setGridHeight", "auto");
} else {
$(grid_selector).jqGrid("setGridHeight", "275px");
}
}
function relocateDialog(id) {
$(window).trigger('resize.chosen');
var browser = navigator.appName;
if (browser == 'Microsoft Internet Explorer') {
if (id == 'addSel') {
$(".modal-dialog").css({"margin-left": "2%"});
} else if (id == 'myModal') {
$(".modal-dialog").css({"margin-left": "8%"});
}
} else {
if (id == 'addSel') {
$(".modal-dialog").css({"margin-left": "25%"});
} else if (id == 'myModal') {
$(".modal-dialog").css({"margin-left": "8%"});
}
}
}
\ No newline at end of file
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
var confirmCreateLw = function (data, configUrl, sflw) {
var xzwh = "";
var examineInfo = "";
var wiid = data.wiid;
if (data.hasOwnProperty("xzwh")) {
xzwh = data.xzwh;
}
if (data.hasOwnProperty("examineInfo")) {
examineInfo = data.examineInfo;
}
if (sflw == "true") {
showConfirmDialog("提示信息", "" + data.checkMsg + "," + "是否创建例外", "createLw", "'" + wiid + "','" + xzwh + "','" + examineInfo + "','" + configUrl + "'", "closeBlockUI", "");
} else {
tipInfo(data.checkMsg);
closeBlockUI();
}
};
function tipInfo(msg) {
bootbox.dialog({
message: "<h3><b>" + msg + "</b></h3>",
title: "",
buttons: {
main: {
label: "关闭",
className: "btn-primary",
}
}
});
}
var createLw = function (wiid, xzwh, examineInfo, configUrl) {
$.ajax({
url: configUrl + '/examine/creatWiid',
type: 'post',
dataType: 'json',
data: {xzwh: xzwh, wiid: wiid, examineInfo: examineInfo},
success: function (data) {
if (data.hasOwnProperty("lwsqUrl")) {
var lwsqUrl = data.lwsqUrl;
window.parent.parent.$('#handleModel').modal('hide');
window.parent.parent.showDynamicModel('exceptionModel', lwsqUrl, "增加例外")
}
},
error: function (data) {
}
});
};
var closeBlockUI = function () {
setTimeout($.unblockUI, 10);
};
\ No newline at end of file
function glSqrCz(cellvalue, options, rowObject) {
return '<div >' +
'<div><button type="button" class="btn btn-primary" onclick="glSqrxx(\'' + cellvalue + '\',\'' + "ywr" + '\')">义务人</button><button type="button" class="btn btn-primary" onclick="glSqrxx(\'' + cellvalue + '\',\'' + "qlr" + '\')">权利人</button></div>'+
'</div>'
}
function qlrxxCz(cellvalue, options, rowObject) {
return '<div >' +
'<div><button type="button" class="btn btn-primary" onclick="delQlrxx(\'' + rowObject.QLRID + '\')">删除</button></div>' +
'</div>'
}
function rendererQlrlx(cellvalue, options, rowObject) {
if (cellvalue == 'qlr' || cellvalue == "" || cellvalue == null)
return '<span class="label label-success" onclick="setQlrlx(\'' + rowObject.QLRID + '\')">权利人</span>&nbsp;';
else if (cellvalue == 'ywr')
return '<span class="label label-danger" onclick="setQlrlx(\'' + rowObject.QLRID + '\')">义务人</span>&nbsp;';
}
//设置权利人类型
function setQlrlx(qlrid) {
var proid = $("#proid").val();
$.ajax({
type: "POST",
async: false,
url: bdcdjUrl+"/bdcdjQlrxx/setQlrlx?qlrid=" + qlrid,
success: function (data) {
if (isNotBlank(data)&&data.msg == "success") {
alert("设置成功");
$.ajax({
type: 'get',
async: true,
url: bdcdjUrl+"/wfProject/updateWorkFlow?proid="+ proid,
success: function (data) {
}
});
var dataUrl = bdcdjUrl + "/bdcdjQlxx/getQlrxxPagesJson?proid=" + proid;
tableReload("qlr-grid-table", dataUrl, '', '', '');
}
},
error: function (data) {
alert("设置失败");
}
});
}
function glSqrxx(sqrid,qlrlx) {
var wiid = $("#wiid").val();
var qlid = $("#qlid").val();
var qllxdm = $("#qllxdm").val();
var proid = $("#proid").val();
$.blockUI({message: "正在关联,请稍等……"});
$.ajax({
url: bdcdjUrl+"/bdcdjSqrxx/glSqr?sqrid=" + sqrid+"&proids=" + proid+"&qlids=" + qlid+"&qllxdms=" + qllxdm+"&qlrlx="+qlrlx,
type: 'POST',
dataType: 'json',
success: function (data) {
setTimeout($.unblockUI, 10);
if (isNotBlank(data)) {
if (data.msg == "success") {
alert("关联成功");
$.ajax({
type: 'get',
async: true,
url: bdcdjUrl+"/wfProject/updateWorkFlow?wiid="+ wiid,
success: function (data) {
}
});
var dataUrl = bdcdjUrl + "/bdcdjQlxx/getQlrxxPagesJson?proid=" + proid;
tableReload("qlr-grid-table", dataUrl, '', '', '');
}
}
},
error: function (data) {
alert("关联失败");
}
});
}
function delQlrxx(qlrid) {
var proid = $("#proid").val();
if(confirm("确定删除权利人吗?")) {
$.blockUI({message: "正在删除,请稍等……"});
$.ajax({
url: bdcdjUrl + "/bdcdjQlrxx/delQlrxx?qlrid=" + qlrid,
type: 'POST',
dataType: 'json',
success: function (data) {
setTimeout($.unblockUI, 10);
if (isNotBlank(data)) {
if (data.msg == "success") {
alert("删除成功");
$.ajax({
type: 'get',
async: true,
url: '${bdcdjUrl}/wfProject/updateWorkFlow?wiid=' + wiid,
success: function (data) {
}
});
var dataUrl = bdcdjUrl + "/bdcdjQlxx/getQlrxxPagesJson?proid=" + proid;
tableReload("qlr-grid-table", dataUrl, '', '', '');
}
}
},
error: function (data) {
alert("删除失败");
}
});
}
}
\ No newline at end of file
/**
* 创建chart
* @param cat
* @param title
* @param xAxis
* @param yAxis
* @param plotOptions
* @param tooltip
* @param series
* @return {Highcharts.Chart}
*/
function buildChart(cat,title,xAxis,yAxis,plotOptions,tooltip,series){
var chart = new Highcharts.Chart({
chart:cat,
title: title,
xAxis: xAxis,
yAxis:yAxis,
plotOptions:plotOptions,
tooltip: tooltip,
series:series,
exporting: {
enabled: false
}
});
return chart;
}
/**
* 创建柱状图
* @param renderToId
* @param data
* @param y_title
* @param title
* @param x_axis
* @param y_axis
* @return {Highcharts.Chart}
*/
function buildColumnChart(renderToId,data,y_title,title,x_axis,y_axis){
var colors = Highcharts.getOptions().colors,
categories= x_axis,
name=y_title;
function setChart(name, categories, data, color) {
chart.xAxis[0].setCategories(categories);
if(categories!=null && categories.length>6){
chart.xAxis[0].options.labels.rotation = -45;
chart.xAxis[0].options.labels.color = "#666767";
chart.xAxis[0].options.labels.fontWeight = "lighter";
chart.redraw();
}
chart.series[0].remove();
chart.addSeries({
name:name,
data:data,
color:color || 'black'
});
}
var cat = {
renderTo:renderToId,
type:'column'
};
var title = {
text:title
};
var xAxis = {
categories:x_axis
};
if(data.length>6)
xAxis = {
categories:x_axis,
labels:{
rotation:-45 ,
style: {color:"#666767",fontWeight:"lighter"}
}
};
var yAxis = {
title: {
text: '单位:'+y_axis
}
} ;
var plotOptions = {
column:{
cursor:'pointer',
point:{
events:{
click:function () {
var drilldown = this.drilldown;
if (drilldown) { // drill down
setChart(drilldown.name, drilldown.categories, drilldown.data, drilldown.color);
} else { // restore
setChart(name, categories, data);
}
}
}
},
pointWidth:100,
dataLabels:{
enabled:true,
color:colors[0],
style:{
fontWeight:'bold'
},
formatter:function () {
return this.y;
}
}
}
};
var tooltip = {
formatter:function () {
var point = this.point,
s = this.x + ':<b>' + this.y +y_axis+ '</b><br/>';
if (point.drilldown) {
s += '点击 ' + point.category + ' 查看详情';
}
return s;
}
};
var series = [
{
name:name,
data:data,
color:'black'
}
];
chart = buildChart(cat, title, xAxis, yAxis, plotOptions, tooltip, series);
return chart;
}
/**
* 创建饼状图
* @param renderToId
* @param data
* @param y_title
* @param title
* @param x_axis
* @param y_axis
* @return {*}
*/
function buildPieChart(renderToId,data,y_title,title,x_axis,y_axis){
var colors = Highcharts.getOptions().colors,
categories= x_axis,
name=y_title;
var browserData = [];
var versionsData = [];
for (var i = 0; i < data.length; i++) {
// add browser data
browserData.push({
name: categories[i],
y: data[i].y,
color: data[i].color
});
// add version data
for (var j = 0; j < data[i].drilldown.data.length; j++) {
var brightness = 0.2 - (j / data[i].drilldown.data.length) / 5 ;
versionsData.push({
name: data[i].drilldown.categories[j],
y: data[i].drilldown.data[j],
color: Highcharts.Color(data[i].color).brighten(brightness).get()
});
}
}
var cat = {
renderTo:renderToId,
type:'pie'
};
var title = {
text:title
};
var xAxis = {
categories:x_axis
};
var yAxis = {
title: {
text: '单位:'+y_axis
}
} ;
var plotOptions = {
pie: {
shadow: false
}
};
var tooltip = {
formatter:function () {
var point = this.point,
s = this.point.name + ':<b>' + this.y +y_axis+ '</b><br/>';
return s;
}
};
var series = [{
name: 'Browsers',
data: browserData,
size: '60%',
dataLabels: {
formatter: function() {
return this.y > 0 ? '<b>'+ this.point.name +'</b> ': null;
},
color: 'white',
distance: -30
}
}, {
name: 'Versions',
data: versionsData,
innerSize: '60%',
dataLabels: {
formatter: function() {
// display only if larger than 1
return this.y > 0 ? '<b>'+ this.point.name +':</b> '+ this.y+y_axis : null;
}
}
}];
chart = buildChart(cat, title, xAxis, yAxis, plotOptions, tooltip, series);
return chart;
}
function expExcel(hideDivID,expUrl){
window.location.href=expUrl;
showProgressBar();
}
\ No newline at end of file
var nDeviceIndex = 0;//装置的编号; 0:文档摄像头;1:人像摄像头
var szPostfix = ".jpg";
var nBar = 0;
var Capture;//必须得获取object对象
var Content;
var szFilePath = "D:\\";
var imgeId=0;
var content;
//打开设备
function openDevices_onclick(value){
var iType = parseInt(value);
nDeviceIndex = iType;
var strResult = Capture.OpenDevice(nDeviceIndex);
Capture.SetCameraExposure(nDeviceIndex,-4);//曝光度设置为-3,-4,亮度比较正常;-5聚焦更快些,但亮度暗些;
DpiTextChange(200,200);//设置水平方向和竖直方向的DPI值为200;
//两秒后执行
setTimeout(Catch_onClick,5000);
}
//关闭设备
function closeDevices_onclick() {
Capture.CloseDevice(nDeviceIndex);
}
//获取设备状态
function GetDeviceState(){
var iResult = Capture.GetDeviceState(nDeviceIndex);
if(iResult==0){
//设备存在,未被使用
alert("设备状态:设备存在,未被使用");
}else if(iResult==1){
//设备被打开或被占用
alert("设备状态:设备被打开或被占用");
}else if(iResult<0){
//设备不存在
alert("设备状态:设备不存在");
}
return iResult;
}
//设置拍照存档的xDPI,yDPI
function DpiTextChange(XdpiValue,YdpiValue){
if(Capture.GetDeviceState(nDeviceIndex)==1){
xDpi = parseInt( XdpiValue );
yDpi = parseInt( YdpiValue );
Capture.SetGrabbedDPI( xDpi, yDpi );
Capture.SetDeviceBarcode(nDeviceIndex,1);
}else{
alert("找不到设备或打开失败!");
}
}
//拍照并且存档,若勾选条码则一起获取条码信息
function Catch_onClick() {
var szFileName = szFilePath + imgeId.toString() + szPostfix;
Capture.GrabToFile(szFileName);
//删除文件
//Capture.DeleteFolder(szFilePath);
var szBarcode = "";
var nBarcodeCount = Capture.GetBarcodeCount()
for(var k = 0; k < nBarcodeCount; k++)
{
szBarcode += Capture.GetBarcodeContent(k);
}
content.next().hide();
if(szBarcode!=''){
szBarcode=decodeURI(szBarcode);
}
content.val(szBarcode);
}
差异被折叠。
差异被折叠。
差异被折叠。
(function (b) {
var f = {init: function (d) {
return this.filter(':input[type="text"],:input[type="password"]').each(function () {
if (!b(this).data("watermark-object")) {
var c = b.extend({watermarkClass: "watermark", text: "watermark", useAttribute: !0, attributeName: "data-watermark"}, d), a = b(this), f = a.outerHeight(), i = parseFloat(a.css("font-size")), e = parseFloat(a.css("padding-top")), g = parseFloat(a.css("padding-bottom")), j = parseFloat(a.css("margin-top")), h = parseFloat(a.css("padding-left")), k = parseFloat(a.css("margin-left")),
l = parseFloat(a.css("text-indent")), h = h + k + l, e = (e + g) / 2;
e = b("<div>").css({position: "relative", display: "inline-block"}).addClass("watermark_wrapper");
g = c.text;
c.useAttribute && (c.attributeName && "undefined" != a.attr(c.attributeName)) && (g = a.attr(c.attributeName));
c = b("<span>").css({height: f, "line-height": f + "px", "font-size": i, top: j, left: h, position: "absolute", cursor: a.css("cursor")}).addClass(c.watermarkClass).html(g);
b(this).data("watermark-object", c);
c.click(function () {
a.click();
a.focus()
});
a.wrap(e);
a.after(c);
a.bind("click keyup input cut paste", function () {
a.watermark("update")
});
a.watermark("update")
}
})
}, show: function () {
return this.each(function () {
b(this).data("watermark-object") && b(this).data("watermark-object").show()
})
}, hide: function () {
return this.each(function () {
b(this).data("watermark-object") && b(this).data("watermark-object").hide()
})
}, update: function () {
return this.each(function () {
b(this).data("watermark-object") && (b(this).val() ? b(this).watermark("hide") : b(this).watermark("show"))
})
}};
b.fn.watermark = function (d) {
if (f[d])return f[d].apply(this, Array.prototype.slice.call(arguments, 1));
if ("object" === typeof d || !d)return f.init.apply(this, arguments);
b.error("Method " + d + " does not exist on jQuery.watermark")
}
})(jQuery);
\ No newline at end of file
$(document).ready(function(){
function unfoldMenu(pn, cn){
var p = $('span.flip'), c = $('div.panel'), cc = $('div.panel-current');
p.removeClass('flip-current');
cc.hide(200, function(){
$(this).removeAttr('style').removeClass('panel-current');
})
if(c.index(cn) != c.index(cc)){
pn.addClass('flip-current');
cn.show(200, function(){
$(this).removeAttr('style').addClass('panel-current');
});
}
}
function menuHandle(){
$('span.flip').click(function(){
var pn = $(this), cn = pn.next();
unfoldMenu(pn, cn);
});
}
//设置默认下当前展开
function menuCurrent(){
var idx = $('input.menu-code-index').val(), m, pn, cn, p = $('span.flip'), c = $('div.panel'), cc = $('div.panel-current');
if(/c(\d)+/.test(idx)){ //判断c(十进制)条件
m = $('a[data-service-index="' + idx + '"]').addClass('current');
cn = m.parents('div.panel');
pn = cn.prev();
unfoldMenu(pn, cn);
}
}
menuCurrent();
menuHandle();
});
// 收缩菜单
$(document).ready(function () {
$("#arrow").click(function(){
$("#sidebar").toggleClass('sidebar2');
$("#sidebar").toggleClass('sidebar');
$("#menu2Tab").toggleClass('menu2Tab2');
$("#menu2Tab").toggleClass('menu2Tab');
$(".leftMenu").toggle();
$("#main-content").toggleClass('main-content');
});
});
// end 收缩菜单
\ No newline at end of file
$(document).ready(function () {
var rowCount = parseInt($("#rowCount").val());
var cellCount = parseInt($("#cellCount").val())+1;
CreateTable(rowCount, cellCount);
});
//jyl 创建表
function CreateTable(rowCount, cellCount) {
var table = $("<table border=\"1\">");
table.appendTo($("#lpbTable"));
for (var i = 0; i < rowCount; i++) {
//行id
var rowid = rowCount - i;
var tr = $("<tr id=" + rowid + "></tr>");
tr.appendTo(table);
for (var j = 0; j < cellCount; j++) {
//列id
var cellid = j+"";
var tdid = rowid + "_" + cellid;
var td = $("<td id=" + tdid + ">" + tdid + "</td>");
td.appendTo(tr);
}
}
$("#lpbTable").append("</table>");
}
\ No newline at end of file
function createXmxx(){
// alert($.cookie('lpb_cookie'));
// djsjEditXm
var ljzFlag="";
var passCheck="0";
var ljzPassCheck="0";
var bdcXmRelList="";
var dcbIndexs=new Array();
var bdcdyhs = new Array();
var djIds=new Array();
debugger;
if($.cookie('lpb_cookie')!=null){
var jsonStr=JSON.parse($.cookie('lpb_cookie'));
$.each(jsonStr,function(idx,item){
var fwmc= idx.substring(0,idx.indexOf("("));
var zdzhh= idx.substring(idx.indexOf("(")+1,idx.indexOf(")"));
// alert(item.ljz);
// alert(item.value);
// alert(item.property);
if(item.ljz=="true"){
ljzFlag="true";
// bdcXmRelList+="&bdcXmRelList["+i+"].qjid="+zdzhh;
dcbIndexs.push(item.value);
}
else{
var info=item.property;
for(var i=0;i<info.length;i++){
djIds.push(info[i].substring(0,info[i].indexOf("$")));
bdcdyhs.push(info[i].substring(info[i].indexOf("$")+1))
}
// alert(bdcdyhs);
// alert(djIds);
}
});
if(ljzFlag!=null && ljzFlag!="" && ljzFlag=="true"){
$.ajax({
url: bdcdjUrl+'/wfProject/checkLjz?sfyc=1&proid=' + proid + "&dcbIndexs=" + dcbIndexs,
type: 'post',
dataType: 'json',
cache: false,
success: function (data) {
passCheck=checkinfo(data,passCheck);
if(passCheck!=null && passCheck!="" && passCheck=="1"){
if(bdcdyhs!=null && bdcdyhs!=""){
$.ajax({
url: bdcdjUrl+'/wfProject/checkMulBdcXm?proid='+ proid +"&bdcdyhs="+bdcdyhs,
type: 'post',
dataType: 'json',
success: function (data) {
passCheck=checkinfo(data,passCheck);
if(passCheck!=null && passCheck!="" && passCheck=="1") {
// alert("!!!!");
if (zjgcdyFw != null && zjgcdyFw != "" && zjgcdyFw == "2") {
createZjjzwxx(proid,dcbIndexs,djIds,bdcdyhs);
} else {
initProject(proid,dcbIndexs,djIds,bdcdyhs);
}
}
}
});
}
else{
// alert("!!!!");
if (zjgcdyFw != null && zjgcdyFw != "" && zjgcdyFw == "2") {
createZjjzwxx(proid,dcbIndexs,djIds,bdcdyhs);
} else {
initProject(proid,dcbIndexs,djIds,bdcdyhs);
}
}
}
}
});
}
else{
if(bdcdyhs!=null && bdcdyhs!=""){
$.ajax({
url: bdcdjUrl+'/wfProject/checkMulBdcXm?proid='+ proid +"&bdcdyhs="+bdcdyhs,
type: 'post',
dataType: 'json',
success: function (data) {
passCheck=checkinfo(data,passCheck);
if(passCheck!=null && passCheck!="" && passCheck=="1") {
// alert("!!!!");
if (zjgcdyFw != null && zjgcdyFw != "" && zjgcdyFw == "2") {
createZjjzwxx(proid,dcbIndexs,djIds,bdcdyhs);
} else {
initProject(proid,dcbIndexs,djIds,bdcdyhs);
}
}
}
});
}
}
}
else{
alert("请至少选择一条数据!");
return;
}
}
function initProject(proid,dcbIndexs,djIds,bdcdyhs){
$.ajax({
type: 'post',
url: bdcdjUrl+'/wfProject/initVoFromOldData?sfyc=1&bdclx=TDFW&gwc=1&proid='+proid+"&djIds="+djIds+"&bdcdyhs="+bdcdyhs+"&dcbIndexs="+dcbIndexs,
success: function (data) {
if (data == '成功') {
if (zjgcdyFw != null && zjgcdyFw != "" && zjgcdyFw == "1") {
createZjjzwxx(proid,dcbIndexs,djIds,bdcdyhs);
}
refreshPage();
} else {
alert(data);
}
//去掉遮罩
setTimeout($.unblockUI, 10);
},
error: function (_ex) {
//去掉遮罩
alert("error");
setTimeout($.unblockUI, 10);
alert("保存失败!失败原因:" + _ex);
}
});
}
function checkinfo(data,passCheck){
var alertSize = 0;
var confirmSize = 0;
if (data.length > 0) {
$("#csdjAlertInfo,#csdjConfirmInfo").html("");
$.each(data, function (i, item) {
if (item.checkModel == "confirm") {
confirmSize++;
$("#csdjConfirmInfo").append('<div class="alert alert-warning"><span style="cursor:pointer" class="pull-right label label-sm label-primary arrowed-in" data-dismiss="alert" name="hlBtn">忽略</span><span style="cursor:pointer" class="label label-sm label-primary arrowed-right pull-right" onclick="openProjectInfo(\'' + item.info + '\')">查看</span>' + item.checkMsg + '</div>');
} else if (item.checkModel == "alert") {
alertSize++;
$("#csdjAlertInfo").append('<div class="alert alert-danger"><span style="cursor:pointer" class="label label-sm label-primary arrowed arrowed-right pull-right" onclick="openProjectInfo(\'' + item.info + '\')" >查看</span>' + item.checkMsg + '</div>');
}
});
$("#tipPop").show();
$("#modal-backdrop").show();
}
if (alertSize == 0 && confirmSize == 0) {
passCheck="1";
} else if (alertSize == 0 && confirmSize > 0) {
$("span[name='hlBtn']").click(function () {
$(this).parent().remove();
if ($("#csdjConfirmInfo > div").size() == 0) {
passCheck="1";
}
})
}
return passCheck;
}
function openProjectInfo(proid) {
if (proid && proid != undefined) {
$.ajax({
url: bdcdjUrl+"/qllxResource/getViewUrl?proid=" + proid,
type: 'post',
success: function (data) {
if(data&& data != undefined){
openWin(data);
}
},
error: function (data) {
tipInfo("查看失败!");
}
});
}
}
function createZjjzwxx(proid,dcbIndexs,djIds,bdcdyhs){
$.blockUI({message: "请稍等……"});
$.ajax({
type:"post",
url: bdcdjUrl+'/bdcZjjzw/createZjjzwxx?proid='+proid+"&dcbIndexs="+dcbIndexs+"&djIds="+djIds+"&bdcdyhs="+bdcdyhs,
success:function (data) {
alert(data);
//去掉遮罩
setTimeout($.unblockUI, 10);
if (data == '成功') {
refreshPage();
}
},
error:function (XMLHttpRequest, textStatus, errorThrown) {
if(XMLHttpRequest.readyState==4){
setTimeout($.unblockUI, 10);
alert("选择失败!");
}
}
});
}
function refreshPage(){
$.cookie('lpb_cookie', '', { expires: -1 });
mulSelectJson={};
window.opener.refresh();
window.close();
}
function clearLpbCookie(){
// $.cookie('lpb_cookie', null);
$.cookie('lpb_cookie', '', { expires: -1 });
mulSelectJson={};
// $("#ywsjMulXx").html("<span>已选择</span>");
alert("清空成功!");
}
\ No newline at end of file
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
var formName="bdc_cx_zszm_zt";
function zsztCz(cellvalue, options, rowObject) {
return '<div >' +
'<div><a class="detail" href="javascript:detailSjd(\'' + rowObject.PROID + '\')">预览</a></div>' +
'</div>'
}
function detailSjd(proid) {
var url = "${reportUrl!}/ReportServer?reportlet=print%2Fbdc_sjd.cpt&op=write&proid=" + proid;
openWin(url);
}
//jyl 初始化证书证明查询表
function initZszm() {
$.blockUI({message: "正在初始化,请稍等……"});
$.ajax({
url: configUrl+"/zszmZt/initBdcCxZszmZt",
type: 'POST',
dataType: 'json',
success: function (data) {
//去掉遮罩
setTimeout($.unblockUI, 10);
if (isNotBlank(data)) {
if (data.msg == "success") {
alert("初始化成功");
}
}
},
error: function (data) {
//去掉遮罩
setTimeout($.unblockUI, 10);
alert("初始化失败");
}
});
}
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论