|
|
@ -30,17 +30,17 @@ |
|
|
<div class="layuimini-container"> |
|
|
<div class="layuimini-container"> |
|
|
<div class="layuimini-main"> |
|
|
<div class="layuimini-main"> |
|
|
|
|
|
|
|
|
<div class="layui-tab"> |
|
|
<div class="layui-tab" lay-filter="firstTab"> |
|
|
<ul class="layui-tab-title"> |
|
|
<ul class="layui-tab-title"> |
|
|
<li class="layui-this">未完成任务</li> |
|
|
<li class="layui-this" lay-id="incomplete">未完成任务</li> |
|
|
<li >已完成任务</li> |
|
|
<li lay-id="complete">已完成任务</li> |
|
|
</ul> |
|
|
</ul> |
|
|
<div class="layui-tab-content"> |
|
|
<div class="layui-tab-content"> |
|
|
<div class="layui-tab-item layui-show"> |
|
|
<div class="layui-tab-item layui-show"> |
|
|
<div class="layui-tab layui-tab-card"> |
|
|
<div class="layui-tab layui-tab-card" lay-filter="incompleteTab"> |
|
|
<ul class="layui-tab-title"> |
|
|
<ul class="layui-tab-title" > |
|
|
<li class="layui-this">审核任务</li> |
|
|
<li class="layui-this" lay-id="incompleteApproval">审核任务</li> |
|
|
<li>出库任务</li> |
|
|
<li lay-id="incompleteOut">出库任务</li> |
|
|
</ul> |
|
|
</ul> |
|
|
<div class="layui-tab-content"> |
|
|
<div class="layui-tab-content"> |
|
|
<div class="layui-tab-item layui-show"> |
|
|
<div class="layui-tab-item layui-show"> |
|
|
@ -53,9 +53,9 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="layui-tab-item"> |
|
|
<div class="layui-tab-item"> |
|
|
<div class="layui-tab layui-tab-card"> |
|
|
<div class="layui-tab layui-tab-card" lay-filter="completeTab"> |
|
|
<ul class="layui-tab-title"> |
|
|
<ul class="layui-tab-title"> |
|
|
<li class="layui-this">审核任务</li> |
|
|
<li lay-id="completeApproval" class="layui-this">审核任务</li> |
|
|
</ul> |
|
|
</ul> |
|
|
<div class="layui-tab-content"> |
|
|
<div class="layui-tab-content"> |
|
|
<div class="layui-tab-item layui-show"> |
|
|
<div class="layui-tab-item layui-show"> |
|
|
@ -115,226 +115,289 @@ |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
layui.use(['flow', 'layer', 'table', 'util'], function () { |
|
|
// 初始化未完成的审核任务 |
|
|
|
|
|
function initIncompleteReview(){ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
// 初始化已完成的审核任务 |
|
|
|
|
|
function initCompleteReview() { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 初始化未完成的出库任务 |
|
|
|
|
|
function initIncompleteOutTask() { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
layui.use(['flow', 'layer', 'table', 'util', 'element'], function () { |
|
|
var $ = layui.jquery, |
|
|
var $ = layui.jquery, |
|
|
layer = layui.layer, |
|
|
layer = layui.layer, |
|
|
flow = layui.flow, |
|
|
flow = layui.flow, |
|
|
table = layui.table, |
|
|
table = layui.table, |
|
|
|
|
|
element = layui.element, |
|
|
util = layui.util; |
|
|
util = layui.util; |
|
|
//每页的数量 |
|
|
//每页的数量 |
|
|
var size = 8; |
|
|
var size = 8; |
|
|
let pre1 = 0, pre2 = 0, pre3 = 0, pre4 = 0, pre5 = 0, pre6 = 0; |
|
|
let pre1 = 0, pre2 = 0, pre3 = 0, pre4 = 0, pre5 = 0, pre6 = 0; |
|
|
// 未完成任务-审核任务 |
|
|
|
|
|
flow.load({ |
|
|
|
|
|
elem: '#LAY_floor1' //流加载容器 |
|
|
|
|
|
, scrollElem: '#LAY_floor1' //滚动条所在元素,一般不用填,此处只是演示需要。 |
|
|
|
|
|
, isAuto: false |
|
|
|
|
|
, done: function (page, next) { //执行下一页的回调 |
|
|
|
|
|
let lis = []; |
|
|
|
|
|
let lis1 = []; |
|
|
|
|
|
let lis2 = []; |
|
|
|
|
|
let result; |
|
|
|
|
|
$.get('/depositoryRecord/myTaskOut?page=' + page + '&size=' + size + '&isDone=0', function (res) { |
|
|
|
|
|
var Width = "25%"; |
|
|
|
|
|
result = res.data; |
|
|
|
|
|
lis.push("<div class='clearfix'>"); |
|
|
|
|
|
if (isMobile()) { |
|
|
|
|
|
Width = "50%"; |
|
|
|
|
|
} |
|
|
|
|
|
for (let i = 0; i < result.length; i++) { |
|
|
|
|
|
lis.push('<li style="width:' + Width + ';float:left;"><div class="layui-card my-shadow my-card flow1" onclick="openDetailForOut(' |
|
|
|
|
|
+ result[i].id + ')"><div class="layui-card-header"><h2>' |
|
|
|
|
|
+ result[i].applicantName + '的'); |
|
|
|
|
|
lis.push('出库请求</h2></div>'); |
|
|
|
|
|
lis.push('<div class="layui-col-md4 my-time" style="margin-left: 15px; color: #999;font-size: 12px;">' |
|
|
|
|
|
+ result[i].applicantTime + '</div></div></li>'); |
|
|
|
|
|
} |
|
|
|
|
|
lis.push('</div>'); |
|
|
|
|
|
pre1 += result.length; |
|
|
|
|
|
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|
|
|
|
|
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|
|
|
|
|
next(lis.join(''), pre1 < res.count); |
|
|
|
|
|
}); |
|
|
|
|
|
$.get('/depositoryRecord/myTaskIn?page=' + page + '&size=' + size + '&isDone=0', function (res) { |
|
|
|
|
|
var Width = "25%"; |
|
|
|
|
|
result = res.data; |
|
|
|
|
|
lis2.push("<div class='clearfix'>"); |
|
|
|
|
|
if (isMobile()) { |
|
|
|
|
|
Width = "50%"; |
|
|
|
|
|
} |
|
|
|
|
|
for (let i = 0; i < result.length; i++) { |
|
|
|
|
|
lis2.push('<li style="width:' + Width + ';float:left;"><div class="layui-card my-shadow my-card flow1" onclick="openDetailForIn(' |
|
|
|
|
|
+ result[i].id + ')"><div class="layui-card-header"><h2>' |
|
|
|
|
|
+ result[i].applicantName + '的'); |
|
|
|
|
|
lis2.push('入库请求</h2></div>'); |
|
|
|
|
|
lis2.push('<div class="layui-col-md4 my-time" style="margin-left: 15px; color: #999;font-size: 12px;">' |
|
|
|
|
|
+ result[i].applicantTime + '</div></div></li>'); |
|
|
|
|
|
} |
|
|
|
|
|
lis2.push('</div>'); |
|
|
|
|
|
pre5 += result.length; |
|
|
|
|
|
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|
|
|
|
|
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|
|
|
|
|
next(lis2.join(''), pre5 < res.count); |
|
|
|
|
|
}); |
|
|
|
|
|
$.get('/stockTaking/myTask?page=' + page + '&size=' + size + '&isDone=0', function (res) { |
|
|
|
|
|
var Width = "25%"; |
|
|
|
|
|
result = res.data; |
|
|
|
|
|
lis1.push("<div class='clearfix'>"); |
|
|
|
|
|
if (isMobile()) { |
|
|
|
|
|
Width = "50%"; |
|
|
|
|
|
} |
|
|
|
|
|
for (let i = 0; i < result.length; i++) { |
|
|
|
|
|
lis1.push('<li style="width:' + Width + ';float:left;"><div class="layui-card my-shadow my-card flow1" onclick="openDetailForTaking(' |
|
|
|
|
|
+ result[i].id + ')"><div class="layui-card-header"><h2>' |
|
|
|
|
|
+ result[i].originatorName + '的'); |
|
|
|
|
|
lis1.push('盘点记录</h2></div>'); |
|
|
|
|
|
lis1.push('<div class="layui-col-md4 my-time" style="margin-left: 15px; color: #999;font-size: 12px;">' |
|
|
|
|
|
+ result[i].createTime + '</div></div></li>'); |
|
|
|
|
|
} |
|
|
|
|
|
lis1.push('</div>'); |
|
|
|
|
|
pre3 += result.length; |
|
|
|
|
|
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|
|
|
|
|
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|
|
|
|
|
next(lis1.join(''), pre3 < res.count); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(function() { |
|
|
|
|
|
initIncompleteReview(); |
|
|
|
|
|
}); |
|
|
|
|
|
// 切换事件(绑定未完成任务的选项卡) |
|
|
|
|
|
element.on('tab(incompleteTab)', function(obj){ |
|
|
|
|
|
let layId = $(obj.elem.context).attr("lay-id"); |
|
|
|
|
|
if(layId.includes("Approval")){ |
|
|
|
|
|
initIncompleteReview(); |
|
|
|
|
|
}else if (layId.includes("Out")){ |
|
|
|
|
|
initIncompleteOutTask(); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// 切换事件(绑定已完成任务的选项卡) |
|
|
|
|
|
element.on('tab(firstTab)', function(obj){ |
|
|
|
|
|
let layId = $(obj.elem.context).attr("lay-id"); |
|
|
|
|
|
if(layId.includes("incomplete")){ |
|
|
|
|
|
initIncompleteReview(); |
|
|
|
|
|
}else{ |
|
|
|
|
|
initCompleteReview(); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
// 已完成任务-审核任务 |
|
|
|
|
|
flow.load({ |
|
|
|
|
|
elem: '#LAY_floor2' //流加载容器 |
|
|
// 未完成任务-审核任务 |
|
|
, scrollElem: '#LAY_floor2' //滚动条所在元素,一般不用填,此处只是演示需要。 |
|
|
initIncompleteReview = function(){ |
|
|
, isAuto: false |
|
|
flow.load({ |
|
|
, done: function (page, next) { //执行下一页的回调 |
|
|
elem: '#LAY_floor1' //流加载容器 |
|
|
let lis = []; |
|
|
, scrollElem: '#LAY_floor1' //滚动条所在元素,一般不用填,此处只是演示需要。 |
|
|
let lis1 = []; |
|
|
, isAuto: false |
|
|
let lis2 = []; |
|
|
, done: function (page, next) { //执行下一页的回调 |
|
|
let result; |
|
|
let lis = []; |
|
|
$.get('/depositoryRecord/myTaskOut?page=' + page + '&size=' + size + '&isDone=1', function (res) { |
|
|
let lis1 = []; |
|
|
var Width = "25%"; |
|
|
let lis2 = []; |
|
|
result = res.data; |
|
|
let result; |
|
|
lis.push("<div class='clearfix'>"); |
|
|
$.get('/depositoryRecord/myTaskOut?page=' + page + '&size=' + size + '&isDone=0', function (res) { |
|
|
for (let i = 0; i < result.length; i++) { |
|
|
var Width = "25%"; |
|
|
|
|
|
result = res.data; |
|
|
|
|
|
lis.push("<div class='clearfix'>"); |
|
|
if (isMobile()) { |
|
|
if (isMobile()) { |
|
|
Width = "50%"; |
|
|
Width = "50%"; |
|
|
} |
|
|
} |
|
|
lis.push('<li style="width:' + Width + ';float:left;"><div class="layui-card my-shadow my-card flow1" onclick="openDetailForOutView(' |
|
|
for (let i = 0; i < result.length; i++) { |
|
|
+ result[i].id + ')" ><div class="layui-card-header"><h2>' |
|
|
lis.push('<li style="width:' + Width + ';float:left;"><div class="layui-card my-shadow my-card flow1" onclick="openDetailForOut(' |
|
|
+ result[i].applicantName + '的'); |
|
|
+ result[i].id + ')"><div class="layui-card-header"><h2>' |
|
|
lis.push('出库请求</h2></div>'); |
|
|
+ result[i].applicantName + '的'); |
|
|
lis.push('<div class="layui-col-md4 my-time" style="margin-left: 15px; color: #999;font-size: 12px;">' |
|
|
lis.push('出库请求</h2></div>'); |
|
|
+ result[i].applicantTime + '</div></div></li>'); |
|
|
lis.push('<div class="layui-col-md4 my-time" style="margin-left: 15px; color: #999;font-size: 12px;">' |
|
|
} |
|
|
+ result[i].applicantTime + '</div></div></li>'); |
|
|
lis.push("</div>"); |
|
|
} |
|
|
pre2 += result.length; |
|
|
lis.push('</div>'); |
|
|
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|
|
pre1 += result.length; |
|
|
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|
|
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|
|
next(lis.join(''), pre2 < res.count); |
|
|
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|
|
}); |
|
|
next(lis.join(''), pre1 < res.count); |
|
|
$.get('/depositoryRecord/myTaskIn?page=' + page + '&size=' + size + '&isDone=1', function (res) { |
|
|
}); |
|
|
var Width = "25%"; |
|
|
$.get('/depositoryRecord/myTaskIn?page=' + page + '&size=' + size + '&isDone=0', function (res) { |
|
|
result = res.data; |
|
|
var Width = "25%"; |
|
|
lis2.push("<div class='clearfix'>"); |
|
|
result = res.data; |
|
|
for (let i = 0; i < result.length; i++) { |
|
|
lis2.push("<div class='clearfix'>"); |
|
|
if (isMobile()) { |
|
|
if (isMobile()) { |
|
|
Width = "50%"; |
|
|
Width = "50%"; |
|
|
} |
|
|
} |
|
|
lis2.push('<li style="width:' + Width + ';float:left;"><div class="layui-card my-shadow my-card flow1" onclick="openDetailForInView(' |
|
|
for (let i = 0; i < result.length; i++) { |
|
|
+ result[i].id + ')" ><div class="layui-card-header"><h2>' |
|
|
lis2.push('<li style="width:' + Width + ';float:left;"><div class="layui-card my-shadow my-card flow1" onclick="openDetailForIn(' |
|
|
+ result[i].applicantName + '的'); |
|
|
+ result[i].id + ')"><div class="layui-card-header"><h2>' |
|
|
lis2.push('入库请求</h2></div>'); |
|
|
+ result[i].applicantName + '的'); |
|
|
lis2.push('<div class="layui-col-md4 my-time" style="margin-left: 15px; color: #999;font-size: 12px;">' |
|
|
lis2.push('入库请求</h2></div>'); |
|
|
+ result[i].applicantTime + '</div></div></li>'); |
|
|
lis2.push('<div class="layui-col-md4 my-time" style="margin-left: 15px; color: #999;font-size: 12px;">' |
|
|
} |
|
|
+ result[i].applicantTime + '</div></div></li>'); |
|
|
lis2.push("</div>"); |
|
|
} |
|
|
pre6 += result.length; |
|
|
lis2.push('</div>'); |
|
|
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|
|
pre5 += result.length; |
|
|
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|
|
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|
|
next(lis2.join(''), pre6 < res.count); |
|
|
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|
|
}); |
|
|
next(lis2.join(''), pre5 < res.count); |
|
|
$.get('/stockTaking/myTask?page=' + page + '&size=' + size + '&isDone=1', function (res) { |
|
|
}); |
|
|
var Width = "25%"; |
|
|
$.get('/stockTaking/myTask?page=' + page + '&size=' + size + '&isDone=0', function (res) { |
|
|
result = res.data; |
|
|
var Width = "25%"; |
|
|
lis1.push("<div class='clearfix'>"); |
|
|
result = res.data; |
|
|
if (isMobile()) { |
|
|
lis1.push("<div class='clearfix'>"); |
|
|
Width = "50%"; |
|
|
if (isMobile()) { |
|
|
} |
|
|
Width = "50%"; |
|
|
for (let i = 0; i < result.length; i++) { |
|
|
} |
|
|
lis1.push('<li style="width:' + Width + ';float:left;"><div class="layui-card my-shadow my-card flow1" onclick="openDetailTaking(' |
|
|
for (let i = 0; i < result.length; i++) { |
|
|
+ result[i].id + ')"><div class="layui-card-header"><h2>' |
|
|
lis1.push('<li style="width:' + Width + ';float:left;"><div class="layui-card my-shadow my-card flow1" onclick="openDetailForTaking(' |
|
|
+ result[i].originatorName + '的'); |
|
|
+ result[i].id + ')"><div class="layui-card-header"><h2>' |
|
|
lis1.push('盘点记录</h2></div>'); |
|
|
+ result[i].originatorName + '的'); |
|
|
lis1.push('<div class="layui-col-md4 my-time" style="margin-left: 15px; color: #999;font-size: 12px;">' |
|
|
lis1.push('盘点记录</h2></div>'); |
|
|
+ result[i].createTime + '</div></div></li>'); |
|
|
lis1.push('<div class="layui-col-md4 my-time" style="margin-left: 15px; color: #999;font-size: 12px;">' |
|
|
} |
|
|
+ result[i].createTime + '</div></div></li>'); |
|
|
lis1.push('</div>'); |
|
|
} |
|
|
pre4 += result.length; |
|
|
lis1.push('</div>'); |
|
|
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|
|
pre3 += result.length; |
|
|
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|
|
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|
|
next(lis1.join(''), pre4 < res.count); |
|
|
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|
|
}); |
|
|
next(lis1.join(''), pre3 < res.count); |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
// 未完成任务-出库任务 |
|
|
|
|
|
flow.load({ |
|
|
|
|
|
elem: '#LAY_floor3' //流加载容器 |
|
|
|
|
|
, scrollElem: '#LAY_floor3' //滚动条所在元素,一般不用填,此处只是演示需要。 |
|
|
|
|
|
, isAuto: false |
|
|
|
|
|
, done: function (page, next) { //执行下一页的回调 |
|
|
|
|
|
let lis = []; |
|
|
|
|
|
let result; |
|
|
|
|
|
$.get('/depositoryRecord/myTashForScanQrCode?page=' + page + '&size=' + size + '&isDone=0', function (res) { |
|
|
|
|
|
var Width = "25%"; |
|
|
|
|
|
result = res.data; |
|
|
|
|
|
const keys = Object.keys(result); // 获取map中所有的键 |
|
|
|
|
|
let redirectByIsMobile = ""; |
|
|
|
|
|
lis.push("<div class='clearfix'>"); |
|
|
|
|
|
if (isMobile()) { |
|
|
|
|
|
// 如果是移动端 |
|
|
|
|
|
Width = "50%"; |
|
|
|
|
|
redirectByIsMobile = "openDetail3_mobile("; |
|
|
|
|
|
} else { |
|
|
|
|
|
redirectByIsMobile = "openDetail3("; |
|
|
|
|
|
} |
|
|
|
|
|
for (let i = 0; i < keys.length; i++) { |
|
|
|
|
|
|
|
|
|
|
|
lis.push('<li style="width:' + Width + ';float:left;">' + |
|
|
|
|
|
'<div class="layui-card my-shadow my-card flow1"' + "onclick=" + redirectByIsMobile + result[keys[i]][0].depositoryId + ")" + '>' + |
|
|
|
|
|
'<div class="layui-card-header"><h2>' |
|
|
|
|
|
+ result[keys[i]][0].depositoryName + '</h2></div>') |
|
|
|
|
|
lis.push('<div class="layui-col-md4 my-time" style="margin-left: 15px; color: #999;font-size: 12px;">' |
|
|
|
|
|
+ result[keys[i]][0].applicantTime + '</div></div></li>'); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
lis.push("</div>"); |
|
|
|
|
|
pre2 += result.length; |
|
|
|
|
|
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|
|
|
|
|
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|
|
|
|
|
next(lis.join(''), pre2 < res.count); |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
// 用于跳转到出库审核页面 |
|
|
// 已完成任务-审核任务 |
|
|
openDetailForOut = function (item) { |
|
|
initCompleteReview = function() { |
|
|
var index = layer.open({ |
|
|
flow.load({ |
|
|
title: '请求详情', |
|
|
elem: '#LAY_floor2' //流加载容器 |
|
|
type: 2, |
|
|
, scrollElem: '#LAY_floor2' //滚动条所在元素,一般不用填,此处只是演示需要。 |
|
|
shade: 0.2, |
|
|
, isAuto: false |
|
|
maxmin: true, |
|
|
, done: function (page, next) { //执行下一页的回调 |
|
|
shadeClose: true, |
|
|
let lis = []; |
|
|
area: ['100%', '100%'], |
|
|
let lis1 = []; |
|
|
content: '/application_review?id=' + item, |
|
|
let lis2 = []; |
|
|
end: function () { |
|
|
let result; |
|
|
location.reload() |
|
|
$.get('/depositoryRecord/myTaskOut?page=' + page + '&size=' + size + '&isDone=1', function (res) { |
|
|
|
|
|
var Width = "25%"; |
|
|
|
|
|
result = res.data; |
|
|
|
|
|
lis.push("<div class='clearfix'>"); |
|
|
|
|
|
for (let i = 0; i < result.length; i++) { |
|
|
|
|
|
if (isMobile()) { |
|
|
|
|
|
Width = "50%"; |
|
|
|
|
|
} |
|
|
|
|
|
lis.push('<li style="width:' + Width + ';float:left;"><div class="layui-card my-shadow my-card flow1" onclick="openDetailForOutView(' |
|
|
|
|
|
+ result[i].id + ')" ><div class="layui-card-header"><h2>' |
|
|
|
|
|
+ result[i].applicantName + '的'); |
|
|
|
|
|
lis.push('出库请求</h2></div>'); |
|
|
|
|
|
lis.push('<div class="layui-col-md4 my-time" style="margin-left: 15px; color: #999;font-size: 12px;">' |
|
|
|
|
|
+ result[i].applicantTime + '</div></div></li>'); |
|
|
|
|
|
} |
|
|
|
|
|
lis.push("</div>"); |
|
|
|
|
|
pre2 += result.length; |
|
|
|
|
|
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|
|
|
|
|
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|
|
|
|
|
next(lis.join(''), pre2 < res.count); |
|
|
|
|
|
}); |
|
|
|
|
|
$.get('/depositoryRecord/myTaskIn?page=' + page + '&size=' + size + '&isDone=1', function (res) { |
|
|
|
|
|
var Width = "25%"; |
|
|
|
|
|
result = res.data; |
|
|
|
|
|
lis2.push("<div class='clearfix'>"); |
|
|
|
|
|
for (let i = 0; i < result.length; i++) { |
|
|
|
|
|
if (isMobile()) { |
|
|
|
|
|
Width = "50%"; |
|
|
|
|
|
} |
|
|
|
|
|
lis2.push('<li style="width:' + Width + ';float:left;"><div class="layui-card my-shadow my-card flow1" onclick="openDetailForInView(' |
|
|
|
|
|
+ result[i].id + ')" ><div class="layui-card-header"><h2>' |
|
|
|
|
|
+ result[i].applicantName + '的'); |
|
|
|
|
|
lis2.push('入库请求</h2></div>'); |
|
|
|
|
|
lis2.push('<div class="layui-col-md4 my-time" style="margin-left: 15px; color: #999;font-size: 12px;">' |
|
|
|
|
|
+ result[i].applicantTime + '</div></div></li>'); |
|
|
|
|
|
} |
|
|
|
|
|
lis2.push("</div>"); |
|
|
|
|
|
pre6 += result.length; |
|
|
|
|
|
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|
|
|
|
|
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|
|
|
|
|
next(lis2.join(''), pre6 < res.count); |
|
|
|
|
|
}); |
|
|
|
|
|
$.get('/stockTaking/myTask?page=' + page + '&size=' + size + '&isDone=1', function (res) { |
|
|
|
|
|
var Width = "25%"; |
|
|
|
|
|
result = res.data; |
|
|
|
|
|
lis1.push("<div class='clearfix'>"); |
|
|
|
|
|
if (isMobile()) { |
|
|
|
|
|
Width = "50%"; |
|
|
|
|
|
} |
|
|
|
|
|
for (let i = 0; i < result.length; i++) { |
|
|
|
|
|
lis1.push('<li style="width:' + Width + ';float:left;"><div class="layui-card my-shadow my-card flow1" onclick="openDetailTaking(' |
|
|
|
|
|
+ result[i].id + ')"><div class="layui-card-header"><h2>' |
|
|
|
|
|
+ result[i].originatorName + '的'); |
|
|
|
|
|
lis1.push('盘点记录</h2></div>'); |
|
|
|
|
|
lis1.push('<div class="layui-col-md4 my-time" style="margin-left: 15px; color: #999;font-size: 12px;">' |
|
|
|
|
|
+ result[i].createTime + '</div></div></li>'); |
|
|
|
|
|
} |
|
|
|
|
|
lis1.push('</div>'); |
|
|
|
|
|
pre4 += result.length; |
|
|
|
|
|
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|
|
|
|
|
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|
|
|
|
|
next(lis1.join(''), pre4 < res.count); |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
$(window).on("resize", function () { |
|
|
// 未完成任务-出库任务 |
|
|
layer.full(index); |
|
|
initIncompleteOutTask = function() { |
|
|
|
|
|
flow.load({ |
|
|
|
|
|
elem: '#LAY_floor3' //流加载容器 |
|
|
|
|
|
, scrollElem: '#LAY_floor3' //滚动条所在元素,一般不用填,此处只是演示需要。 |
|
|
|
|
|
, isAuto: false |
|
|
|
|
|
, done: function (page, next) { //执行下一页的回调 |
|
|
|
|
|
let lis = []; |
|
|
|
|
|
let result; |
|
|
|
|
|
$.get('/depositoryRecord/myTashForScanQrCode?page=' + page + '&size=' + size + '&isDone=0', function (res) { |
|
|
|
|
|
var Width = "25%"; |
|
|
|
|
|
result = res.data; |
|
|
|
|
|
const keys = Object.keys(result); // 获取map中所有的键 |
|
|
|
|
|
let redirectByIsMobile = ""; |
|
|
|
|
|
lis.push("<div class='clearfix'>"); |
|
|
|
|
|
if (isMobile()) { |
|
|
|
|
|
// 如果是移动端 |
|
|
|
|
|
Width = "50%"; |
|
|
|
|
|
redirectByIsMobile = "openDetail3_mobile("; |
|
|
|
|
|
} else { |
|
|
|
|
|
redirectByIsMobile = "openDetail3("; |
|
|
|
|
|
} |
|
|
|
|
|
for (let i = 0; i < keys.length; i++) { |
|
|
|
|
|
|
|
|
|
|
|
lis.push('<li style="width:' + Width + ';float:left;">' + |
|
|
|
|
|
'<div class="layui-card my-shadow my-card flow1"' + "onclick=" + redirectByIsMobile + result[keys[i]][0].depositoryId + ")" + '>' + |
|
|
|
|
|
'<div class="layui-card-header"><h2>' |
|
|
|
|
|
+ result[keys[i]][0].depositoryName + '</h2></div>') |
|
|
|
|
|
lis.push('<div class="layui-col-md4 my-time" style="margin-left: 15px; color: #999;font-size: 12px;">' |
|
|
|
|
|
+ result[keys[i]][0].applicantTime + '</div></div></li>'); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
lis.push("</div>"); |
|
|
|
|
|
pre2 += result.length; |
|
|
|
|
|
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页 |
|
|
|
|
|
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多 |
|
|
|
|
|
next(lis.join(''), pre2 < res.count); |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
}); |
|
|
}); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 用于跳转到出库审核页面 |
|
|
|
|
|
openDetailForOut = function (item) { |
|
|
|
|
|
if(isMobile()){ |
|
|
|
|
|
layer.open({ |
|
|
|
|
|
title: '请求详情', |
|
|
|
|
|
type: 2, |
|
|
|
|
|
shade: 0.2, |
|
|
|
|
|
maxmin: true, |
|
|
|
|
|
shadeClose: true, |
|
|
|
|
|
area: ['100%', '100%'], |
|
|
|
|
|
content: '/application_review?id=' + item, |
|
|
|
|
|
end: function () { |
|
|
|
|
|
location.reload() |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}else{ |
|
|
|
|
|
layer.open({ |
|
|
|
|
|
title: '请求详情', |
|
|
|
|
|
type: 2, |
|
|
|
|
|
shade: 0.2, |
|
|
|
|
|
maxmin: true, |
|
|
|
|
|
offset: 'r', |
|
|
|
|
|
anim: 'slideLeft', // 从右往左 |
|
|
|
|
|
shadeClose: true, |
|
|
|
|
|
area: ['30%', '100%'], |
|
|
|
|
|
content: '/application_review?id=' + item, |
|
|
|
|
|
end: function () { |
|
|
|
|
|
flow.reload() |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}; |
|
|
// 用于跳转到入库审核页面 |
|
|
// 用于跳转到入库审核页面 |
|
|
openDetailForIn = function (item) { |
|
|
openDetailForIn = function (item) { |
|
|
var index = layer.open({ |
|
|
var index = layer.open({ |
|
|
@ -343,6 +406,7 @@ |
|
|
shade: 0.2, |
|
|
shade: 0.2, |
|
|
maxmin: true, |
|
|
maxmin: true, |
|
|
shadeClose: true, |
|
|
shadeClose: true, |
|
|
|
|
|
|
|
|
area: ['100%', '100%'], |
|
|
area: ['100%', '100%'], |
|
|
content: '/application_in_review?id=' + item, |
|
|
content: '/application_in_review?id=' + item, |
|
|
end: function () { |
|
|
end: function () { |
|
|
@ -516,10 +580,6 @@ |
|
|
return false; // PC端 |
|
|
return false; // PC端 |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$('body').on('click', '[data-refresh]', function () { |
|
|
|
|
|
location.reload(); |
|
|
|
|
|
}) |
|
|
|
|
|
}); |
|
|
}); |
|
|
</script> |
|
|
</script> |
|
|
</html> |
|
|
</html> |