2025-11-27 16:55:35 +08:00
|
|
|
|
var example = null;
|
|
|
|
|
|
var pers = null;
|
|
|
|
|
|
var layer,form;
|
|
|
|
|
|
$(function () {
|
|
|
|
|
|
initTrees();
|
|
|
|
|
|
layui.use(['layer','form'], function () {
|
|
|
|
|
|
layer = layui.layer;
|
|
|
|
|
|
form = layui.form;
|
|
|
|
|
|
getAffiliatedUnit(form);
|
|
|
|
|
|
getOWNryxz();
|
|
|
|
|
|
});
|
|
|
|
|
|
pers = checkPermission();
|
|
|
|
|
|
init();
|
|
|
|
|
|
$("#searchBt").click(function () {
|
|
|
|
|
|
example.ajax.reload();
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
//自有人员-员工性质字典下拉
|
|
|
|
|
|
function getOWNryxz() {
|
|
|
|
|
|
$("#ryxz").empty();
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
|
type: 'POST',
|
2025-12-09 18:44:29 +08:00
|
|
|
|
url: smz_ht_url + '/users/getOWNType',
|
2025-11-27 16:55:35 +08:00
|
|
|
|
data: {
|
|
|
|
|
|
type:"ryxz"
|
|
|
|
|
|
},
|
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
var str = '<option value="">--请选择员工性质--</option>';
|
|
|
|
|
|
if (data.length > 0) {
|
|
|
|
|
|
for (var i = 0; i < data.length; i++) {
|
|
|
|
|
|
str += '<option value=\'' + data[i].userId + '\'>' + data[i].userName + '</option>';
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
$("#ryxz").append(str);
|
|
|
|
|
|
form.render(); //这里就是我们要渲染的地方了
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function initTrees() {
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
|
type: 'POST',
|
|
|
|
|
|
headers : {
|
|
|
|
|
|
"token" : token
|
|
|
|
|
|
},
|
2025-12-09 18:44:29 +08:00
|
|
|
|
url: smz_ht_url + '/org/getCompanyTreeListOWN',
|
2025-11-27 16:55:35 +08:00
|
|
|
|
data: {},
|
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
$.fn.zTree.init($("#orgTree"),{
|
|
|
|
|
|
view:{
|
|
|
|
|
|
dblClickExpand:false,
|
|
|
|
|
|
selectedMulti:false,
|
|
|
|
|
|
nameIsHTML:true
|
|
|
|
|
|
},
|
|
|
|
|
|
data:{
|
|
|
|
|
|
simpleData:{
|
|
|
|
|
|
enable: true
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
callback:{
|
|
|
|
|
|
onClick:clickRoles
|
|
|
|
|
|
}
|
|
|
|
|
|
}, data.obj);
|
|
|
|
|
|
},
|
|
|
|
|
|
error: function (e) {
|
|
|
|
|
|
console.log(e.resMsg);
|
|
|
|
|
|
},
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function clickRoles(e, treeId, treeNode) {
|
|
|
|
|
|
//设置父节点不能被选择
|
|
|
|
|
|
if(treeNode.id =="x"){
|
|
|
|
|
|
var check = (treeNode);
|
|
|
|
|
|
if(check){
|
|
|
|
|
|
var zTree = $.fn.zTree.getZTreeObj("orgTree"),
|
|
|
|
|
|
nodes = zTree.getSelectedNodes(),v ="",n ="",o="",p="",c="";
|
|
|
|
|
|
for (var i=0, l=nodes.length; i<l; i++) {
|
|
|
|
|
|
v += nodes[i].name + ",";//获取name值
|
|
|
|
|
|
n += nodes[i].id + ",";//获取id值
|
|
|
|
|
|
o += nodes[i].other + ",";//获取自定义值
|
|
|
|
|
|
c += nodes[i].companyId + ",";
|
|
|
|
|
|
var pathNodes=nodes[i].getPath();
|
|
|
|
|
|
for(var y=0;y<pathNodes.length;y++){
|
|
|
|
|
|
p+=pathNodes[y].name+"/";//获取path/name值
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if (v.length > 0 ) v = v.substring(0, v.length-1);
|
|
|
|
|
|
if (n.length > 0 ) n = n.substring(0, n.length-1);
|
|
|
|
|
|
if (o.length > 0 ) o = o.substring(0, o.length-1);
|
|
|
|
|
|
if (p.length > 0 ) p = p.substring(0, p.length-1);
|
|
|
|
|
|
if (c.length > 0 ) c = c.substring(0, c.length-1);
|
|
|
|
|
|
|
|
|
|
|
|
$("#orgName").val(p);
|
|
|
|
|
|
$("#companyId").val(c);
|
|
|
|
|
|
$("#auForm input[name$='orgId']").prop("value",n);
|
|
|
|
|
|
hideRole(n,c);
|
|
|
|
|
|
}
|
|
|
|
|
|
}else{
|
|
|
|
|
|
if (treeNode.level !="1") {
|
|
|
|
|
|
layer.msg('请选择组织管理中的最后一级');
|
|
|
|
|
|
}else{
|
|
|
|
|
|
var check = (treeNode);
|
|
|
|
|
|
if(check){
|
|
|
|
|
|
var zTree = $.fn.zTree.getZTreeObj("orgTree"),
|
|
|
|
|
|
nodes = zTree.getSelectedNodes(),v ="",n ="",o="",p="",c="";
|
|
|
|
|
|
for (var i=0, l=nodes.length; i<l; i++) {
|
|
|
|
|
|
v += nodes[i].name + ",";//获取name值
|
|
|
|
|
|
n += nodes[i].id + ",";//获取id值
|
|
|
|
|
|
o += nodes[i].other + ",";//获取自定义值
|
|
|
|
|
|
c += nodes[i].companyId + ",";
|
|
|
|
|
|
var pathNodes=nodes[i].getPath();
|
|
|
|
|
|
for(var y=0;y<pathNodes.length;y++){
|
|
|
|
|
|
p+=pathNodes[y].name+"/";//获取path/name值
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if (v.length > 0 ) v = v.substring(0, v.length-1);
|
|
|
|
|
|
if (n.length > 0 ) n = n.substring(0, n.length-1);
|
|
|
|
|
|
if (o.length > 0 ) o = o.substring(0, o.length-1);
|
|
|
|
|
|
if (p.length > 0 ) p = p.substring(0, p.length-1);
|
|
|
|
|
|
if (c.length > 0 ) c = c.substring(0, c.length-1);
|
|
|
|
|
|
|
|
|
|
|
|
$("#orgName").val(p);
|
|
|
|
|
|
$("#companyId").val(c);
|
|
|
|
|
|
$("#auForm input[name$='orgId']").prop("value",n);
|
|
|
|
|
|
hideRole(n,c);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function loadCompanyInfo(n, c) { //分公司工程联动
|
|
|
|
|
|
var orgId = n;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function init() {
|
|
|
|
|
|
example =
|
|
|
|
|
|
$('#dt-table').DataTable({
|
|
|
|
|
|
"searching": false,
|
|
|
|
|
|
"processing": true, //加载数据时显示进度状态
|
|
|
|
|
|
"serverSide": true,
|
|
|
|
|
|
"pagingType": "full_numbers", //首页|尾页
|
|
|
|
|
|
"language": {
|
2025-12-09 18:44:29 +08:00
|
|
|
|
"url": "../../../js/plugin/datatables/Chinese.lang"
|
2025-11-27 16:55:35 +08:00
|
|
|
|
},
|
|
|
|
|
|
"ajax": {
|
2025-12-09 18:44:29 +08:00
|
|
|
|
"url": smz_ht_url + "/OwnCertificate",
|
2025-11-27 16:55:35 +08:00
|
|
|
|
"type": "get",
|
|
|
|
|
|
"data": function (d) {
|
|
|
|
|
|
d.ssdw = $("#ssdw").val();
|
|
|
|
|
|
d.ygdw = $("#orgId").val();
|
|
|
|
|
|
d.ryxz = $("#ryxz").val();
|
|
|
|
|
|
d.name = $("#name").val();
|
|
|
|
|
|
d.idNumber = $("#idNumber").val();
|
|
|
|
|
|
d.state = $("#state").val();
|
|
|
|
|
|
},
|
|
|
|
|
|
"error": function (xhr, textStatus, errorThrown) {
|
|
|
|
|
|
var msg = xhr.responseText;
|
|
|
|
|
|
console.log(msg);
|
|
|
|
|
|
var response = JSON.parse(msg);
|
|
|
|
|
|
var code = response.code;
|
|
|
|
|
|
var message = response.message;
|
|
|
|
|
|
if (code == 400) {
|
|
|
|
|
|
layer.msg(message);
|
|
|
|
|
|
} else if (code == 401) {
|
|
|
|
|
|
localStorage.removeItem("token");
|
|
|
|
|
|
layer.msg("token过期,请先登录", {shift: -1, time: 1000}, function () {
|
2025-12-09 18:44:29 +08:00
|
|
|
|
location.href = smz_ht_url + '/login.html';
|
2025-11-27 16:55:35 +08:00
|
|
|
|
});
|
|
|
|
|
|
} else if (code == 403) {
|
|
|
|
|
|
console.log("未授权:" + message);
|
|
|
|
|
|
layer.msg('未授权');
|
|
|
|
|
|
} else if (code == 500) {
|
|
|
|
|
|
console.log('系统错误:' + message);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"lengthMenu": [ [10, 20, 50], [10, 20, 50] ], // 设置每页显示数据量选项
|
|
|
|
|
|
"drawCallback": function() {
|
|
|
|
|
|
// alert( '表格重绘了' );
|
|
|
|
|
|
var thisDataTable = $('#dt-table').DataTable();
|
|
|
|
|
|
$(".pagination").append("<li>" +
|
|
|
|
|
|
"<a class='paginate_button' style='padding:4px;' href='#' tabindex='0'>到 <input style='margin:0px;width:40px;' id='changePage'> 页</a>" +
|
|
|
|
|
|
"<a class='paginate_button' style='margin-bottom:1px' href='#' tabindex='0' id='dataTable-btn'>确认</a></li>");
|
|
|
|
|
|
//点击按钮跳转指定页数
|
|
|
|
|
|
$('#dataTable-btn').click(function (e) {
|
|
|
|
|
|
if ($("#changePage").val() && $("#changePage").val() > 0) {
|
|
|
|
|
|
var redirectpage = $("#changePage").val() - 1;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
var redirectpage = 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
thisDataTable.page(redirectpage).draw( 'page' );
|
|
|
|
|
|
});
|
|
|
|
|
|
//敲击回车键跳转指定页数
|
|
|
|
|
|
$("#changePage").keypress(function (e) {
|
|
|
|
|
|
if(event.keyCode==13){
|
|
|
|
|
|
if ($("#changePage").val() && $("#changePage").val() > 0) {
|
|
|
|
|
|
var redirectpage = $("#changePage").val() - 1;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
var redirectpage = 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
thisDataTable.page(redirectpage).draw( 'page' );
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
"dom": "<'dt-toolbar'r>t<'dt-toolbar-footer'<'col-sm-4 col-xs-4 hidden-xs'i><'col-xs-8 col-sm-8' p v>><'dt-table-length'l>",
|
|
|
|
|
|
"columns": [
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
width: '40px',
|
|
|
|
|
|
"orderable": false,
|
|
|
|
|
|
data: function (row, type, set, meta) {
|
|
|
|
|
|
var c = meta.settings._iDisplayStart + meta.row + 1;
|
|
|
|
|
|
return c;
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
{"data": "ssdw","defaultContent": ""},
|
|
|
|
|
|
{"data": "ygdw","defaultContent": ""},
|
|
|
|
|
|
{"data": "name","defaultContent": ""},
|
|
|
|
|
|
{"data": "idNumber","defaultContent": ""},
|
|
|
|
|
|
{"data": "ryxz","defaultContent": ""},
|
|
|
|
|
|
{"data": "state", "defaultContent": ""},
|
|
|
|
|
|
{
|
|
|
|
|
|
"data": "",
|
|
|
|
|
|
"render": function (data, type, row) {
|
|
|
|
|
|
var id = row['id'];
|
|
|
|
|
|
var idCardNum = row['idCardNum'];
|
|
|
|
|
|
if(idCardNum>0){
|
2025-12-13 17:44:14 +08:00
|
|
|
|
var html = '<button class="layui-btn layui-btn-xs" title="查看" onclick="idCardView(\''+id +'\')" style="background-color: transparent;color: #009688;" >'+"查看"+'</button>';
|
2025-11-27 16:55:35 +08:00
|
|
|
|
}else{
|
|
|
|
|
|
var html = '<span>未上传身份证</span>';
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return html;
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"data": "otherDocuments",
|
|
|
|
|
|
"render": function (data, type, row) {
|
|
|
|
|
|
var id = row['id'];
|
|
|
|
|
|
var photoNum = row['otherDocuments'];
|
2025-12-13 17:44:14 +08:00
|
|
|
|
var html = '<button class="layui-btn layui-btn-xs" title="照片查看" onclick="photoView(\''+id +'\')" style="background-color: transparent;color: #009688;">'+photoNum+'</button>';
|
2025-11-27 16:55:35 +08:00
|
|
|
|
return html;
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"data": "",
|
|
|
|
|
|
"width": "10%",
|
|
|
|
|
|
"defaultContent": "",
|
|
|
|
|
|
"orderable": false,
|
|
|
|
|
|
"render": function (data, type, row) {
|
|
|
|
|
|
var id = row['id'];
|
|
|
|
|
|
var html = '';
|
|
|
|
|
|
html+= buttonAdd(id, "", pers);
|
|
|
|
|
|
html+= buttonEdits(id, "", pers);
|
|
|
|
|
|
var idCardNum = row['idCardNum'];
|
|
|
|
|
|
if(idCardNum>0){
|
|
|
|
|
|
html+= buttonCard(id, "", pers);
|
|
|
|
|
|
}
|
|
|
|
|
|
return html;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"order": [[1, "desc"], [2, "desc"],[3, "desc"],[4, "desc"],[5, "desc"],[6, "desc"]] //在栏目列上显示排序功能
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 编辑按钮
|
|
|
|
|
|
function buttonEdits(id, permission, pers) {
|
|
|
|
|
|
if (permission != "") {
|
|
|
|
|
|
if ($.inArray(permission, pers) < 0) {
|
|
|
|
|
|
return "";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-12-13 17:44:14 +08:00
|
|
|
|
var btn = $("<button class='layui-btn layui-btn-xs' title='照片查看' onclick='edit(\"" + id + "\")' style='background-color: transparent;color: #009688;'>照片查看</button>");
|
2025-11-27 16:55:35 +08:00
|
|
|
|
return btn.prop("outerHTML");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 编辑页面
|
|
|
|
|
|
*/
|
|
|
|
|
|
function edit(id) {
|
|
|
|
|
|
localStorage.setItem("id",id);
|
2025-12-13 17:44:14 +08:00
|
|
|
|
var height = '75%';
|
|
|
|
|
|
var width = '75%';
|
2025-11-27 16:55:35 +08:00
|
|
|
|
layer.open({
|
|
|
|
|
|
title: ['查看', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
|
|
|
|
|
type: 2,
|
|
|
|
|
|
content: 'own-certificate-list.html',
|
|
|
|
|
|
area: [width, height],
|
|
|
|
|
|
maxmin: false,
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 身份证按钮
|
|
|
|
|
|
function buttonCard(id, permission, pers) {
|
|
|
|
|
|
if (permission != "") {
|
|
|
|
|
|
if ($.inArray(permission, pers) < 0) {
|
|
|
|
|
|
return "";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-12-13 17:44:14 +08:00
|
|
|
|
var btn = $("<button class='layui-btn layui-btn-xs' title='身份证修改' onclick='card(\"" + id + "\")' style='background-color: transparent;color: #009688;'>身份证修改</button>");
|
2025-11-27 16:55:35 +08:00
|
|
|
|
return btn.prop("outerHTML");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 修改身份证页面
|
|
|
|
|
|
*/
|
|
|
|
|
|
function card(id) {
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
|
type: 'POST',
|
|
|
|
|
|
contentType: "application/x-www-form-urlencoded",
|
2025-12-09 18:44:29 +08:00
|
|
|
|
url: smz_ht_url + '/OwnCertificate/getIdCard',
|
2025-11-27 16:55:35 +08:00
|
|
|
|
data: {"id": id},
|
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
|
success: function (data) {
|
2025-12-13 17:44:14 +08:00
|
|
|
|
var height = '75%';
|
|
|
|
|
|
var width = '75%';
|
2025-11-27 16:55:35 +08:00
|
|
|
|
var index = layer.open({
|
|
|
|
|
|
title: ['修改', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
|
|
|
|
|
type: 2,
|
|
|
|
|
|
content: 'own-certificate-card-form.html',
|
|
|
|
|
|
area: [width, height],
|
|
|
|
|
|
maxmin: false,
|
|
|
|
|
|
btn: ['确定', '关闭'],
|
|
|
|
|
|
success: function (layero, index) {
|
|
|
|
|
|
var myIframe = window[layero.find('iframe')[0]['name']];
|
|
|
|
|
|
var fnc = myIframe.setDatas(data); //aaa()为子页面的方法
|
|
|
|
|
|
},
|
|
|
|
|
|
yes: function (index, layero) {
|
|
|
|
|
|
// 获取弹出层中的form表单元素
|
|
|
|
|
|
var formSubmit = layer.getChildFrame('form', index);
|
|
|
|
|
|
var submited = formSubmit.find('button')[4];
|
|
|
|
|
|
// 触发点击事件,会对表单进行验证,验证成功则提交表单,失败则返回错误信息
|
|
|
|
|
|
submited.click();
|
|
|
|
|
|
// example.ajax.reload(); // 刷新页面
|
|
|
|
|
|
},
|
|
|
|
|
|
btn2: function (index, layero) {
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 添加按钮
|
|
|
|
|
|
function buttonAdd(id, permission, pers) {
|
|
|
|
|
|
if (permission != "") {
|
|
|
|
|
|
if ($.inArray(permission, pers) < 0) {
|
|
|
|
|
|
return "";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-12-13 17:44:14 +08:00
|
|
|
|
var btn = $("<button class='layui-btn layui-btn-xs' title='添加' onclick='add(\"" + id + "\")' style='background-color: transparent;color: #009688;'>添加</button>");
|
2025-11-27 16:55:35 +08:00
|
|
|
|
return btn.prop("outerHTML");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 添加页面
|
|
|
|
|
|
*/
|
|
|
|
|
|
function add(id) {
|
2025-12-13 17:44:14 +08:00
|
|
|
|
var height = '75%';
|
|
|
|
|
|
var width = '75%';
|
2025-11-27 16:55:35 +08:00
|
|
|
|
var index = layer.open({
|
|
|
|
|
|
title: ['添加', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
|
|
|
|
|
type: 2,
|
|
|
|
|
|
content: 'own-certificate-form.html',
|
|
|
|
|
|
area: [width, height],
|
|
|
|
|
|
maxmin: false,
|
|
|
|
|
|
btn: ['确定', '关闭'],
|
|
|
|
|
|
success: function (layero, index) {
|
|
|
|
|
|
var myIframe = window[layero.find('iframe')[0]['name']];
|
|
|
|
|
|
myIframe.setData(id); //aaa()为子页面的方法
|
|
|
|
|
|
},
|
|
|
|
|
|
yes: function (index, layero) {
|
|
|
|
|
|
var formSubmit = layer.getChildFrame('form', index);
|
|
|
|
|
|
var submited = formSubmit.find('button')[2];
|
|
|
|
|
|
// 触发点击事件,会对表单进行验证,验证成功则提交表单,失败则返回错误信息
|
|
|
|
|
|
submited.click();
|
|
|
|
|
|
// example.ajax.reload(); // 刷新页面
|
|
|
|
|
|
},
|
|
|
|
|
|
btn2: function (index, layero) {
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//身份证照片查看
|
|
|
|
|
|
function idCardView(id) {
|
|
|
|
|
|
localStorage.setItem("id",id);
|
2025-12-13 17:44:14 +08:00
|
|
|
|
var height = '75%';
|
|
|
|
|
|
var width = '75%';
|
2025-11-27 16:55:35 +08:00
|
|
|
|
var index = layer.open({
|
|
|
|
|
|
title: ["查看", 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
|
|
|
|
|
type: 2,
|
|
|
|
|
|
content: 'own-certificate-idcard.html',
|
|
|
|
|
|
area: [width, height],
|
|
|
|
|
|
maxmin: false,
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//照片查看
|
|
|
|
|
|
function photoView(id) {
|
|
|
|
|
|
localStorage.setItem("id",id);
|
2025-12-13 17:44:14 +08:00
|
|
|
|
var height = '75%';
|
|
|
|
|
|
var width = '75%';
|
2025-11-27 16:55:35 +08:00
|
|
|
|
var index = layer.open({
|
|
|
|
|
|
title: ["查看", 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
|
|
|
|
|
type: 2,
|
|
|
|
|
|
content: 'own-certificate-photo.html',
|
|
|
|
|
|
area: [width, height],
|
|
|
|
|
|
maxmin: false,
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*function view(idNumber,bankCard,bankName,rollBankName,uploadTime,uploadName,witnessPath,proId) {
|
|
|
|
|
|
localStorage.setItem("idNumber", idNumber);
|
|
|
|
|
|
localStorage.setItem("bankCard", bankCard);
|
|
|
|
|
|
localStorage.setItem("bankName", bankName);
|
|
|
|
|
|
localStorage.setItem("rollBankName", rollBankName);
|
|
|
|
|
|
localStorage.setItem("uploadTime", uploadTime);
|
|
|
|
|
|
localStorage.setItem("uploadName", uploadName);
|
|
|
|
|
|
localStorage.setItem("witnessPath",witnessPath);
|
|
|
|
|
|
localStorage.setItem("proId",proId);
|
|
|
|
|
|
var height = '85%';
|
|
|
|
|
|
var width = '45%';
|
|
|
|
|
|
var index = layer.open({
|
|
|
|
|
|
title: ['见证照片','color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
|
|
|
|
|
type: 2,
|
|
|
|
|
|
content: 'wagesPhotoView.html',
|
|
|
|
|
|
area: [width, height],
|
|
|
|
|
|
maxmin: false,
|
|
|
|
|
|
success:function(layero,index){
|
|
|
|
|
|
var myIframe = window[layero.find('iframe')[0]['name']];
|
|
|
|
|
|
},
|
|
|
|
|
|
yes: function (index, layero) {
|
|
|
|
|
|
// 获取弹出层中的form表单元素
|
|
|
|
|
|
// var formSubmit = layer.getChildFrame('form', index);
|
|
|
|
|
|
// var submited = formSubmit.find('button')[0];
|
|
|
|
|
|
// 触发点击事件,会对表单进行验证,验证成功则提交表单,失败则返回错误信息
|
|
|
|
|
|
submited.click();
|
|
|
|
|
|
example.ajax.reload(); // 刷新页面
|
|
|
|
|
|
},
|
|
|
|
|
|
btn2: function (index, layero) {
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 工资卡见证
|
|
|
|
|
|
function wageCardWitnes(id, permission, pers) {
|
|
|
|
|
|
if (permission != "") {
|
|
|
|
|
|
if ($.inArray(permission, pers) < 0) {
|
|
|
|
|
|
return "";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
var btn = $("<button class='layui-btn layui-btn-xs' title='工资卡见证' onclick='wageCard(\""+id+"\")'><i class='layui-icon'></i></button>");
|
|
|
|
|
|
return btn.prop("outerHTML");
|
|
|
|
|
|
}
|
|
|
|
|
|
function wageCard(idNumber) {
|
|
|
|
|
|
var witnessType="3";
|
|
|
|
|
|
// var facePhoto = $('#facePhoto option:selected').val();
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
|
type: 'POST',
|
|
|
|
|
|
contentType: "application/x-www-form-urlencoded",
|
2025-12-09 18:44:29 +08:00
|
|
|
|
url: smz_ht_url + '/wagesInfo/getWageAndWageCard',
|
2025-11-27 16:55:35 +08:00
|
|
|
|
data:{"idNumber":idNumber,"witnessType":witnessType},
|
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
localStorage.setItem("witnessPath", data.witnessPath);
|
|
|
|
|
|
localStorage.setItem("uploadName", data.uploadName);
|
|
|
|
|
|
localStorage.setItem("uploadTime", data.uploadTime);
|
|
|
|
|
|
var height = '585px';
|
|
|
|
|
|
var width = '675px';
|
|
|
|
|
|
var index = layer.open({
|
|
|
|
|
|
title: ['查看图片','color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
|
|
|
|
|
type: 2,
|
|
|
|
|
|
content: 'wagesCardForm.html',
|
|
|
|
|
|
area: [width, height],
|
|
|
|
|
|
maxmin: false,
|
|
|
|
|
|
btn: ['确定', '关闭'],
|
|
|
|
|
|
success:function(layero,index){
|
|
|
|
|
|
var myIframe = window[layero.find('iframe')[0]['name']];
|
|
|
|
|
|
var fnc = myIframe.setData(data); //aaa()为子页面的方法*!
|
|
|
|
|
|
},
|
|
|
|
|
|
yes: function (index, layero) {
|
|
|
|
|
|
// 获取弹出层中的form表单元素
|
|
|
|
|
|
// var formSubmit = layer.getChildFrame('form', index);
|
|
|
|
|
|
// var submited = formSubmit.find('button')[0];
|
|
|
|
|
|
// 触发点击事件,会对表单进行验证,验证成功则提交表单,失败则返回错误信息
|
|
|
|
|
|
submited.click();
|
|
|
|
|
|
example.ajax.reload(); // 刷新页面
|
|
|
|
|
|
},
|
|
|
|
|
|
btn2: function (index, layero) {
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
error:function () {
|
|
|
|
|
|
layer.msg('暂无银行卡', {icon: 2});
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|