This commit is contained in:
cwchen 2024-11-11 13:51:13 +08:00
parent 432235d9ea
commit 65060b0a35
8 changed files with 128 additions and 75 deletions

View File

@ -31,7 +31,7 @@ function getShipmentBatch(list) {
if (list && list.length > 0) {
dataList.push({ name: '全部', id: '' })
$.each(list, function (index, item) {
dataList.push({ name: '第' +numToChinese(index + 1)+ '批', id: item.id, tiem: item.createDay })
dataList.push({ name: '第' + numToChinese(index + 1) + '批', id: item.id, tiem: item.createDay })
});
dataList.push({ name: '待发货', id: '0' })
} else {
@ -44,7 +44,7 @@ function getShipmentBatch(list) {
} else if (item.name === '全部') {
html += '<li value="' + this.id + '"><span class="li-span">' + this.name + '</span></li>';
} else {
html += '<li value="' + this.id + '"><span>' + item.name + '</span><span>'+item.tiem+'</span></li>';
html += '<li value="' + this.id + '"><span>' + item.name + '</span><span>' + item.tiem + '</span></li>';
}
})
$('.layui-tab-title').empty().append(html);
@ -133,7 +133,7 @@ function numToChinese(num) {
return '二十四';
} else if (num === 25) {
return '二十五';
}else if (num === 26) {
} else if (num === 26) {
return '二十六';
} else if (num === 27) {
return '二十七';
@ -156,4 +156,9 @@ function numToChinese(num) {
} else if (num === 36) {
return '三十六';
}
}
// 查看需求计划
function openDetail() {
openIframeByParamObj2("view_plan", "需求计划", "./child/demand_plan_detail_list.html", "92%", "95%", objParam);
}

View File

