From 432235d9eaebe705137bac235a2ab70fbdcc9fa3 Mon Sep 17 00:00:00 2001
From: cwchen <1048842385@qq.com>
Date: Mon, 11 Nov 2024 13:05:34 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E8=B4=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
css/demandPlan/view_data_list.css | 8 +-
.../child/demand_plan_detail_list.js | 1 +
js/demandPlan/child/send_goods_form.js | 2 +-
.../child/unplanned_quantity_list.js | 3 +-
js/demandPlan/child/view_data_list.js | 79 +++++----
js/demandPlan/child/view_data_source_list.js | 160 ++++++++++++++++++
.../child/unplanned_quantity_list.html | 1 +
.../child/view_data_source_list.html | 112 ++++++++++++
8 files changed, 322 insertions(+), 44 deletions(-)
create mode 100644 js/demandPlan/child/view_data_source_list.js
create mode 100644 page/demandPlan/child/view_data_source_list.html
diff --git a/css/demandPlan/view_data_list.css b/css/demandPlan/view_data_list.css
index ca83595..4af6e0f 100644
--- a/css/demandPlan/view_data_list.css
+++ b/css/demandPlan/view_data_list.css
@@ -1,3 +1,6 @@
+body {
+ margin: 0 15px 15px 15px;
+}
.layui-tab-brief {
border: 1px solid #f2f2f2;
border-radius: 5px;
@@ -26,9 +29,12 @@ a:focus {
}
.layuimini-container {
- height: 89%;
+ height: 91%;
}
.layui-tab .layui-tab-title li {
font-size: 16px;
+}
+.layui-tab {
+ margin: 0 0 10px 0;
}
\ No newline at end of file
diff --git a/js/demandPlan/child/demand_plan_detail_list.js b/js/demandPlan/child/demand_plan_detail_list.js
index 49023ab..a9249e4 100644
--- a/js/demandPlan/child/demand_plan_detail_list.js
+++ b/js/demandPlan/child/demand_plan_detail_list.js
@@ -77,6 +77,7 @@ function initTable() {
width: '9.9%',
title: "序号",
align: "center",
+ unresize: true,
templet: function (d) {
return d.LAY_NUM;
},
diff --git a/js/demandPlan/child/send_goods_form.js b/js/demandPlan/child/send_goods_form.js
index 0f8ceb4..6efa32a 100644
--- a/js/demandPlan/child/send_goods_form.js
+++ b/js/demandPlan/child/send_goods_form.js
@@ -418,7 +418,7 @@ function handleNum(value) {
// 详情
function openDetail() {
- alert('详情');
+ openIframeByParamObj("view_plan", "需求计划", "./demand_plan_detail_list.html", "92%", "95%", objParam);
}
// 新增需求计划外机具
diff --git a/js/demandPlan/child/unplanned_quantity_list.js b/js/demandPlan/child/unplanned_quantity_list.js
index b4f1a77..5526239 100644
--- a/js/demandPlan/child/unplanned_quantity_list.js
+++ b/js/demandPlan/child/unplanned_quantity_list.js
@@ -4,6 +4,7 @@ layui.use(["form", "table", 'element', 'layer'], function () {
form = layui.form;
table = layui.table;
element = layui.element;
+ layer = layui.layer;
initTable();
});
@@ -193,5 +194,5 @@ function print() {
// 查看来源
function viewSource(obj) {
- openIframeByParam("viewSource", "未发货机具设备超出库存数量-数据来源", "./delivery_detail_list.html", "92%", "95%", obj);
+ openIframeByParamObj2("viewSource", "数据来源", "./delivery_detail_list.html", "92%", "95%", obj);
}
\ No newline at end of file
diff --git a/js/demandPlan/child/view_data_list.js b/js/demandPlan/child/view_data_list.js
index 30dda09..6509043 100644
--- a/js/demandPlan/child/view_data_list.js
+++ b/js/demandPlan/child/view_data_list.js
@@ -60,7 +60,7 @@ function initTable() {
headers: {
authorization: sessionStorage.getItem("gz-token"),
},
- height: "full-230",
+ height: "full-220",
url: dataUrl + "backstage/planOut/getProPlanPage",
where: {
encryptedData: JSON.stringify({
@@ -84,7 +84,7 @@ function initTable() {
cols: [
[
{
- width: 80,
+ width: '6%',
title: "序号",
align: "center",
templet: function (d) {
@@ -92,94 +92,91 @@ function initTable() {
},
},
{
- field: "proName",
- width: 150,
+ field: "type",
+ width: '10%',
title: "物机类型 ",
unresize: true,
align: "center",
},
{
- field: "planNum",
- width: 150,
+ field: "name",
+ width: '10%',
title: "物机名称",
unresize: true,
align: "center",
- /* templet: function (d) {
- return setNumColor(d.planNum);
- }, */
},
{
- field: "recordNum",
- width: 150,
+ field: "module",
+ width: '10%',
title: "规格 ",
unresize: true,
align: "center",
- /* templet: function (d) {
- return setNumColor(d.recordNum);
- }, */
},
{
- field: "status",
+ field: "unit",
title: "单位",
- width: 150,
+ width: '8%',
unresize: true,
align: "center",
- /* templet: function (d) {
- return setStatusColor(d.status);
- }, */
},
{
- field: "status",
+ field: "needNum",
title: "需要量",
- width: 150,
+ width: '8%',
unresize: true,
align: "center",
- /* templet: function (d) {
- return setNumColor(d.status);
- }, */
+ templet: function (d) {
+ return setNumColor(d.needNum,1);
+ },
},
{
field: "status",
title: "已发货量",
- width: 150,
+ width: '8%',
unresize: true,
align: "center",
- /* templet: function (d) {
- return setStatusColor(d.status);
- }, */
+ templet: function (d) {
+ return setNumColor(d.needNum,2);
+ },
},
{
field: "status",
title: "待发货量",
- width: 120,
+ width: '10%',
unresize: true,
align: "center",
- /* templet: function (d) {
- return setStatusColor(d.status);
- }, */
+ templet: function (d) {
+ return setNumColor(d.needNum,3);
+ },
},
{
- field: "lastDay",
- width: 150,
+ field: "proNum",
+ width: '10%',
title: "工程数",
unresize: true,
align: "center",
+ templet: function (d) {
+ return setFontBold(d.needNum);
+ },
},
{
- field: "progress",
- width: 150,
+ field: "planNum",
+ width: '10%',
title: "需求计划数",
unresize: true,
align: "center",
+ templet: function (d) {
+ return setFontBold(d.planNum);
+ },
},
{
title: "来源工程",
- minwidth: 200,
+ width: '10%',
align: "center",
unresize: true,
templet: function (d) {
let html = "";
- html += "查看来源";
+ html += "查看来源";
return html;
},
},
@@ -200,7 +197,7 @@ function setFontBold(value) {
return '' + value + "";
}
-// 发货状态颜色
+// 数量状态颜色 1.需要量 2.已发货量 3.待发货量
function setNumColor(value,type) {
let color = "#409Eff";
if (type === 1) {
@@ -236,6 +233,6 @@ function print() {
}
// 查看来源
-function viewSource(id) {
- openIframeByParam("viewSource","未发货机具设备超出库存数量-数据来源","./view_resource_list.html","92%","95%",id);
+function viewSource(obj) {
+ openIframeByParamObj2("view_data_source_list", "数据来源", "./child/view_data_source_list.html", "92%", "95%", obj);
}
\ No newline at end of file
diff --git a/js/demandPlan/child/view_data_source_list.js b/js/demandPlan/child/view_data_source_list.js
new file mode 100644
index 0000000..9e8fa45
--- /dev/null
+++ b/js/demandPlan/child/view_data_source_list.js
@@ -0,0 +1,160 @@
+let objParam;
+let form, table, element, tableIns, layer;
+let pageNum = 1;
+function setParams(obj) {
+ objParam = JSON.parse(obj);
+ console.log(objParam);
+ layui.use(["form", "table", 'element', 'layer'], function () {
+ form = layui.form;
+ table = layui.table;
+ element = layui.element;
+ layer = layui.layer;
+ getDataInfoDetails();
+ initTable();
+ });
+}
+
+// 基本数据
+function getDataInfoDetails() {
+ let encryptedData = {
+ 'moduleId': objParam.moduleId,
+ };
+ let url = dataUrl + 'backstage/planOut/getDataInfoDetails?encryptedData=' + encodeURIComponent(JSON.stringify(encryptedData));
+ ajaxRequest(url, "GET", null, true, function () {
+ }, function (result) {
+ console.log(result);
+ if (result.code === 200) {
+ setData(result.data);
+ }
+ }, function (xhr, status, error) {
+ errorFn(xhr, status, error)
+ }, 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);
+ }
+}
+
+function initTable() {
+ tableIns = table.render({
+ elem: "#currentTableId",
+ id: 'currentTableId',
+ headers: {
+ authorization: sessionStorage.getItem("gz-token"),
+ },
+ height: "full-180",
+ url: dataUrl + "backstage/planOut/getDataPlanByPage",
+ where: {
+ encryptedData: JSON.stringify({
+ 'moduleId': objParam.moduleId
+ }),
+ },
+ request: {
+ pageName: 'pageNum',
+ limitName: 'pageSize'
+ },
+ parseData: function (res) { // res 即为原始返回的数据
+ return {
+ "code": 0, // 解析接口状态
+ "msg": '获取成功', // 解析提示文本
+ "count": res.total, // 解析数据长度
+ "data": res.list // 解析数据列表
+ };
+ },
+ cols: [
+ [
+ {
+ width: '10%',
+ title: "序号",
+ align: "center",
+ templet: function (d) {
+ return d.LAY_NUM;
+ },
+ },
+
+ {
+ field: "proName",
+ width: '35%',
+ title: "工程名称",
+ unresize: true,
+ align: "center",
+ },
+ {
+ field: "code",
+ width: '25%',
+ title: "需求计划编号",
+ unresize: true,
+ align: "center",
+ templet: function (d) {
+ let html = "";
+ html += ""+d.code+"";
+ return html;
+ },
+ },
+ {
+ field: "needNum",
+ width: '10%',
+ title: "需用量",
+ unresize: true,
+ align: "center",
+ 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);
+ },
+ }
+ ]
+ ],
+ limits: [10, 15, 20, 25, 50, 100],
+ limit: 10,
+ page: true,
+ done: function (res, curr, count) {
+ pageNum = tableIns.config.page.curr;
+ element.render();
+ table.resize("currentTableId");
+ },
+ });
+}
+
+// 数量颜色 1.需要量 2.已发货量 3.待发货量
+function setNumColor(value, type) {
+ let color = "#409Eff";
+ if (type === 1) {
+ color = "#409Eff";
+ } else if (type === 2) {
+ color = "#19be6b";
+ } else if (type === 3) {
+ color = "#f56c6c";
+ }
+ return '' + value + "";
+}
+
+// 需求计划编号
+function demand_plan(obj){
+ openIframeByParamObj2("demand_plan", "机具需求计划", "./apply_plan_detail.html", "92%", "95%", obj);
+}
\ No newline at end of file
diff --git a/page/demandPlan/child/unplanned_quantity_list.html b/page/demandPlan/child/unplanned_quantity_list.html
index 5c55415..313bc7e 100644
--- a/page/demandPlan/child/unplanned_quantity_list.html
+++ b/page/demandPlan/child/unplanned_quantity_list.html
@@ -60,4 +60,5 @@
+