diff --git a/css/demandPlan/delivery_batch_list.css b/css/demandPlan/delivery_batch_list.css
new file mode 100644
index 0000000..ecd8f22
--- /dev/null
+++ b/css/demandPlan/delivery_batch_list.css
@@ -0,0 +1,60 @@
+body {
+ margin: 0;
+ padding: 0;
+ height: 99%;
+}
+
+.layout {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+#main-box {
+ width: 100%;
+ height: 100%;
+ background-color: #fff;
+ border-radius: 5px;
+}
+
+#basic-box {
+ width: 100%;
+}
+
+.title {
+ width: 100%;
+ height: 30px;
+ justify-content: start;
+ padding: 0 0 0 20px;
+ box-sizing: border-box;
+}
+
+.title p {
+ font-size: 14px;
+ font-weight: bold;
+
+}
+
+.classTable {
+ width: 98%;
+ margin: 0 1% 0 1%;
+ table-layout: fixed;
+ text-align: center;
+ border-collapse: collapse;
+ border-spacing: 1px;
+ box-sizing: border-box;
+}
+
+.classTable tr td,
+.classTable tr th {
+ height: 50px;
+ box-sizing: border-box;
+ border: 1px solid #ddd;
+ padding: 10px 20px;
+ text-align: left;
+}
+
+
+.classTable tr:nth-child(odd) {
+ background-color: #f2f2f2;
+}
\ No newline at end of file
diff --git a/images/img_icon.png b/images/img_icon.png
new file mode 100644
index 0000000..f154bbc
Binary files /dev/null and b/images/img_icon.png differ
diff --git a/js/demandPlan/child/delivery_all_list.js b/js/demandPlan/child/delivery_all_list.js
index fa2a628..a546c99 100644
--- a/js/demandPlan/child/delivery_all_list.js
+++ b/js/demandPlan/child/delivery_all_list.js
@@ -186,6 +186,7 @@ function initTable() {
},
},
{
+ field: "remarks",
title: "备注",
width: '10%',
align: "center",
diff --git a/js/demandPlan/child/delivery_batch_list.js b/js/demandPlan/child/delivery_batch_list.js
index 40a4dcf..4f577e3 100644
--- a/js/demandPlan/child/delivery_batch_list.js
+++ b/js/demandPlan/child/delivery_batch_list.js
@@ -1 +1,340 @@
-console.log(decodeURIComponent(getUrlParam('obj')));
\ No newline at end of file
+let objParam = JSON.parse(JSON.parse(decodeURIComponent(getUrlParam('obj'))));
+let id = getUrlParam('id'); // 批次ID
+let form, table, element, tableIns, layer;
+let pageNum = 1;
+layui.use(["form", "table", 'element', 'layer'], function () {
+ form = layui.form;
+ table = layui.table;
+ element = layui.element;
+ layer = layui.layer;
+ getOutDetails();
+ initTable();
+});
+
+// 基本信息和附件文档接口
+function getOutDetails() {
+ let params = {
+ encryptedData: JSON.stringify({
+ 'proId': objParam.proId,
+ 'id':id
+ })
+ };
+ let url = dataUrl + 'backstage/planOut/getOutDetails';
+ ajaxRequest(url, "POST", params, true, function () {
+ }, function (result) {
+ console.error(result);
+ if (result.code === 200) {
+ setBasicValue(result.data);
+ setFileTable(result.data.fileList);
+ }else{
+ setBasicValue(null);
+ setFileTable(null);
+ }
+ }, function (xhr, status, error) {
+ errorFn(xhr, status, error)
+ }, null);
+}
+
+function setBasicValue(obj) {
+ if(obj){
+ $('#userName').html(obj.userName); parseInt();
+ $('#createDay').html(obj.createDay + '查看概述');
+ $('#remark').html(obj.remarks);
+ }
+}
+
+// 附件文档赋值
+function setFileTable(fileList) {
+ $('#file-table tbody tr:not(:first)').remove();
+ let html = '';
+ if (fileList && fileList.length > 0) {
+ $.each(fileList, function (index, item) {
+ html += '
' +
+ '| ' + handleFileType(item.fileName) + item.fileName + ' | ' +
+ ' ' + item.createName + ' | ' +
+ '' + item.createTime + ' | ' +
+ '预览' +
+ '下载' +
+ ' | ' +
+ '
';
+ })
+ } else {
+ html = '| 暂无数据 |
';
+ }
+ $('#file-table tbody').after(html);
+}
+
+// 处理文件类型
+function handleFileType(value) {
+ value = value.toLowerCase();
+ let src = '';
+ if (value.indexOf('docx') > -1 || value.indexOf('doc') > -1) {
+ src = '../../../images/docx.png'
+ } else if (value.indexOf('xls') > -1 || value.indexOf('xlsx') > -1) {
+ src = '../../../images/xlsx.png'
+ } else if (value.indexOf('pdf') > -1) {
+ src = '../../../images/pdf.png'
+ } else if (value.indexOf('png') > -1 || value.indexOf('jpg') > -1 || value.indexOf('jpeg') > -1) {
+ src = '../../../images/img_icon.png'
+ }
+ return '
'
+}
+
+// 查询/重置
+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(),
+ 'proId': objParam.proId,
+ 'id':id
+ }),
+ },
+ },
+ );
+}
+
+// 初始化表格
+function initTable() {
+ tableIns = table.render({
+ elem: "#currentTableId",
+ id: 'currentTableId',
+ headers: {
+ authorization: sessionStorage.getItem("gz-token"),
+ },
+ height: "full",
+ url: dataUrl + "backstage/planOut/getOutDetailList",
+ where: {
+ encryptedData: JSON.stringify({
+ 'name': $('#name').val(),
+ 'module': $('#module').val(),
+ 'proId': objParam.proId,
+ 'id':id
+ }),
+ },
+ request: {
+ pageName: 'pageNum',
+ limitName: 'pageSize'
+ },
+ parseData: function (res) { // res 即为原始返回的数据
+ return {
+ "code": 0, // 解析接口状态
+ "msg": '获取成功', // 解析提示文本
+ "count": res.total, // 解析数据长度
+ "data": res.list // 解析数据列表
+ };
+ },
+ cols: [
+ [
+ {
+ width: '5%',
+ title: "序号",
+ align: "center",
+ templet: function (d) {
+ return d.LAY_NUM;
+ },
+ },
+ {
+ field: "type",
+ width: '10%',
+ title: "物机类型 ",
+ unresize: true,
+ align: "center",
+ },
+ {
+ field: "name",
+ width: '20%',
+ title: "物机名称",
+ unresize: true,
+ align: "center",
+ },
+ {
+ field: "module",
+ title: "规格",
+ width: '10%',
+ unresize: true,
+ align: "center",
+ },
+ {
+ field: "unit",
+ title: "单位",
+ width: '10%',
+ unresize: true,
+ align: "center",
+ },
+ {
+ field: "needNum",
+ title: "需要量",
+ width: '10%',
+ unresize: true,
+ align: "center",
+ templet: function (d) {
+ return setNumColor(d.needNum, 1);
+ },
+ },
+ {
+ field: "fhNum",
+ width: '10%',
+ title: "本次发货量",
+ unresize: true,
+ align: "center",
+ templet: function (d) {
+ return setNumColor(d.fhNum, 2);
+ },
+ },
+ {
+ field: "tzNum",
+ width: '10%',
+ title: "不发货量",
+ unresize: true,
+ align: "center",
+ templet: function (d) {
+ return setNumColor(d.tzNum, 3);
+ },
+ },
+ {
+ field: "remarks",
+ title: "备注",
+ width: '15%',
+ align: "center",
+ unresize: true,
+ },
+ ],
+ ],
+ 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");
+ },
+ });
+}
+
+// 设置字体加粗
+function setFontBold(value) {
+ return '' + value + "";
+}
+
+function setNumColor(value, type) { // 1.需要量 2.本次发货量 3.不发货量
+ if (type === 1) {
+ color = '#66b1ff';
+ } else if (type === 2) {
+ color = '#19be6b';
+ } else if (type === 3) {
+ if (value > 0) {
+ color = '#d9001b';
+ } else {
+ color = '#ccc';
+ }
+ }
+ return '' + value + "";
+}
+
+
+// 导出
+function exportExcel() {
+ let encryptedData = JSON.stringify({
+ 'proName': $('#proName').val(),
+ 'status': $('#status').val()
+ });
+ let url = dataUrl + "backstage/planOut/exportExcel?encryptedData=" + encryptedData;
+ exportExcelUtil(url, '机具公司发货数据');
+}
+
+// 打印
+function print() {
+ Print('#body', {
+ onStart: function () {
+ console.log('onStart', new Date())
+ },
+ onEnd: function () {
+ console.log('onEnd', new Date())
+ }
+ })
+}
+
+// 查看概述
+function viewGs(obj) {
+ layer.open({
+ type: 1,
+ shade: false, // 不显示遮罩
+ content: ''+obj.details+'
',
+ title:''+obj.createDay+'发货概述:
',
+ btn: ['复制文字', '关闭'],
+ area: ['60%', '50%'],
+ move:false,
+ btnAlign: 'c', // 按钮居中显示
+ btn1: function () {
+ exeCommandCopyText(obj.gs);
+ },
+ btn2: function () {
+ layer.close();
+ },
+ });
+}
+
+// 复制文字
+function exeCommandCopyText(text) {
+ try {
+ const t = document.createElement('textarea')
+ t.nodeValue = text
+ t.value = text
+ document.body.appendChild(t)
+ t.select()
+ document.execCommand('copy');
+ document.body.removeChild(t)
+ layer.msg('复制成功',{icon:1});
+ } catch (e) {
+ console.log(e)
+ layer.msg('复制失败',{icon:2});
+ }
+}
+
+// 预览文件
+function viewFile(obj) {
+ let fileName = obj.fileName.toLowerCase();
+ if(fileName.indexOf('png') || fileName.indexOf('jpg')|| fileName.indexOf('jpeg')){
+ layer.photos({
+ shade:0.5,
+ photos: {
+ "title": "图片预览",
+ "start": 0,
+ "data": [
+ {
+ "alt": "layer",
+ "pid": 1,
+ "src": "../../../images/captcha.jpg",
+ }
+ ]
+ }
+ });
+ }
+}
+
+// 下载文件
+function downLoadFile(obj) {
+ alert('下载');
+}
\ No newline at end of file
diff --git a/js/demandPlan/child/delivery_detail_list.js b/js/demandPlan/child/delivery_detail_list.js
index 7d5ecf4..857d468 100644
--- a/js/demandPlan/child/delivery_detail_list.js
+++ b/js/demandPlan/child/delivery_detail_list.js
@@ -33,10 +33,10 @@ function getShipmentBatch(list) {
$.each(list, function (index, item) {
dataList.push({ name: '第' +numToChinese(index + 1)+ '批', id: item.id, tiem: item.createDay })
});
- dataList.push({ name: '待发货', id: '' })
+ dataList.push({ name: '待发货', id: '0' })
} else {
dataList.push({ name: '全部', id: '' })
- dataList.push({ name: '待发货', id: '' })
+ dataList.push({ name: '待发货', id: '0' })
}
$.each(dataList, function (index, item) {
if (item.name === '待发货') {
diff --git a/js/demandPlan/child/delivery_not_send_list.js b/js/demandPlan/child/delivery_not_send_list.js
index 40a4dcf..ace29c8 100644
--- a/js/demandPlan/child/delivery_not_send_list.js
+++ b/js/demandPlan/child/delivery_not_send_list.js
@@ -1 +1,203 @@
-console.log(decodeURIComponent(getUrlParam('obj')));
\ No newline at end of file
+let objParam = JSON.parse(JSON.parse(decodeURIComponent(getUrlParam('obj'))));
+let form, table, element, tableIns, layer;
+let pageNum = 1;
+layui.use(["form", "table", 'element', 'layer'], function () {
+ form = layui.form;
+ table = layui.table;
+ element = layui.element;
+ layer = layui.layer;
+ initTable();
+});
+
+
+// 查询/重置
+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(),
+ 'proId': objParam.proId,
+ }),
+ },
+ },
+ );
+}
+
+// 初始化表格
+function initTable() {
+ tableIns = table.render({
+ elem: "#currentTableId",
+ id: 'currentTableId',
+ headers: {
+ authorization: sessionStorage.getItem("gz-token"),
+ },
+ height: "full",
+ url: dataUrl + "backstage/planOut/getDfhList",
+ where: {
+ encryptedData: JSON.stringify({
+ 'name': $('#name').val(),
+ 'module': $('#module').val(),
+ 'proId': objParam.proId
+ }),
+ },
+ request: {
+ pageName: 'pageNum',
+ limitName: 'pageSize'
+ },
+ parseData: function (res) { // res 即为原始返回的数据
+ return {
+ "code": 0, // 解析接口状态
+ "msg": '获取成功', // 解析提示文本
+ "count": res.total, // 解析数据长度
+ "data": res.list // 解析数据列表
+ };
+ },
+ cols: [
+ [
+ {
+ width: '9.9%',
+ title: "序号",
+ align: "center",
+ templet: function (d) {
+ return d.LAY_NUM;
+ },
+ },
+ {
+ field: "type",
+ width: '15%',
+ title: "物机类型 ",
+ unresize: true,
+ align: "center",
+ },
+ {
+ field: "name",
+ width: '20%',
+ title: "物机名称",
+ unresize: true,
+ align: "center",
+ },
+ {
+ field: "module",
+ title: "规格",
+ width: '15%',
+ unresize: true,
+ align: "center",
+ },
+ {
+ field: "unit",
+ title: "单位",
+ width: '10%',
+ unresize: true,
+ align: "center",
+ },
+ {
+ field: "needNum",
+ title: "需要量",
+ width: '10%',
+ unresize: true,
+ align: "center",
+ templet: function (d) {
+ return setNumColor(d.needNum, 1);
+ },
+ },
+ {
+ field: "fhNum",
+ width: '10%',
+ title: "已发货量",
+ unresize: true,
+ align: "center",
+ templet: function (d) {
+ return setNumColor(d.fhNum, 2);
+ },
+ },
+ {
+ field: "tzNum",
+ width: '10%',
+ title: "未发货量",
+ unresize: true,
+ align: "center",
+ templet: function (d) {
+ return setNumColor(d.tzNum, 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");
+ },
+ });
+}
+
+// 设置字体加粗
+function setFontBold(value) {
+ return '' + value + "";
+}
+
+function setNumColor(value, type) { // 1.需要量 2.本次发货量 3.不发货量
+ if (type === 1) {
+ color = '#66b1ff';
+ } else if (type === 2) {
+ color = '#19be6b';
+ } else if (type === 3) {
+ if (value > 0) {
+ color = '#d9001b';
+ } else {
+ color = '#ccc';
+ }
+ }
+ return '' + value + "";
+}
+
+
+// 导出
+function exportExcel() {
+ let encryptedData = JSON.stringify({
+ 'proName': $('#proName').val(),
+ 'status': $('#status').val()
+ });
+ let url = dataUrl + "backstage/planOut/exportExcel?encryptedData=" + encryptedData;
+ exportExcelUtil(url, '机具公司发货数据');
+}
+
+// 打印
+function print() {
+ Print('#body', {
+ onStart: function () {
+ console.log('onStart', new Date())
+ },
+ onEnd: function () {
+ console.log('onEnd', new Date())
+ }
+ })
+}
+
+// 下载文件
+function downLoadFile(obj) {
+ alert('下载');
+}
\ No newline at end of file
diff --git a/page/demandPlan/child/delivery_batch_list.html b/page/demandPlan/child/delivery_batch_list.html
index ac1c826..7804fa7 100644
--- a/page/demandPlan/child/delivery_batch_list.html
+++ b/page/demandPlan/child/delivery_batch_list.html
@@ -8,12 +8,95 @@
-
+
- 发货详情-批次
+
+
+
+
+
+ | 发货人 |
+ 发货日期 |
+
+
+ |
+ |
+
+
+ | 备注 |
+
+
+
+
+
+
+
+
+
+
+
+
+ | 文件名 |
+ 上传人员 |
+ 上传时间 |
+ 操作 |
+
+
+
+
+
diff --git a/page/demandPlan/child/delivery_not_send_list.html b/page/demandPlan/child/delivery_not_send_list.html
index be28a64..b79a34a 100644
--- a/page/demandPlan/child/delivery_not_send_list.html
+++ b/page/demandPlan/child/delivery_not_send_list.html
@@ -8,12 +8,52 @@
-
-
+
-