@ -38,7 +38,8 @@ function queryTable(type) {
},
where: {
encryptedData: JSON.stringify({
'keyWord': $('#keyWord').val()
'keyWord': $('#keyWord').val(),
'proId': objParam.proId
}),
},
},
@ -53,10 +54,11 @@ function initTable() {
authorization: sessionStorage.getItem("gz-token"),
},
height: "full-180",
url: dataUrl + "backstage/planOut/getDataPlanByPage",
url: dataUrl + "backstage/planOut/getProPlanListByProId",
where: {
encryptedData: JSON.stringify({
'keyWord': $('#keyWord').val()
'keyWord': $('#keyWord').val(),
'proId': objParam.proId
}),
},
request: {
@ -163,5 +165,5 @@ function setNumColor(value, type) {
// 需求计划编号
function plan_detail(obj){
openIframeByParamObj2("plan_detail", "机具需求计划", "./apply_plan_detail.html", "92%", "95%", obj);
openIframeByParamObj2("plan_detail", "机具需求计划", "./child/apply_plan_detail.html", "92%", "95%", obj);
}

View File

@ -2,7 +2,7 @@ let form, table, element,tableIns;
let typeParam;
let pageNum = 1;
function setParams(type) {
typeParam = type;
typeParam = type - 1;
layui.use(["form", "table", 'element'], function () {
form = layui.form;
table = layui.table;
@ -13,7 +13,7 @@ function setParams(type) {
typeParam = value;
reloadTable(1);
});
$('.layui-tab-title li').eq(typeParam - 1).addClass('layui-this');
$('.layui-tab-title li').eq(typeParam).addClass('layui-this');
initTable();
});
}
@ -45,7 +45,7 @@ function reloadTable(pageNum) {
encryptedData: JSON.stringify({
'name': $('#name').val(),
'module': $('#module').val(),
'type': typeParam
'typeSource': typeParam
}),
},
},
@ -61,12 +61,12 @@ function initTable() {
authorization: sessionStorage.getItem("gz-token"),
},
height: "full-220",
url: dataUrl + "backstage/planOut/getProPlanPage",
url: dataUrl + "backstage/planOut/getDataInfoByPage",
where: {
encryptedData: JSON.stringify({
'name': $('#name').val(),
'module': $('#module').val(),
'type': typeParam
'typeSource': typeParam
}),
},
request: {
@ -130,23 +130,23 @@ function initTable() {
},
},
{
field: "status",
field: "fhNum",
title: "已发货量",
width: '8%',
unresize: true,
align: "center",
templet: function (d) {
return setNumColor(d.needNum,2);
return setNumColor(d.fhNum,2);
},
},
{
field: "status",
field: "wfhNum",
title: "待发货量",
width: '10%',
unresize: true,
align: "center",
templet: function (d) {
return setNumColor(d.needNum,3);
return setNumColor(d.wfhNum,3);
},
},
{
@ -156,7 +156,7 @@ function initTable() {
unresize: true,
align: "center",
templet: function (d) {
return setFontBold(d.needNum);
return setFontBold(d.proNum);
},
},
{
@ -234,5 +234,6 @@ function print() {
// 查看来源
function viewSource(obj) {
obj.typeParam = typeParam;
openIframeByParamObj2("view_data_source_list", "数据来源", "./child/view_data_source_list.html", "92%", "95%", obj);
}

View File

@ -31,17 +31,53 @@ function getDataInfoDetails() {
}, null);
function setData(obj) {
// $('#type').html(obj.type);
// $('#name').html(obj.name);
// $('#unit').html(obj.unit);
// $('#module').html(obj.module);
// $('#wfhNum').html(obj.wfhNum);
// $('#kuNum').html(obj.kuNum);
// $('#clNum').html(obj.clNum);
// $('#proNum').html(obj.proNum);
$('#type').html(obj.type);
$('#name').html(obj.name);
$('#unit').html(obj.unit);
$('#module').html(obj.module);
$('#needNum').html(obj.needNum);
$('#fhNum').html(obj.fhNum);
$('#wfhNum').html(obj.wfhNum);
$('#clNum').html(obj.clNum);
$('#proNum').html(obj.proNum);
$('#planNum').html(obj.planNum);
}
}
// 查询/重置
function queryTable(type) {
if (type === 1) {
reloadTable(1);
} else if (type === 2) {
$('#name').val('');
$('#module').val('');
layui.form.render();
reloadTable(1);
}
}
// 刷新页面数据
function reloadData() {
reloadData(pageNum);
}
// 重载表格
function reloadTable(pageNum) {
table.reload("currentTableId", {
page: {
curr: pageNum ? pageNum : 1,
},
where: {
encryptedData: JSON.stringify({
'name': $('#name').val(),
'module': $('#module').val(),
'moduleId': objParam.moduleId
}),
},
},
);
}
function initTable() {
tableIns = table.render({
elem: "#currentTableId",
@ -49,10 +85,12 @@ function initTable() {
headers: {
authorization: sessionStorage.getItem("gz-token"),
},
height: "full-180",
height: "full-320",
url: dataUrl + "backstage/planOut/getDataPlanByPage",
where: {
encryptedData: JSON.stringify({
'name': $('#name').val(),
'module': $('#module').val(),
'moduleId': objParam.moduleId
}),
},
@ -78,26 +116,53 @@ function initTable() {
return d.LAY_NUM;
},
},
{
field: "proName",
width: '35%',
title: "工程名称",
unresize: true,
align: "center",
},
{
field: "code",
width: '25%',
width: '15%',
title: "需求计划编号",
unresize: true,
align: "center",
templet: function (d) {
let html = "";
html += "<a onclick='demand_plan(" + JSON.stringify(d) + ")'>"+d.code+"</a>";
html += "<a onclick='demand_plan(" + JSON.stringify(d) + ")'>" + d.code + "</a>";
return html;
},
},
{
field: "proName",
width: '15%',
title: "工程名称",
unresize: true,
align: "center",
},
{
field: "projectPart",
width: '15%',
title: "项目部分",
unresize: true,
align: "center",
},
{
field: "projectContent",
width: '15%',
title: "工程内容 ",
unresize: true,
align: "center",
},
{
field: "proName",
width: '10%',
title: "需用日期",
unresize: true,
align: "center",
},
{
field: "remark",
width: '10%',
title: "计划说明 ",
unresize: true,
align: "center",
},
{
field: "needNum",
width: '10%',
@ -107,26 +172,6 @@ function initTable() {
templet: function (d) {
return setNumColor(d.needNum, 1);
},
},
{
field: "needNum",
width: '10%',
title: "已发货量",
unresize: true,
align: "center",
templet: function (d) {
return setNumColor(d.needNum, 2);
},
},
{
field: "needNum",
width: '10%',
title: "待发货量",
unresize: true,
align: "center",
templet: function (d) {
return setNumColor(d.needNum, 3);
},
}
]
],
@ -155,6 +200,6 @@ function setNumColor(value, type) {
}
// 需求计划编号
function demand_plan(obj){
openIframeByParamObj2("demand_plan", "机具需求计划", "./apply_plan_detail.html", "92%", "95%", obj);
function demand_plan(obj) {
openIframeByParamObj2("demand_plan", "机具需求计划", "./child/apply_plan_detail.html", "92%", "95%", obj);
}

View File

@ -22,7 +22,7 @@
<p style="font-size: 18px;font-weight: bold;" id="proName"></p>
<p id="status"></p>
</div>
<div class="layout detail" style="margin-left: 10%;">
<div class="layout detail" style="margin-left: 10%;cursor: pointer;" onclick="openDetail()">
<p>计划数量</p>
<p style="color: #409EFF;" id="planNum">0</p>
</div>
@ -41,5 +41,5 @@
<script src="../../../js/public.js" charset="utf-8"></script>
<script src="../../../lib/layui-v2.9.18/layui/layui.js" charset="utf-8"></script>
<script src="../../../js/demandPlan/child/delivery_detail_list.js" charset="utf-8"></script>
<script src="../../../js/openIframe.js" charset="utf-8"></script>
</html>

View File

@ -82,5 +82,5 @@
<script src="../../../js/Print.js" charset="utf-8"></script>
<script src="../../../lib/layui-v2.9.18/layui/layui.js" charset="utf-8"></script>
<script src="../../../js/demandPlan/child/demand_plan_detail_list.js" charset="utf-8"></script>
<script src="../../../js/openIframe.js" charset="utf-8"></script>
</html>

View File

@ -16,9 +16,9 @@
<body>
<div class="layui-tab layui-tab-brief" lay-filter="demo-filter-tab">
<ul class="layui-tab-title">
<li value="1">总需求计划量</li>
<li value="2">只看待发货</li>
<li value="3">只看已发货</li>
<li value="0">总需求计划量</li>
<li value="1">只看待发货</li>
<li value="2">只看已发货</li>
</ul>
</div>
<div class="layuimini-container">

View File

@ -39,15 +39,15 @@
</tr>
<tr>
<th>需求量</th>
<td id="wfhNum"></td>
<td id="needNum"></td>
<th>已发货量</th>
<td id="kuNum"></td>
<td id="fhNum"></td>
<th>未发货量</th>
<td id="clNum"></td>
<td id="wfhNum"></td>
<th>差量</th>
<td id="proNum"></td>
<td id="clNum"></td>
<th>需求计划数量</th>
<td id="proNum"></td>
<td id="planNum"></td>
</tr>
</table>
</div>
@ -84,13 +84,13 @@
<button class="layui-btn layui-btn-primary" onclick="exportExcel()"><i
class="layui-icon layui-icon-download-circle"></i> 下 载</button>
</div>
<div class="layui-inline">
<div class="layui-input-inline">
<input type="radio" name="sex" value="" title="全部">
<input type="radio" name="sex" value="1" title="待发货>0">
<input type="radio" name="sex" value="2" title="待发货=0">
<!-- <div class="layui-inline">
<div class="layui-input-inline" style="width: 350px;">
<input type="radio" name="typeParam" value="1" title="全部">
<input type="radio" name="typeParam" value="2" title="待发货>0">
<input type="radio" name="typeParam" value="3" title="待发货=0">
</div>
</div>
</div> -->
</div>
</form>
</div>