From 5f76591c469be4252d1e30121442be13512f3ae6 Mon Sep 17 00:00:00 2001 From: cwjbxqmz <1134865194@qq.com> Date: 星期五, 08 十二月 2023 17:05:11 +0800 Subject: [PATCH] 发货通知单看板 --- Delivery.html | 196 ++++++++++++++++++++++++++++++++++--------------- 1 files changed, 136 insertions(+), 60 deletions(-) diff --git a/Delivery.html b/Delivery.html index 626c610..ccebe71 100644 --- a/Delivery.html +++ b/Delivery.html @@ -1,6 +1,7 @@ <!DOCTYPE html> <!--<html lang="zh-cn">--> -c<html> +c +<html> <head> <meta charset="UTF-8"> @@ -32,14 +33,14 @@ margin-right: 5px; color: #09d1ea; } - /* .layui-icon { + /* .layui-icon { font-family:layui-icon !important; }*/ - .clock #Date { - text-align: center; - text-shadow: 0 0 0px #00c6ff; - } + .clock #Date { + text-align: center; + text-shadow: 0 0 0px #00c6ff; + } .clock ul { width: 450px; @@ -97,7 +98,7 @@ .col-sm-2 { position: absolute; - top:900px; + top: 900px; right: 250px; } @@ -109,9 +110,9 @@ } .col-sm-4 { - position:absolute; - top:100px; - right:20px; + position: absolute; + top: 100px; + right: 20px; } .col-sm-6 { @@ -123,7 +124,7 @@ .col-sm-5 { position: absolute; top: 100px; - right:50px; + right: 50px; } @@ -134,7 +135,7 @@ } #mychart1, - #mychart2{ + #mychart2 { width: 120%; border: none; height: 300px; @@ -238,6 +239,7 @@ /* border: 1px solid #464646; */ border: none; } + #tb_order2 tr td { text-align: center; height: 32px; @@ -249,6 +251,7 @@ /* border: 1px solid #464646; */ border: none; } + #tb_order3 tr td { text-align: center; height: 32px; @@ -301,11 +304,11 @@ </style> <script type="text/javascript"> - layui.use(['form', 'element', 'table','layer'], function () { + layui.use(['form', 'element', 'table', 'layer'], function () { var $ = layui.$ form = layui.form, layer = layui.layer, - table = layui.table, + table = layui.table, element = layui.element; var titleData = ["FID", "FENTRYID"] var titleData2 = ["FID", "FENTRYID"] @@ -707,9 +710,10 @@ success: function (result) { var col = []; //缁欑┖鐨勬暟缁勮祴鍊� - col.push({ filed: 'checked', checkbox: true, formatter: stateFormatter }); + //缁欑┖鐨勬暟缁勮祴鍊� + col.push({ type: 'radio', fixed: 'left', formatter: stateFormatter, width: 50 }); for (var key in result.columnNameList) { - if ($.inArray(result.columnNameList[key].ColmCols, titleData) > -1) { + if ($.inArray(result.columnNameList[key].ColmCols, titleData2) > -1) { col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', hide: true }); //闅愯棌id鍒� } else if (result.columnNameList[key].ColmType == "Decimal") { @@ -719,12 +723,10 @@ return parseFloat(value).toFixed(2); } }); - } else if (result.columnNameList[key].ColmType == "DateTime") { - col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', sort: true, templet: "<div>{{d." + result.columnNameList[key].ColmCols + " ==null ?'':layui.util.toDateString(d." + result.columnNameList[key].ColmCols + ", 'yyyy-MM-dd HH:mm:ss')}}</div>" }); + } else { + col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', width: 180 }); } - else { - col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center' }); - } + } var num_total = (result.total) / 10; @@ -739,13 +741,35 @@ , page: true // 寮�鍚垎椤� , limit: 10 , cols: [col] - , done: function (res) { + , done: function (res, curr, count) { + res.data.forEach(function (item, index) { + // console.log(item); + //杩欓噷鐨別ntity_status_id 涓鸿〃鏍兼暟鎹腑鐨勪竴鍒楁暟鎹紝鐢ㄤ簬鍒ゆ柇鐗瑰畾琛� + if (item.杩涘巶鏍囪 == 1 && item.鍑哄巶鏍囪 == 0) { + var tr = $(".layui-one .layui-table tr[data-index=" + index + "]"); + tr.css("background-color", "rgb(51,204,102)"); + } + else if + (item.杩涘巶鏍囪 == 0 && item.鍑哄巶鏍囪 == 0) { + var tr = $(".layui-one .layui-table tr[data-index=" + index + "]"); + tr.css("background-color", "white"); + } + else if (item.杩涘巶鏍囪 == 1 && item.鍑哄巶鏍囪 == 1) { + var tr = $(".layui-one .layui-table tr[data-index=" + index + "]"); + tr.css("background-color", "rgb(253,253,150)"); + } + else if + (item.杩涘巶鏍囪 == 0 && item.鍑哄巶鏍囪 == 1) { + var tr = $(".layui-one .layui-table tr[data-index=" + index + "]"); + tr.css("background-color", "rgb(253,253,150)"); + } + }) } }); // 鐩戝惉table澶嶉�夋鐨勯�夋嫨浜嬩欢 - table.on('checkbox(tb_order)', function (obj) { + table.on('radio(tb_order)', function (obj) { selectedIds = table.checkStatus('tb_order').data.map(item => item.id).sort(function (a, b) { return a - b; }); @@ -765,33 +789,33 @@ var checkStatus = table.checkStatus('tb_order') , data = checkStatus.data; + var FID = data[0].FID.toString(); var FENTRYID = data[0].FENTRYID.toString(); switch (obj.event) { case 'InFactory1': Table_Button(FID, FENTRYID, 'InFactory1'); + DataTable(); break; case 'DInFactory1': Table_Button(FID, FENTRYID, 'DInFactory1'); + DataTable(); break; case 'OutFactory1': Table_Button(FID, FENTRYID, 'OutFactory1'); + DataTable(); break; case 'DOutFactory1': Table_Button(FID, FENTRYID, 'DOutFactory1'); + DataTable(); break; } }); - - - - - - function Table_Button(FID,FENTRYID,OperationType) { + function Table_Button(FID, FENTRYID, OperationType) { $.ajax({ type: "GET", url: GetWEBURL() + '/loaddata/DeliveryTableDataButton', @@ -802,7 +826,7 @@ json: 'callback', success: function (result) { var data = result.data; - layer.alert(data[0].HRemark); + } }) } @@ -827,21 +851,21 @@ success: function (result) { var col = []; //缁欑┖鐨勬暟缁勮祴鍊� - col.push({ filed: 'checked', checkbox: true, formatter: stateFormatter }); + col.push({ type: 'radio', fixed: 'left', formatter: stateFormatter, width: 50 }); for (var key in result.columnNameList) { if ($.inArray(result.columnNameList[key].ColmCols, titleData2) > -1) { col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', hide: true }); //闅愯棌id鍒� } else - if (result.columnNameList[key].ColmType == "Decimal") { + if (result.columnNameList[key].ColmType == "Decimal") { - col.push({ - field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', formatter: function (value, row, index) { - return parseFloat(value).toFixed(2); - } - }); - } else { - col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center' }); - } + col.push({ + field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', formatter: function (value, row, index) { + return parseFloat(value).toFixed(2); + } + }); + } else { + col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', width: 180 }); + } } @@ -857,13 +881,35 @@ , page: true // 寮�鍚垎椤� , limit: 10 , cols: [col] - , done: function (res) { + , done: function (res, curr, count) { + res.data.forEach(function (item, index) { + // console.log(item); + //杩欓噷鐨別ntity_status_id 涓鸿〃鏍兼暟鎹腑鐨勪竴鍒楁暟鎹紝鐢ㄤ簬鍒ゆ柇鐗瑰畾琛� + if (item.杩涘巶鏍囪 == 1 && item.鍑哄巶鏍囪 == 0) { + var tr = $(".layui-two .layui-table tr[data-index=" + index + "]"); + tr.css("background-color", "rgb(51,204,102)"); + } + else if + (item.杩涘巶鏍囪 == 0 && item.鍑哄巶鏍囪 == 0) { + var tr = $(".layui-two .layui-table tr[data-index=" + index + "]"); + tr.css("background-color", "white"); + } + else if (item.杩涘巶鏍囪 == 1 && item.鍑哄巶鏍囪 == 1) { + var tr = $(".layui-two .layui-table tr[data-index=" + index + "]"); + tr.css("background-color", "rgb(253,253,150)"); + } + else if + (item.杩涘巶鏍囪 == 0 && item.鍑哄巶鏍囪 == 1) { + var tr = $(".layui-two .layui-table tr[data-index=" + index + "]"); + tr.css("background-color", "rgb(253,253,150)"); + } + }) } }); // 鐩戝惉table澶嶉�夋鐨勯�夋嫨浜嬩欢 - table.on('checkbox(tb_order2)', function (obj) { + table.on('radio(tb_order2)', function (obj) { selectedIds = table.checkStatus('tb_order2').data.map(item => item.id).sort(function (a, b) { return a - b; }); @@ -893,16 +939,20 @@ switch (obj.event) { case 'InFactory2': Table_Button(FID, FENTRYID, 'InFactory2'); + DataTable2(); break; case 'DInFactory2': Table_Button(FID, FENTRYID, 'DInFactory2'); + DataTable2(); break; case 'OutFactory2': Table_Button(FID, FENTRYID, 'OutFactory2'); + DataTable2(); break; case 'DOutFactory2': Table_Button(FID, FENTRYID, 'DOutFactory2'); + DataTable2(); break; } }); @@ -927,21 +977,21 @@ success: function (result) { var col = []; //缁欑┖鐨勬暟缁勮祴鍊� - col.push({ filed: 'checked', checkbox: true, formatter: stateFormatter }); + col.push({ type: 'radio', fixed: 'left', formatter: stateFormatter, width: 50 }); for (var key in result.columnNameList) { if ($.inArray(result.columnNameList[key].ColmCols, titleData3) > -1) { col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', hide: true }); //闅愯棌id鍒� } else - if (result.columnNameList[key].ColmType == "Decimal") { + if (result.columnNameList[key].ColmType == "Decimal") { - col.push({ - field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', formatter: function (value, row, index) { - return parseFloat(value).toFixed(2); - } - }); - } else { - col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center' }); - } + col.push({ + field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', formatter: function (value, row, index) { + return parseFloat(value).toFixed(2); + } + }); + } else { + col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', width: 180 }); + } } @@ -957,13 +1007,35 @@ , page: true // 寮�鍚垎椤� , limit: 10 , cols: [col] - , done: function (res) { + , done: function (res, curr, count) { + res.data.forEach(function (item, index) { + // console.log(item); + //杩欓噷鐨別ntity_status_id 涓鸿〃鏍兼暟鎹腑鐨勪竴鍒楁暟鎹紝鐢ㄤ簬鍒ゆ柇鐗瑰畾琛� + if (item.杩涘巶鏍囪 == 1 && item.鍑哄巶鏍囪 == 0) { + var tr = $(".layui-three .layui-table tr[data-index=" + index + "]"); + tr.css("background-color", "rgb(51,204,102)"); + } + else if + (item.杩涘巶鏍囪 == 0 && item.鍑哄巶鏍囪 == 0) { + var tr = $(".layui-three .layui-table tr[data-index=" + index + "]"); + tr.css("background-color", "white"); + } + else if (item.杩涘巶鏍囪 == 1 && item.鍑哄巶鏍囪 == 1) { + var tr = $(".layui-three .layui-table tr[data-index=" + index + "]"); + tr.css("background-color", "rgb(253,253,150)"); + } + else if + (item.杩涘巶鏍囪 == 0 && item.鍑哄巶鏍囪 == 1) { + var tr = $(".layui-three .layui-table tr[data-index=" + index + "]"); + tr.css("background-color", "rgb(253,253,150)"); + } + }) } }); // 鐩戝惉table澶嶉�夋鐨勯�夋嫨浜嬩欢 - table.on('checkbox(tb_order3)', function (obj) { + table.on('radio(tb_order3)', function (obj) { selectedIds = table.checkStatus('tb_order3').data.map(item => item.id).sort(function (a, b) { return a - b; }); @@ -993,16 +1065,20 @@ switch (obj.event) { case 'InFactory3': Table_Button(FID, FENTRYID, 'InFactory3'); + DataTable3(); break; case 'DInFactory3': Table_Button(FID, FENTRYID, 'DInFactory3'); + DataTable3(); break; case 'OutFactory3': Table_Button(FID, FENTRYID, 'OutFactory3'); + DataTable3(); break; case 'DOutFactory3': Table_Button(FID, FENTRYID, 'DOutFactory3'); + DataTable3(); break; } }); @@ -1039,13 +1115,13 @@ <form class="layui-form"> <div class="layui-tab"> <ul class="layui-tab-title"> - <li lay-id="1" style="padding: 1px; color: rgba(9, 209, 234, 1);" class="layui-this">鍩烘湰淇℃伅1</li> - <li lay-id="2" style="padding: 1px; color: rgba(9, 209, 234, 1);">淇℃伅2</li> - <li lay-id="3" style="padding: 1px; color: rgba(9, 209, 234, 1);">淇℃伅3</li> + <li lay-id="1" style="padding: 3px; color: rgba(9, 209, 234, 1);" class="layui-this">娴欐睙瀹変笢灏煎ゥ</li> + <li lay-id="2" style="padding: 3px; color: rgba(9, 209, 234, 1);">涓畨(娴欐睙)</li> + <li lay-id="3" style="padding: 3px; color: rgba(9, 209, 234, 1);">缁嶅叴涓摑绁ュ竼</li> </ul> <div class="layui-tab-content"> <!--鍩烘湰淇℃伅--> - <div class="layui-tab-item layui-show"> + <div class="layui-tab-item layui-show layui-one"> <div class="layui-form-item" style="padding-top: 10px;"> <div class="col-sm-8 left"> <div> @@ -1063,7 +1139,7 @@ </div> </div> <!--鍩烘湰淇℃伅--> - <div class="layui-tab-item"> + <div class="layui-tab-item layui-two"> <div class="layui-form-item" style="padding-top: 10px;"> <div class="col-sm-8 left"> <div> @@ -1081,7 +1157,7 @@ </div> </div> <!--鍩烘湰淇℃伅--> - <div class="layui-tab-item"> + <div class="layui-tab-item layui-three"> <div class="layui-form-item" style="padding-top: 10px;"> <div class="col-sm-8 left"> <div> -- Gitblit v1.9.1