巡视计划
This commit is contained in:
parent
5904dd2905
commit
3fac905e2c
|
|
@ -134,7 +134,7 @@
|
|||
注意:生成工资清单后,此月份不可再更新巡视结果
|
||||
</div>
|
||||
<div id="month">
|
||||
<input type="text" class="layui-input" autocomplete="off" id="wagesMonth" name="wagesMonth" placeholder="选择月份" >
|
||||
<input type="text" class="layui-input" autocomplete="off" id="wagesMonth" name="wagesMonth" placeholder="选择月份" readonly >
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 74%;width: 98%;display: flex;flex-direction: column;margin: 0 auto;background-color: #FFFFFF;border-radius: 10px;padding: 10px;overflow: auto;">
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@
|
|||
|
||||
|
||||
<div id="month">
|
||||
<input type="text" class="layui-input" autocomplete="off" id="wagesMonth" name="wagesMonth" placeholder="选择月份" >
|
||||
<input type="text" class="layui-input" autocomplete="off" id="wagesMonth" name="wagesMonth" placeholder="选择月份" readonly >
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 83%;width: 98%;display: flex;flex-direction: column;margin: 0 auto;background-color: #FFFFFF;border-radius: 10px;padding: 10px;overflow: auto;">
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@
|
|||
注意:生成工资清单后,此月份不可再更新巡视结果
|
||||
</div>
|
||||
<div id="month">
|
||||
<input type="text" class="layui-input" autocomplete="off" id="wagesMonth" name="wagesMonth" placeholder="选择月份" >
|
||||
<input type="text" class="layui-input" autocomplete="off" id="wagesMonth" name="wagesMonth" placeholder="选择月份" readonly >
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 74%;width: 98%;display: flex;flex-direction: column;margin: 0 auto;background-color: #FFFFFF;border-radius: 10px;padding: 10px;overflow: auto;">
|
||||
|
|
|
|||
|
|
@ -2,33 +2,7 @@ var yjId = $(window.parent.parent.document).find("input[id='taskSourceId']").att
|
|||
var pers = []
|
||||
var table,form,layer,laydate;
|
||||
var times = getCurrentDateTimeArr();
|
||||
layui.use(['form','layer','table', 'laydate'], function () {
|
||||
table = layui.table;
|
||||
form = layui.form;
|
||||
layer = layui.layer;
|
||||
laydate = layui.laydate;
|
||||
|
||||
// 渲染时间选择器
|
||||
laydate.render({
|
||||
elem: '#wagesMonth',
|
||||
type: 'month',
|
||||
format: 'yyyy-MM',
|
||||
fullPanel: true,
|
||||
value: times[0] + "-" + times[1]
|
||||
});
|
||||
|
||||
//取消按钮点击
|
||||
$("#closeBt").click(() => {
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
parent.layer.close(index); //再执行关闭
|
||||
})
|
||||
//保存按钮点击
|
||||
$("#submitBt").click(() => {
|
||||
save();
|
||||
})
|
||||
|
||||
init();
|
||||
});
|
||||
|
||||
//查询
|
||||
function queryClick(){
|
||||
|
|
@ -58,21 +32,54 @@ function resetClick(){
|
|||
|
||||
//页面赋值
|
||||
function setData(yjId,yjName,gsName){
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: PATH_URL + '/wages/getWagesNum',
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify({"userName": '', "proName": ''}),
|
||||
success: function (data) {
|
||||
if(data.code == '200'){
|
||||
$("#inspectionStation").text(yjName);
|
||||
$("#subComName").text(gsName);
|
||||
$("#proNum").text(data.data.proNum);
|
||||
$("#lineProtector").text(data.data.userNum);
|
||||
localStorage.setItem("sx","")
|
||||
layui.use(['form','layer','table', 'laydate'], function () {
|
||||
table = layui.table;
|
||||
form = layui.form;
|
||||
layer = layui.layer;
|
||||
laydate = layui.laydate;
|
||||
|
||||
// 渲染时间选择器
|
||||
laydate.render({
|
||||
elem: '#wagesMonth',
|
||||
type: 'month',
|
||||
format: 'yyyy-MM',
|
||||
fullPanel: true,
|
||||
value: times[0] + "-" + times[1],
|
||||
done: function (value, date) {//时间回调
|
||||
queryClick()
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
//取消按钮点击
|
||||
$("#closeBt").click(() => {
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
parent.layer.close(index); //再执行关闭
|
||||
})
|
||||
//保存按钮点击
|
||||
$("#submitBt").click(() => {
|
||||
save();
|
||||
})
|
||||
|
||||
init();
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: PATH_URL + '/wages/getWagesNum',
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify({"yjId":yjId,"wagesMonth":$('#wagesMonth').val(),"userName": '', "proName": ''}),
|
||||
success: function (data) {
|
||||
if(data.code == '200'){
|
||||
$("#inspectionStation").text(yjName);
|
||||
$("#subComName").text(gsName);
|
||||
$("#proNum").text(data.data.proNum);
|
||||
$("#lineProtector").text(data.data.userNum);
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -99,7 +106,7 @@ function init(){
|
|||
type: 'numbers'
|
||||
},
|
||||
{field:'userName', title: '姓 名',align: 'center',},
|
||||
{field:'idCard', title: '身份证号',align: 'center',},
|
||||
{field:'idNumber', title: '身份证号',align: 'center',},
|
||||
{field:'proName', title: '管辖线路名称',align: 'center',},
|
||||
{field:'phone', title: '手机号',align: 'center',},
|
||||
{field:'bank', title: '开户行',align: 'center',},
|
||||
|
|
@ -337,6 +344,7 @@ function save(){
|
|||
success: function (data) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
if(data.code == 200){
|
||||
localStorage.setItem("sx","1")
|
||||
parent.layer.msg("添加成功", { icon: 1 });
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
parent.layer.close(index); //再执行关闭
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@ layui.use(['form','layer','table', 'laydate'], function () {
|
|||
layer = layui.layer;
|
||||
laydate = layui.laydate;
|
||||
// 渲染时间选择器
|
||||
laydate.render({
|
||||
elem: '#wagesMonth',
|
||||
type: 'month',
|
||||
format: 'yyyy-MM',
|
||||
fullPanel: true,
|
||||
value: times[0] + "-" + times[1]
|
||||
});
|
||||
// laydate.render({
|
||||
// elem: '#wagesMonth',
|
||||
// type: 'month',
|
||||
// format: 'yyyy-MM',
|
||||
// fullPanel: true,
|
||||
// value: times[0] + "-" + times[1]
|
||||
// });
|
||||
|
||||
//取消按钮点击
|
||||
$("#closeBt").click(() => {
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@ layui.use(['form','layer','table','laydate'], function () {
|
|||
laydate = layui.laydate;
|
||||
|
||||
// 渲染时间选择器
|
||||
laydate.render({
|
||||
elem: '#wagesMonth',
|
||||
type: 'month',
|
||||
format: 'yyyy-MM',
|
||||
fullPanel: true,
|
||||
value: times[0] + "-" + times[1]
|
||||
});
|
||||
// laydate.render({
|
||||
// elem: '#wagesMonth',
|
||||
// type: 'month',
|
||||
// format: 'yyyy-MM',
|
||||
// fullPanel: true,
|
||||
// value: times[0] + "-" + times[1]
|
||||
// });
|
||||
|
||||
//取消按钮点击
|
||||
$("#closeBt").click(() => {
|
||||
|
|
@ -58,12 +58,13 @@ function resetClick(){
|
|||
|
||||
//页面赋值
|
||||
function setData(yjId,yjName,gsName,wagesMonth){
|
||||
localStorage.setItem("sx","")
|
||||
$("#wagesMonth").val(wagesMonth);
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: PATH_URL + '/wages/getWagesNum',
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify({"userName": '', "proName": ''}),
|
||||
data: JSON.stringify({"yjId":yjId,"wagesMonth":wagesMonth,"userName": '', "proName": ''}),
|
||||
success: function (data) {
|
||||
if(data.code == '200'){
|
||||
$("#inspectionStation").text(yjName);
|
||||
|
|
@ -275,6 +276,9 @@ function updateWages(){
|
|||
let loadingMsg = layer.msg('数据上传中,请稍候...', {icon: 16, scrollbar: false, time: 0, shade: [0.8, '#393D49']});
|
||||
// form请求地址
|
||||
let formUrl = PATH_URL + "/wages/updateWages";
|
||||
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
contentType: "application/json; charset=utf-8",
|
||||
|
|
@ -283,6 +287,7 @@ function updateWages(){
|
|||
success: function (data) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
if(data.code == 200){
|
||||
localStorage.setItem("sx","1")
|
||||
parent.layer.msg("修改成功", { icon: 1 });
|
||||
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
|
||||
parent.layer.close(index); //再执行关闭
|
||||
|
|
|
|||
|
|
@ -1,51 +1,53 @@
|
|||
var yjId = $(window.parent.document).find("input[id='taskSourceId']").attr("stationId");
|
||||
var yjId = $(window.parent.document).find("input[id='taskSourceId']").attr("stationId");
|
||||
var pers = []
|
||||
var table,form,laydate
|
||||
var table, form, laydate
|
||||
var times = getCurrentDateTimeArr();
|
||||
layui.use(['form','layer','table', 'laydate'], function () {
|
||||
table = layui.table;
|
||||
form = layui.form;
|
||||
layui.use(['form', 'layer', 'table', 'laydate'], function() {
|
||||
table = layui.table;
|
||||
form = layui.form;
|
||||
laydate = layui.laydate;
|
||||
// 渲染时间选择器
|
||||
laydate.render({
|
||||
elem: '#wagesMonth',
|
||||
type: 'month',
|
||||
format: 'yyyy-MM',
|
||||
fullPanel: true,
|
||||
elem: '#wagesMonth',
|
||||
type: 'month',
|
||||
format: 'yyyy-MM',
|
||||
fullPanel: true,
|
||||
value: times[0] + "-" + times[1]
|
||||
});
|
||||
|
||||
|
||||
table.on('tool(layui_table)', function (obj) {
|
||||
switch (obj.event) {
|
||||
case 'details':
|
||||
console.log('详情',obj)
|
||||
detailsView()
|
||||
break;
|
||||
|
||||
table.on('tool(layui_table)', function(obj) {
|
||||
switch (obj.event) {
|
||||
case 'details':
|
||||
console.log('详情', obj)
|
||||
detailsView()
|
||||
break;
|
||||
case 'edit':
|
||||
console.log('修改',obj)
|
||||
console.log('修改', obj)
|
||||
updateView()
|
||||
break;
|
||||
case 'del':
|
||||
console.log('删除',obj)
|
||||
delView(yjId, obj.data.wagesMonth)
|
||||
break;
|
||||
}
|
||||
});
|
||||
init();
|
||||
case 'del':
|
||||
console.log('删除', obj)
|
||||
delView(yjId, obj.data.wagesMonth)
|
||||
break;
|
||||
}
|
||||
});
|
||||
init();
|
||||
});
|
||||
|
||||
|
||||
function queryClick(){
|
||||
var yjId = $(window.parent.document).find("input[id='taskSourceId']").attr("stationId");
|
||||
|
||||
function queryClick() {
|
||||
var yjId = $(window.parent.document).find("input[id='taskSourceId']").attr("stationId");
|
||||
var yjName = $("#yjName").val();
|
||||
var startWagesMonth = $("#wagesMonth").val().split('~')[0];
|
||||
var endWagesMonth = $("#wagesMonth").val().split('~')[1];
|
||||
|
||||
|
||||
table.reload('layui_table', {
|
||||
// //设定异步数据接口的额外参数
|
||||
page:{curr : 1}
|
||||
,where:{
|
||||
// //设定异步数据接口的额外参数
|
||||
page: {
|
||||
curr: 1
|
||||
},
|
||||
where: {
|
||||
yjName: yjName,
|
||||
startWagesMonth: startWagesMonth,
|
||||
endWagesMonth: endWagesMonth,
|
||||
|
|
@ -53,16 +55,19 @@ function queryClick(){
|
|||
}
|
||||
})
|
||||
}
|
||||
function resetClick(){
|
||||
var yjId = $(window.parent.document).find("input[id='taskSourceId']").attr("stationId");
|
||||
|
||||
function resetClick() {
|
||||
var yjId = $(window.parent.document).find("input[id='taskSourceId']").attr("stationId");
|
||||
$("#yjName").val('');
|
||||
$("#wagesMonth").val(times[0] + "-" + times[1]);
|
||||
|
||||
// 对表格进行重载。id 即 table表格的id
|
||||
|
||||
// 对表格进行重载。id 即 table表格的id
|
||||
table.reload('layui_table', {
|
||||
// //设定异步数据接口的额外参数
|
||||
page:{curr : 1}
|
||||
,where: {
|
||||
// //设定异步数据接口的额外参数
|
||||
page: {
|
||||
curr: 1
|
||||
},
|
||||
where: {
|
||||
yjName: '',
|
||||
startWagesMonth: '',
|
||||
endWagesMonth: '',
|
||||
|
|
@ -70,225 +75,283 @@ function resetClick(){
|
|||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 初始化数据
|
||||
*/
|
||||
function init(){
|
||||
var yjId = $(window.parent.document).find("input[id='taskSourceId']").attr("stationId");
|
||||
// 渲染表格
|
||||
table.render({
|
||||
id: 'layui_table',
|
||||
elem: '#table',
|
||||
url: PATH_URL + '/wages/getWagesEscalationList',
|
||||
where: {
|
||||
yjId: yjId
|
||||
},
|
||||
page: true, //开启分页
|
||||
method:'post',
|
||||
skin: 'line', // 表格样式
|
||||
cols: [[
|
||||
{
|
||||
title: '序号',
|
||||
field: 'zizeng',
|
||||
align: 'center',
|
||||
type: 'numbers'
|
||||
},
|
||||
{field:'fgsName', title: '分公司',align: 'center',},
|
||||
{field:'yjName', title: '运检站',align: 'center',},
|
||||
{field:'wagesMonth', title: '月份',align: 'center',},
|
||||
{field:'peopleNum', title: '人数',align: 'center',},
|
||||
{field:'xsNum', title: '巡视运检站(基*次)',align: 'center',},
|
||||
{field:'txNum', title: '特巡天数(人*天)',align: 'center',width:170},
|
||||
{field:'phonePrice', title: '通讯费',align: 'center',width:170},
|
||||
{field:'reward', title: '奖惩',align: 'center', },
|
||||
{field:'wages', title: '实发金额',align: 'center', },
|
||||
{
|
||||
title: '操作',
|
||||
toolbar: '#opeator-bar',
|
||||
align: 'center',
|
||||
width: 200
|
||||
}
|
||||
]],
|
||||
done: function(res,curr,count){
|
||||
//checkPermission();
|
||||
}
|
||||
});
|
||||
|
||||
function init() {
|
||||
var yjId = $(window.parent.document).find("input[id='taskSourceId']").attr("stationId");
|
||||
// 渲染表格
|
||||
table.render({
|
||||
id: 'layui_table',
|
||||
elem: '#table',
|
||||
url: PATH_URL + '/wages/getWagesEscalationList',
|
||||
where: {
|
||||
yjId: yjId
|
||||
},
|
||||
page: true, //开启分页
|
||||
method: 'post',
|
||||
skin: 'line', // 表格样式
|
||||
cols: [
|
||||
[{
|
||||
title: '序号',
|
||||
field: 'zizeng',
|
||||
align: 'center',
|
||||
type: 'numbers'
|
||||
},
|
||||
{
|
||||
field: 'fgsName',
|
||||
title: '分公司',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
field: 'yjName',
|
||||
title: '运检站',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
field: 'wagesMonth',
|
||||
title: '月份',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
field: 'peopleNum',
|
||||
title: '人数',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
field: 'xsNum',
|
||||
title: '巡视运检站(基*次)',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
field: 'txNum',
|
||||
title: '特巡天数(人*天)',
|
||||
align: 'center',
|
||||
width: 170
|
||||
},
|
||||
{
|
||||
field: 'phonePrice',
|
||||
title: '通讯费',
|
||||
align: 'center',
|
||||
width: 170
|
||||
},
|
||||
{
|
||||
field: 'reward',
|
||||
title: '奖惩',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
field: 'wages',
|
||||
title: '实发金额',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
toolbar: '#opeator-bar',
|
||||
align: 'center',
|
||||
width: 200
|
||||
}
|
||||
]
|
||||
],
|
||||
done: function(res, curr, count) {
|
||||
//checkPermission();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成工资单页面
|
||||
* */
|
||||
function add() {
|
||||
var height = '98%';
|
||||
var width = '99%';
|
||||
var index = layer.open({
|
||||
title: ['生成工资单页面', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
type: 2,
|
||||
content: './producePayroll.html',
|
||||
area: [width, height],
|
||||
maxmin: false,
|
||||
success: function (layero, index) {
|
||||
var yjId = $(window.parent.document).find("input[id='taskSourceId']").attr("stationId");
|
||||
var yjName = $(window.parent.document).find("input[id='taskSourceId']").attr("stationName");
|
||||
var gsName = $(window.parent.document).find("input[id='taskSourceId']").attr("gsName");
|
||||
// //打开页面成功时执行
|
||||
var myIframe = window[layero.find('iframe')[0]['name']];
|
||||
//getTaskSource()为子页面的方法
|
||||
myIframe.setData(yjId,yjName,gsName);
|
||||
var height = '98%';
|
||||
var width = '99%';
|
||||
var index = layer.open({
|
||||
title: ['生成工资单页面', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
type: 2,
|
||||
content: './producePayroll.html',
|
||||
area: [width, height],
|
||||
maxmin: false,
|
||||
success: function(layero, index) {
|
||||
var yjId = $(window.parent.document).find("input[id='taskSourceId']").attr("stationId");
|
||||
var yjName = $(window.parent.document).find("input[id='taskSourceId']").attr("stationName");
|
||||
var gsName = $(window.parent.document).find("input[id='taskSourceId']").attr("gsName");
|
||||
// //打开页面成功时执行
|
||||
var myIframe = window[layero.find('iframe')[0]['name']];
|
||||
//getTaskSource()为子页面的方法
|
||||
myIframe.setData(yjId, yjName, gsName);
|
||||
|
||||
},
|
||||
end: function(){
|
||||
queryClick();
|
||||
},
|
||||
end: function() {
|
||||
var sx = localStorage.getItem("sx")
|
||||
if (sx == "1") {
|
||||
queryClick();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查看
|
||||
* */
|
||||
function detailsView() {
|
||||
let height = '98%';
|
||||
let width = '99%';
|
||||
let height = '98%';
|
||||
let width = '99%';
|
||||
//测试
|
||||
var index = layer.open({
|
||||
title: ['详情', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
type: 2,
|
||||
content: './producePayrollDetails.html',
|
||||
area: [width, height],
|
||||
maxmin: false,
|
||||
success: function (layero, index) {
|
||||
var yjId = $(window.parent.document).find("input[id='taskSourceId']").attr("stationId");
|
||||
var yjName = $(window.parent.document).find("input[id='taskSourceId']").attr("stationName");
|
||||
var gsName = $(window.parent.document).find("input[id='taskSourceId']").attr("gsName");
|
||||
|
||||
title: ['详情', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
type: 2,
|
||||
content: './producePayrollDetails.html',
|
||||
area: [width, height],
|
||||
maxmin: false,
|
||||
success: function(layero, index) {
|
||||
var yjId = $(window.parent.document).find("input[id='taskSourceId']").attr("stationId");
|
||||
var yjName = $(window.parent.document).find("input[id='taskSourceId']").attr("stationName");
|
||||
var gsName = $(window.parent.document).find("input[id='taskSourceId']").attr("gsName");
|
||||
|
||||
var wagesMonth = $("#wagesMonth").val();
|
||||
// //打开页面成功时执行
|
||||
var myIframe = window[layero.find('iframe')[0]['name']];
|
||||
//getTaskSource()为子页面的方法
|
||||
myIframe.setData(yjId,yjName,gsName,wagesMonth);
|
||||
|
||||
},
|
||||
// //打开页面成功时执行
|
||||
var myIframe = window[layero.find('iframe')[0]['name']];
|
||||
//getTaskSource()为子页面的方法
|
||||
myIframe.setData(yjId, yjName, gsName, wagesMonth);
|
||||
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* */
|
||||
function updateView(id) {
|
||||
let height = '98%';
|
||||
let width = '99%';
|
||||
|
||||
var index = layer.open({
|
||||
title: ['修改', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
type: 2,
|
||||
content: './producePayrollUpdate.html',
|
||||
area: [width, height],
|
||||
maxmin: false,
|
||||
success: function (layero, index) {
|
||||
var yjId = $(window.parent.document).find("input[id='taskSourceId']").attr("stationId");
|
||||
var yjName = $(window.parent.document).find("input[id='taskSourceId']").attr("stationName");
|
||||
var gsName = $(window.parent.document).find("input[id='taskSourceId']").attr("gsName");
|
||||
|
||||
var wagesMonth = $("#wagesMonth").val();
|
||||
// //打开页面成功时执行
|
||||
var myIframe = window[layero.find('iframe')[0]['name']];
|
||||
//getTaskSource()为子页面的方法
|
||||
myIframe.setData(yjId,yjName,gsName,wagesMonth);
|
||||
},
|
||||
});
|
||||
function updateView(id) {
|
||||
let height = '98%';
|
||||
let width = '99%';
|
||||
|
||||
var index = layer.open({
|
||||
title: ['修改', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
type: 2,
|
||||
content: './producePayrollUpdate.html',
|
||||
area: [width, height],
|
||||
maxmin: false,
|
||||
success: function(layero, index) {
|
||||
var yjId = $(window.parent.document).find("input[id='taskSourceId']").attr("stationId");
|
||||
var yjName = $(window.parent.document).find("input[id='taskSourceId']").attr("stationName");
|
||||
var gsName = $(window.parent.document).find("input[id='taskSourceId']").attr("gsName");
|
||||
|
||||
var wagesMonth = $("#wagesMonth").val();
|
||||
// //打开页面成功时执行
|
||||
var myIframe = window[layero.find('iframe')[0]['name']];
|
||||
//getTaskSource()为子页面的方法
|
||||
myIframe.setData(yjId, yjName, gsName, wagesMonth);
|
||||
},
|
||||
end: function() {
|
||||
var sx = localStorage.getItem("sx")
|
||||
if (sx == "1") {
|
||||
queryClick();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* */
|
||||
function delView(yjId, wagesMonth) {
|
||||
let index = layer.confirm("是否确定删除数据?", function () {
|
||||
let index = layer.confirm("是否确定删除数据?", function() {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: PATH_URL + '/wages/delWagesId',
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify({'yjId': yjId, 'wagesMonth': wagesMonth}),
|
||||
success: function (data) {
|
||||
data: JSON.stringify({
|
||||
'yjId': yjId,
|
||||
'wagesMonth': wagesMonth
|
||||
}),
|
||||
success: function(data) {
|
||||
layer.close(index);
|
||||
if (data.code == 200) {
|
||||
parent.layer.msg('删除成功', {icon: 1});
|
||||
parent.layer.msg('删除成功', {
|
||||
icon: 1
|
||||
});
|
||||
queryClick();
|
||||
} else {
|
||||
layer.msg("删除失败", {icon: 2}, function () {
|
||||
layer.msg("删除失败", {
|
||||
icon: 2
|
||||
}, function() {
|
||||
// example.ajax.reload(); // 刷新页面
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
function importData(){
|
||||
var height = '80%';
|
||||
var width = '50%';
|
||||
var index = layer.open({
|
||||
title: [`导入`, 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
type: 2,
|
||||
// content: 'child/orgInformation.html',
|
||||
content: 'staffImport.html',
|
||||
area: [width, height],
|
||||
maxmin: false,
|
||||
success: function (layero, index) {
|
||||
/*var myIframe = parent.window[layero.find('iframe')[0]['name']];
|
||||
var json = {'proIds': proId}
|
||||
myIframe.setParams(json)*/
|
||||
},
|
||||
yes: function (index, layero) {
|
||||
},
|
||||
end: function () {
|
||||
}
|
||||
});
|
||||
|
||||
function importData() {
|
||||
var height = '80%';
|
||||
var width = '50%';
|
||||
var index = layer.open({
|
||||
title: [`导入`, 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
type: 2,
|
||||
// content: 'child/orgInformation.html',
|
||||
content: 'staffImport.html',
|
||||
area: [width, height],
|
||||
maxmin: false,
|
||||
success: function(layero, index) {
|
||||
/*var myIframe = parent.window[layero.find('iframe')[0]['name']];
|
||||
var json = {'proIds': proId}
|
||||
myIframe.setParams(json)*/
|
||||
},
|
||||
yes: function(index, layero) {},
|
||||
end: function() {}
|
||||
});
|
||||
}
|
||||
|
||||
function importDataThread(formData, idx) {
|
||||
$.ajax({
|
||||
url: oiPlanUrl + "/basePerson/importData",
|
||||
type: 'POST',
|
||||
async: false,
|
||||
data: formData,
|
||||
timeout: 20000,
|
||||
// 告诉jQuery不要去处理发送的数据
|
||||
processData: false,
|
||||
// 告诉jQuery不要去设置Content-Type请求头
|
||||
contentType: false,
|
||||
success: function (data) {
|
||||
layer.close(idx);
|
||||
if (data.code == 200) {
|
||||
layer.alert(data.data, {icon: 1});
|
||||
// example.ajax.reload(); // 刷新页面
|
||||
} else{
|
||||
layer.alert(data.msg, {icon: 2});
|
||||
}
|
||||
$.ajax({
|
||||
url: oiPlanUrl + "/basePerson/importData",
|
||||
type: 'POST',
|
||||
async: false,
|
||||
data: formData,
|
||||
timeout: 20000,
|
||||
// 告诉jQuery不要去处理发送的数据
|
||||
processData: false,
|
||||
// 告诉jQuery不要去设置Content-Type请求头
|
||||
contentType: false,
|
||||
success: function(data) {
|
||||
layer.close(idx);
|
||||
if (data.code == 200) {
|
||||
layer.alert(data.data, {
|
||||
icon: 1
|
||||
});
|
||||
// example.ajax.reload(); // 刷新页面
|
||||
} else {
|
||||
layer.alert(data.msg, {
|
||||
icon: 2
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
||||
console.log(JSON.stringify(errorThrown));
|
||||
layer.close(idx);
|
||||
}
|
||||
});
|
||||
$("#basePersonFile").val("");
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
console.log(JSON.stringify(errorThrown));
|
||||
layer.close(idx);
|
||||
}
|
||||
});
|
||||
$("#basePersonFile").val("");
|
||||
}
|
||||
|
||||
//导出
|
||||
function exportData() {
|
||||
var yjName = $("#yjName").val();
|
||||
var yjName = $("#yjName").val();
|
||||
var wagesMonth = $("#wagesMonth").val();
|
||||
|
||||
window.location.href = PATH_URL + `/wages/exportWagesEscalationData?token=` + token
|
||||
+ "&yjName=" + yjName
|
||||
+ "&wagesMonth=" + wagesMonth
|
||||
|
||||
window.location.href = PATH_URL + `/wages/exportWagesEscalationData?token=` + token +
|
||||
"&yjName=" + yjName +
|
||||
"&wagesMonth=" + wagesMonth
|
||||
}
|
||||
Loading…
Reference in New Issue