bug修改

This commit is contained in:
fl 2024-09-11 09:03:03 +08:00
parent 8a84f9055f
commit c852a6a2f0
6 changed files with 711 additions and 608 deletions

View File

@ -90,7 +90,7 @@
</li>
<li>
<div><img src="../../image/tabIcon6.png" alt=""></div>
<div>考勤台账</div>
<div>考勤台账</div>
</li>
<li>
<div><img src="../../image/tabIcon7.png" alt=""></div>

View File

@ -9,9 +9,12 @@ layui.use(['form','layer','table','laydate'], function () {
//初始化日期选择框
laydate.render({
elem: '#dataTime',
elem: '#makeMonth',
type: 'month',
value: getCurrentMonth() // 初始加载当前月
});
// 触发submit提交 按钮点击或者表单被执行提交时触发
form.on('submit(query)', function (data) {
console.log("搜索")
@ -170,6 +173,7 @@ var col = [
*/
function init(){
var subComId = $(window.parent.document).find("select[id='subComId']").val();
let makeMonth = $('#makeMonth').val();
// 渲染表格
table.render({
elem: '#table',
@ -177,7 +181,8 @@ function init(){
page: true,
where:{
yjId:localStorage.getItem("selectyj"),
subId:localStorage.getItem("selectSubCom")
subId:localStorage.getItem("selectSubCom"),
makeMonth:makeMonth
},
method:'post',
border: true,
@ -272,3 +277,11 @@ function exportData() {
+ "&subId=" + subId
+ "&yjId=" + yjId
}
// 获取当前月份,格式为 YYYY-MM
function getCurrentMonth() {
var currentDate = new Date();
var year = currentDate.getFullYear();
var month = (currentDate.getMonth() + 1).toString().padStart(2, '0'); // 月份补0
return year + '-' + month;
}

View File

@ -1,5 +1,5 @@
//系统请求路径
let PATH_URL="http://127.0.0.1:1917/line"
let PATH_URL="http://127.0.0.1:2024/line"
// let PATH_URL="http://192.168.0.14:2024/line"
let FILE_URL="http://127.0.0.1:1909/file"

View File

@ -172,15 +172,22 @@ function insertSpecial(obj){
$.each(ysUrls,function(index,item){
ysurld=ysurld+item+",";
})
//上传月份总是与日期不对应,从选择的提起获取月份
let makeTime = $("#dataTime").val();
let formatYearMonth = makeTime.substring(0, 7);
$.ajax({
type:"post",
url : PATH_URL + "/makeInfo/insertSpecial",
async:false,
data:{
userId: localStorage.getItem("resultUserId"),proId:localStorage.getItem("resultProId"),makeMonth:localStorage.getItem("resultMakeMonth"),
userId: localStorage.getItem("resultUserId"),
proId:localStorage.getItem("resultProId"),
makeMonth:formatYearMonth,
ysUrl:ysurld,url:urld,
remarks:$("#remark").val(),
makeTime:$("#dataTime").val()
makeTime:makeTime
},
dataType:"json",
success:function(res){

View File

@ -12,6 +12,7 @@ layui.use(['form','layer','table','laydate'], function () {
laydate.render({
elem: '#makeMonth',
type: 'month',
value: getCurrentMonth() // 初始加载当前月
});
// 触发submit提交 按钮点击或者表单被执行提交时触发
form.on('submit(query)', function (data) {
@ -36,7 +37,8 @@ layui.use(['form','layer','table','laydate'], function () {
userName:'',
yjName:'',
proName:'',
makeMonth:'',yjId:yjId
makeMonth:'',
yjId:yjId
}
// 对表格进行重载。id 即 table表格的id
table.reload('table', {
@ -70,11 +72,13 @@ layui.use(['form','layer','table','laydate'], function () {
*/
function init(){
yjId=localStorage.getItem("oneselectyj");
let makeMonth = $('#makeMonth').val();
let obj = {
userName:'',
yjName:'',
proName:'',
makeMonth:'',yjId:yjId
makeMonth:makeMonth,
yjId:yjId
}
// 渲染表格
table.render({
@ -220,3 +224,11 @@ function exportData() {
+ "&makeMonth=" + makeMonth
+ "&yjId=" + yjId
}
// 获取当前月份,格式为 YYYY-MM
function getCurrentMonth() {
var currentDate = new Date();
var year = currentDate.getFullYear();
var month = (currentDate.getMonth() + 1).toString().padStart(2, '0'); // 月份补0
return year + '-' + month;
}

View File

@ -3,9 +3,10 @@ var currentDate = new Date();
var tabList = [];
var month = currentDate.getMonth() + 1; //当前第几月
var year = currentDate.getFullYear();
var resultMonth = localStorage.getItem("resultMakeMonth");
var resultUserId;
var resultProId;
var resultMonth;
layui.use(['form', 'layer', 'table', 'laydate', 'element'], function() {
table = layui.table;
form = layui.form;
@ -25,16 +26,16 @@ layui.use(['form','layer','table','laydate','element'], function () {
value: formatCurrentMonth(), // 如果你想预设当前日期为选中状态
done: function(value, date) { //时间回调
console.log("date:", date);
localStorage.setItem("resultMakeMonth",value);
resultMonth = value;
init(date.year, date.month);
}
});
$("#month").val(localStorage.getItem("resultMakeMonth"));
resultMonth=localStorage.getItem("resultMakeMonth")
$("#month").val(resultMonth);
setData()
init(year,month)
let result = getYearMonth(resultMonth);
init(result.oldYear, result.oldMonth);
});
function firstDayStr() {
var today = new Date();
var thisMonth = today.getMonth(); // 获取当前月份从0开始
@ -50,27 +51,33 @@ function firstDayStr(){
console.log("First day of this month: " + firstDayString);
return firstDayString;
}
function lastDayStr() {
var today = new Date();
var thisMonth = today.getMonth(); // 获取当前月份从0开始
var year = today.getFullYear(); // 获取当前年份
// 当月的第一天
var firstDay = new Date(year, thisMonth, 1);
var firstDayString = firstDay.toISOString().slice(0, 7); // 转换为YYYY-MM-DD格式
// 当月的最后一天
var lastDay = new Date();
var lastDayString = lastDay.toISOString().slice(0, 10); // 转换为YYYY-MM-DD格式
console.log("Last day of this month: " + lastDayString);
return lastDayString;
}
function currMonth() {
var lastDay = new Date();
var lastDayString = lastDay.toISOString().slice(0, 7); // 转换为YYYY-MM-DD格式
console.log("Last day of this month: " + lastDayString);
var lastDayString = lastDay.toISOString().slice(0, 7); // 转换为YYYY-MM格式
return lastDayString;
}
function currUpdateMonth(update) {
var lastDay = new Date();
lastDay.setMonth(lastDay.getMonth() + update);
var lastDayString = lastDay.toISOString().slice(0, 7); // 转换为YYYY-MM格式
return lastDayString;
}
//工程切换
function projectTab(event, proId) {
resultProId = proId;
@ -80,7 +87,9 @@ function projectTab(event,proId){
$("#projects>div").removeClass("projectsStyle");
$(event).addClass("projectsStyle")
getView();
getSpecial(localStorage.getItem("resultMakeMonth").substring(0,4),localStorage.getItem("resultMakeMonth").substring(5,7)<10?localStorage.getItem("resultMakeMonth").substring(5,7).replace("0",""):localStorage.getItem("resultMakeMonth").substring(5,7));
let result = getYearMonth(resultMonth);
// init(result.oldYear,result.oldMonth);
getSpecial(result.oldYear, result.oldMonth);
}
function formatCurrentMonth() {
@ -94,7 +103,7 @@ function formatCurrentMonth() {
function init(chosenYear, chosenMonth) {
layui.use(['table'], function() {
getTab(chosenMonth)
if(localStorage.getItem("resultMakeMonth")!=currMonth()){
if (resultMonth != currMonth() && resultMonth != currUpdateMonth(-1) ) {
$("#normalInspectionUpload").css("display", "none")
getViewc();
} else {
@ -104,6 +113,7 @@ function init(chosenYear,chosenMonth){
getSpecial(chosenYear, chosenMonth)
})
}
function getSpecial(chosenYear, chosenMonth) {
let table = layui.table;
let daysInMonth = new Date(chosenYear, chosenMonth, 0).getDate();
@ -115,7 +125,9 @@ function getSpecial(chosenYear,chosenMonth){
dataType: 'json',
async: false,
data: {
userId: localStorage.getItem("resultUserId"),proId:localStorage.getItem("resultProId"),makeMonth:localStorage.getItem("resultMakeMonth")
userId: localStorage.getItem("resultUserId"),
proId: localStorage.getItem("resultProId"),
makeMonth: resultMonth
},
success: function(data) {
console.log(data, "resultSpecial");
@ -134,14 +146,19 @@ function getSpecial(chosenYear,chosenMonth){
let cols = []
for (let k = 1; k <= daysInMonth; k++) {
let str = chosenMonth + '.' + k;
let obj = {field:'isWork', title: str,align: 'center',width:70,
let obj = {
field: 'isWork',
title: str,
align: 'center',
width: 70,
templet: function(d) {
if (d.isWork.includes(d.LAY_COL.title)) {
return `<i class="layui-icon" style="color: red;">&#xe605;</i> `
} else {
return `<apan></apan>`
}
}}
}
}
cols.push(obj)
}
console.log(tableData, "tableData");
@ -156,7 +173,19 @@ function getSpecial(chosenYear,chosenMonth){
}
function getTab(chosenMonth) {
tabList = [{id:'1',projectName:'xxx工程1'},{id:'2',projectName:'xxx工程2'},{id:'3',projectName:'xxx工程3'},{id:'4',projectName:'xxx工程4'}]
tabList = [{
id: '1',
projectName: 'xxx工程1'
}, {
id: '2',
projectName: 'xxx工程2'
}, {
id: '3',
projectName: 'xxx工程3'
}, {
id: '4',
projectName: 'xxx工程4'
}]
$.ajax({ //id获取详情打开弹窗传值子页面
type: 'post',
url: PATH_URL + "/makeInfo/getProByUser",
@ -200,7 +229,9 @@ function getView(){
dataType: 'json',
async: false,
data: {
userId: localStorage.getItem("resultUserId"),makeMonth:localStorage.getItem("resultMakeMonth"),proId:localStorage.getItem("resultProId")
userId: localStorage.getItem("resultUserId"),
makeMonth: resultMonth,
proId: localStorage.getItem("resultProId")
},
success: function(data) {
console.log(data, "result");
@ -210,7 +241,6 @@ function getView(){
photoList2 = data.vgtListtwo;
viewList3 = data.mgtListspe;
photoList3 = data.mgtListspe;
},
error: function(e) {
@ -222,7 +252,8 @@ function getView(){
// viewList1 = [{id:"1",name:"#1"},{id:"2",name:'#2'},{id:"3",name:'#3'},{id:"4",name:'#4'},{id:"5",name:'#5'},{id:"6",name:'#6'},
// {id:"7",name:'#7'},{id:"8",name:'#8'},{id:"9",name:'#9'}]
// //照片集合
var filePath = 'http://192.168.0.14:1909/file/ynRealName/violationBlack/2024/05/13/c0a62f0b51924a4584ec0c8f011fc2af0074P3wTgy1h3gtizuzvfj30zk0zg7ad.jpg';
var filePath =
'http://192.168.0.14:1909/file/ynRealName/violationBlack/2024/05/13/c0a62f0b51924a4584ec0c8f011fc2af0074P3wTgy1h3gtizuzvfj30zk0zg7ad.jpg';
var sFilePath = '../../../image/viewImg.jpg';
// photoList1 = [{name:'#2', filePath:filePath,sFilePath:sFilePath,makeTime:'2024-08-19'},{name:'#3', filePath:filePath,sFilePath:sFilePath,makeTime:'2024-08-19'},
// {name:'#4', filePath:filePath,sFilePath:sFilePath,makeTime:'2024-08-19'},{name:'#5', filePath:filePath,sFilePath:sFilePath,makeTime:'2024-08-19'},
@ -270,7 +301,8 @@ function getView(){
for (var j = 0; j < photoList1.length; j++) {
if (viewList1[i].gtId == photoList1[j].gtId) {
//照片存在,直接显示
html += `<img src="${IMG_URL+photoList1[j].sfilePath}" alt="" onclick="filePreView('${IMG_URL+photoList1[j].filePath}')">`
html +=
`<img src="${IMG_URL+photoList1[j].sfilePath}" alt="" onclick="filePreView('${IMG_URL+photoList1[j].filePath}')">`
flag = true;
break;
}
@ -279,10 +311,12 @@ function getView(){
if (!flag) {
//照片不存在,显示上传照片按钮
if ("1" == viewList1[i].state) {
html += `<img src="../../../image/add2.png" style="width:150px;height:150px;border: 1px solid #E9E9E9;backgroubd:#F9F9F9;cursor: pointer;margin-top: 10px;" alt="" onclick="uploadPhoto(${viewList1[i].gtId},1,${viewList1[i].makeType})">`
html +=
`<img src="../../../image/add2.png" style="width:150px;height:150px;border: 1px solid #E9E9E9;backgroubd:#F9F9F9;cursor: pointer;margin-top: 10px;" alt="" onclick="uploadPhoto(${viewList1[i].gtId},1,${viewList1[i].makeType})">`
html += `<div style="color:#cccccc">上传图片</div>`
} else {
html += `<img src="../../../image/add2.png" style="width:150px;height:150px;border: 1px solid #E9E9E9;backgroubd:#F9F9F9;cursor: pointer;margin-top: 10px;" alt="" >`
html +=
`<img src="../../../image/add2.png" style="width:150px;height:150px;border: 1px solid #E9E9E9;backgroubd:#F9F9F9;cursor: pointer;margin-top: 10px;" alt="" >`
html += `<div style="color:#cccccc">该杆塔不属于${usernamed}管辖</div>`
}
}
@ -356,7 +390,8 @@ function getView(){
for (var j = 0; j < photoList2.length; j++) {
if (viewList2[i].gtId == photoList2[j].gtId) {
//照片存在,直接显示
html += `<img src="${IMG_URL+photoList2[j].sfilePath}" alt="" onclick="filePreView('${IMG_URL+photoList2[j].filePath}')">`
html +=
`<img src="${IMG_URL+photoList2[j].sfilePath}" alt="" onclick="filePreView('${IMG_URL+photoList2[j].filePath}')">`
flag = true;
break;
}
@ -365,10 +400,12 @@ function getView(){
if (!flag) {
//照片不存在,显示上传照片按钮
if ("1" == viewList2[i].state) {
html += `<img src="../../../image/add2.png" style="width:150px;height:150px;border: 1px solid #E9E9E9;backgroubd:#F9F9F9;cursor: pointer;margin-top: 10px;" alt="" onclick="uploadPhoto(${viewList2[i].gtId},2,${viewList2[i].makeType})">`
html +=
`<img src="../../../image/add2.png" style="width:150px;height:150px;border: 1px solid #E9E9E9;backgroubd:#F9F9F9;cursor: pointer;margin-top: 10px;" alt="" onclick="uploadPhoto(${viewList2[i].gtId},2,${viewList2[i].makeType})">`
html += `<div style="color:#cccccc">上传图片</div>`
} else {
html += `<img src="../../../image/add2.png" style="width:150px;height:150px;border: 1px solid #E9E9E9;backgroubd:#F9F9F9;cursor: pointer;margin-top: 10px;" alt="" >`
html +=
`<img src="../../../image/add2.png" style="width:150px;height:150px;border: 1px solid #E9E9E9;backgroubd:#F9F9F9;cursor: pointer;margin-top: 10px;" alt="" >`
html += `<div style="color:#cccccc">该杆塔不属于${usernamed}管辖</div>`
}
}
@ -410,7 +447,8 @@ function getView(){
</div>
<div id="specialViewBox" style="width: 100%;min-height: 200px;margin-bottom: 20px;display: flex;flex-wrap: wrap;">`
for (let i = 0; i < viewList3.length; i++) {
var gtName = viewList3[i].gtName.length>11?viewList3[i].gtName.substring(0,11) + '...': viewList3[i].gtName;
var gtName = viewList3[i].gtName.length > 11 ? viewList3[i].gtName.substring(0, 11) + '...' : viewList3[i]
.gtName;
html += `<div class="viewBox">
<div style="width: 100%;height:100%">
<div class="viewHeader" style="font-size:12px;background-color: #73A0FA;">
@ -425,7 +463,8 @@ function getView(){
for (var j = 0; j < photoList3.length; j++) {
if (viewList3[i].gtId == photoList3[j].gtId) {
//照片存在,直接显示
html += `<img src="${IMG_URL+photoList3[j].sfilePath}" alt="" onclick="filePreView('${IMG_URL+photoList3[j].filePath}')">`
html +=
`<img src="${IMG_URL+photoList3[j].sfilePath}" alt="" onclick="filePreView('${IMG_URL+photoList3[j].filePath}')">`
flag = true;
break;
}
@ -475,7 +514,9 @@ function getViewc(){
dataType: 'json',
async: false,
data: {
userId: localStorage.getItem("resultUserId"),makeMonth:localStorage.getItem("resultMakeMonth"),proId:localStorage.getItem("resultProId")
userId: localStorage.getItem("resultUserId"),
makeMonth: resultMonth,
proId: localStorage.getItem("resultProId")
},
success: function(data) {
console.log(data, "result");
@ -485,7 +526,6 @@ function getViewc(){
photoList2 = data.vgtListtwo;
viewList3 = data.mgtListspe;
photoList3 = data.mgtListspe;
},
error: function(e) {
@ -497,7 +537,8 @@ function getViewc(){
// viewList1 = [{id:"1",name:"#1"},{id:"2",name:'#2'},{id:"3",name:'#3'},{id:"4",name:'#4'},{id:"5",name:'#5'},{id:"6",name:'#6'},
// {id:"7",name:'#7'},{id:"8",name:'#8'},{id:"9",name:'#9'}]
// //照片集合
var filePath = 'http://192.168.0.14:1909/file/ynRealName/violationBlack/2024/05/13/c0a62f0b51924a4584ec0c8f011fc2af0074P3wTgy1h3gtizuzvfj30zk0zg7ad.jpg';
var filePath =
'http://192.168.0.14:1909/file/ynRealName/violationBlack/2024/05/13/c0a62f0b51924a4584ec0c8f011fc2af0074P3wTgy1h3gtizuzvfj30zk0zg7ad.jpg';
var sFilePath = '../../../image/viewImg.jpg';
// photoList1 = [{name:'#2', filePath:filePath,sFilePath:sFilePath,makeTime:'2024-08-19'},{name:'#3', filePath:filePath,sFilePath:sFilePath,makeTime:'2024-08-19'},
// {name:'#4', filePath:filePath,sFilePath:sFilePath,makeTime:'2024-08-19'},{name:'#5', filePath:filePath,sFilePath:sFilePath,makeTime:'2024-08-19'},
@ -539,7 +580,8 @@ function getViewc(){
for (var j = 0; j < photoList1.length; j++) {
if (viewList1[i].gtId == photoList1[j].gtId) {
//照片存在,直接显示
html += `<img src="${IMG_URL+photoList1[j].sfilePath}" alt="" onclick="filePreView('${IMG_URL+photoList1[j].filePath}')">`
html +=
`<img src="${IMG_URL+photoList1[j].sfilePath}" alt="" onclick="filePreView('${IMG_URL+photoList1[j].filePath}')">`
flag = true;
break;
}
@ -612,7 +654,8 @@ function getViewc(){
for (var j = 0; j < photoList2.length; j++) {
if (viewList2[i].gtId == photoList2[j].gtId) {
//照片存在,直接显示
html += `<img src="${IMG_URL+photoList2[j].sfilePath}" alt="" onclick="filePreView('${IMG_URL+photoList2[j].filePath}')">`
html +=
`<img src="${IMG_URL+photoList2[j].sfilePath}" alt="" onclick="filePreView('${IMG_URL+photoList2[j].filePath}')">`
flag = true;
break;
}
@ -660,7 +703,8 @@ function getViewc(){
</div>
<div id="specialViewBox" style="width: 100%;min-height: 200px;margin-bottom: 20px;display: flex;flex-wrap: wrap;">`
for (let i = 0; i < viewList3.length; i++) {
var gtName = viewList3[i].gtName.length>11?viewList3[i].gtName.substring(0,11) + '...': viewList3[i].gtName;
var gtName = viewList3[i].gtName.length > 11 ? viewList3[i].gtName.substring(0, 11) + '...' : viewList3[i]
.gtName;
html += `<div class="viewBox">
<div style="width: 100%;height:100%">
<div class="viewHeader" style="font-size:12px;background-color: #73A0FA;">
@ -675,7 +719,8 @@ function getViewc(){
for (var j = 0; j < photoList3.length; j++) {
if (viewList3[i].gtId == photoList3[j].gtId) {
//照片存在,直接显示
html += `<img src="${IMG_URL+photoList3[j].sfilePath}" alt="" onclick="filePreView('${IMG_URL+photoList3[j].filePath}')">`
html +=
`<img src="${IMG_URL+photoList3[j].sfilePath}" alt="" onclick="filePreView('${IMG_URL+photoList3[j].filePath}')">`
flag = true;
break;
}
@ -735,6 +780,7 @@ function towerSpeciaEdit(event,id,numTimes){
$(event).parent().next().children("div").css("display", "flex")
}
}
function uploadSpecialPhoto(id) {
let height = '70%';
let width = '60%';
@ -746,7 +792,8 @@ function uploadSpecialPhoto(id){
maxmin: false,
success: function(layero, index) {
var myIframe = parent.window[layero.find('iframe')[0]['name']];
myIframe.setGtId(id,localStorage.getItem("resultMakeMonth"),3,localStorage.getItem("resultUserId"),3,localStorage.getItem("resultProId"));
myIframe.setGtId(id, resultMonth, 3, localStorage.getItem("resultUserId"), 3, localStorage
.getItem("resultProId"));
// var fnc = myIframe.setData(data.data); //aaa()为子页面的方法
},
@ -817,7 +864,10 @@ function towerDel(event,id,numTimes){
dataType: 'json',
async: false,
data: {
gtId:id,makeMonth:localStorage.getItem("resultMakeMonth"),numTimes:numTimes,userId:localStorage.getItem("resultUserId")
gtId: id,
makeMonth: resultMonth,
numTimes: numTimes,
userId: localStorage.getItem("resultUserId")
},
success: function(data) {
console.log(data, "确定删除");
@ -826,7 +876,9 @@ function towerDel(event,id,numTimes){
} else {
setData()
getView()
getSpecial(localStorage.getItem("resultMakeMonth").substring(0,4),localStorage.getItem("resultMakeMonth").substring(5,7)<10?localStorage.getItem("resultMakeMonth").substring(5,7).replace("0",""):localStorage.getItem("resultMakeMonth").substring(5,7));
getSpecial(resultMonth.substring(0, 4), resultMonth.substring(5, 7) < 10 ?
resultMonth.substring(5, 7).replace("0", "") : resultMonth.substring(5,
7));
layer.close(index);
}
},
@ -836,6 +888,7 @@ function towerDel(event,id,numTimes){
})
})
}
function towerSpecialDel(event, id, numTimes) {
layer.confirm("确定删除吗?", function(index) {
$.ajax({ //id获取详情打开弹窗传值子页面
@ -844,7 +897,8 @@ function towerSpecialDel(event,id,numTimes){
dataType: 'json',
async: false,
data: {
id:id,numTimes:numTimes
id: id,
numTimes: numTimes
},
success: function(data) {
console.log(data, "确定删除");
@ -853,7 +907,9 @@ function towerSpecialDel(event,id,numTimes){
} else {
setData()
getView()
getSpecial(localStorage.getItem("resultMakeMonth").substring(0,4),localStorage.getItem("resultMakeMonth").substring(5,7)<10?localStorage.getItem("resultMakeMonth").substring(5,7).replace("0",""):localStorage.getItem("resultMakeMonth").substring(5,7));
getSpecial(resultMonth.substring(0, 4), resultMonth.substring(5, 7) < 10 ?
resultMonth.substring(5, 7).replace("0", "") : resultMonth.substring(5,
7));
layer.close(index);
}
},
@ -863,10 +919,12 @@ function towerSpecialDel(event,id,numTimes){
})
})
}
function reloadData() {
setData();
getView();
getSpecial(localStorage.getItem("resultMakeMonth").substring(0,4),localStorage.getItem("resultMakeMonth").substring(5,7)<10?localStorage.getItem("resultMakeMonth").substring(5,7).replace("0",""):localStorage.getItem("resultMakeMonth").substring(5,7));
getSpecial(resultMonth.substring(0, 4), resultMonth.substring(5, 7) < 10 ? resultMonth.substring(5, 7).replace("0",
"") : resultMonth.substring(5, 7));
}
//正常巡视照片导入
function normalInspectionUpload() {
@ -938,7 +996,8 @@ function uploadPhoto(id,numTimes,makeType){
maxmin: false,
success: function(layero, index) {
var myIframe = parent.window[layero.find('iframe')[0]['name']];
myIframe.setGtId(id,localStorage.getItem("resultMakeMonth"),numTimes,localStorage.getItem("resultUserId"),makeType,localStorage.getItem("resultProId"));
myIframe.setGtId(id, resultMonth, numTimes, localStorage.getItem("resultUserId"), makeType,
localStorage.getItem("resultProId"));
// var fnc = myIframe.setData(data.data); //aaa()为子页面的方法
},
@ -947,14 +1006,15 @@ function uploadPhoto(id,numTimes,makeType){
//页面赋值
function setData() {
var id = localStorage.getItem("resultUserId");
var makeMonth=localStorage.getItem("resultMakeMonth");
var makeMonth = resultMonth;
$.ajax({ //id获取详情打开弹窗传值子页面
type: 'post',
url: PATH_URL + "/makeInfo/getUserDetail",
dataType: 'json',
async: false,
data: {
id: id,makeMonth:makeMonth
id: id,
makeMonth: makeMonth
},
success: function(data) {
$("#username").text(data.data.userName);
@ -969,3 +1029,14 @@ function setData(){
}
})
}
function getYearMonth(yearMonth) {
let date = new Date(yearMonth);
let oldYear = date.getFullYear();
let oldMonth = date.getMonth() + 1;
return {
oldYear,
oldMonth
};
}