| | |
| | | <script src="js/webConfig.js"></script> |
| | | <script src="js/layui.js"></script> |
| | | <style> |
| | | .layui-table th { |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .layui-table td { |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .clock { |
| | | font-family: 'BebasNeueRegular', Arial, Helvetica, sans-serif; |
| | | font-size: 20px; |
| | |
| | | top: 550px; |
| | | right: 130px; |
| | | } |
| | | |
| | | /* |
| | | #mychart1, |
| | | #mychart2 { |
| | | width: 120%; |
| | |
| | | width: 190%; |
| | | border: none; |
| | | height: 300px; |
| | | } |
| | | }*/ |
| | | |
| | | #cList { |
| | | margin: 0% auto; |
| | |
| | | }, 1000); |
| | | }); |
| | | $(function () { |
| | | var mychart1 = echarts.init(document.getElementById('mychart1')); |
| | | var mychart2 = echarts.init(document.getElementById('mychart2')); |
| | | var mychart3 = echarts.init(document.getElementById('mychart3')); |
| | | //var mychart1 = echarts.init(document.getElementById('mychart1')); |
| | | //var mychart2 = echarts.init(document.getElementById('mychart2')); |
| | | //var mychart3 = echarts.init(document.getElementById('mychart3')); |
| | | |
| | | Chart(mychart1, mychart2, mychart3); |
| | | //Chart(mychart1, mychart2, mychart3); |
| | | DataTable(); |
| | | DataTable2(); |
| | | DataTable3(); |
| | |
| | | ToDayDt = []; |
| | | OrderQty = []; |
| | | FHSQty = []; |
| | | Chart(mychart1, mychart2, mychart3); |
| | | //Chart(mychart1, mychart2, mychart3); |
| | | }, 20000); |
| | | interval1 = setInterval(function () { |
| | | $("#tb_order").bootstrapTable('refresh'); |
| | | }, 1000); |
| | | DataTable(); |
| | | DataTable2(); |
| | | DataTable3(); |
| | | }, 30000); |
| | | //根据浏览器大小改变大小 |
| | | window.onresize = () => { |
| | | mychart1.resize(); |
| | | mychart2.resize(); |
| | | mychart3.resize(); |
| | | } |
| | | //window.onresize = () => { |
| | | // mychart1.resize(); |
| | | // mychart2.resize(); |
| | | // mychart3.resize(); |
| | | //} |
| | | }) |
| | | |
| | | |
| | |
| | | }; |
| | | |
| | | |
| | | mychart1.setOption(option1); |
| | | mychart2.setOption(option2); |
| | | mychart3.setOption(option3); |
| | | //mychart1.setOption(option1); |
| | | //mychart2.setOption(option2); |
| | | //mychart3.setOption(option3); |
| | | } |
| | | |
| | | function DataTable() { |
| | |
| | | type: "GET", |
| | | url: GetWEBURL() + '/loaddata/DeliveryTableData', |
| | | contentType: "application/json;charset=utf-8", |
| | | data: { "limit": "10", "offset": num }, |
| | | data: { "limit": "15", "offset": num }, |
| | | async: false, |
| | | dataType: "json", |
| | | json: 'callback', |
| | |
| | | //给空的数组赋值 |
| | | col.push({ type: 'radio', fixed: 'left', formatter: stateFormatter, width: 50 }); |
| | | for (var key in result.columnNameList) { |
| | | if ($.inArray(result.columnNameList[key].ColmCols, titleData2) > -1) { |
| | | if ($.inArray(result.columnNameList[key].ColmCols, titleData) > -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") { |
| | | |
| | | col.push({ |
| | | field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', formatter: function (value, row, index) { |
| | | field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', width: 120, formatter: function (value, row, index) { |
| | | return parseFloat(value).toFixed(2); |
| | | } |
| | | }); |
| | | } |
| | | else if (result.columnNameList[key].ColmCols == '日期' || result.columnNameList[key].ColmCols == '客户名称' || result.columnNameList[key].ColmCols == '司机电话') { |
| | | col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', width: 120 }); |
| | | } |
| | | else if (result.columnNameList[key].ColmCols == '装车时间' || result.columnNameList[key].ColmCols == '进厂时间' || result.columnNameList[key].ColmCols == '出厂时间') { |
| | | col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', width: 170 }); |
| | | } |
| | | else if (result.columnNameList[key].ColmCols == '物料名称') { |
| | | col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', width: 150 }); |
| | | } |
| | | else if (result.columnNameList[key].ColmCols == '规格型号') { |
| | | col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', width: 250 }); |
| | | } else { |
| | | col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', width: 180 }); |
| | | col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', width: 110 }); |
| | | } |
| | | |
| | | } |
| | | |
| | | var num_total = (result.total) / 10; |
| | | var num_total = (result.total) / 15; |
| | | if (num >= num_total) { |
| | | num = 0; |
| | | } |
| | |
| | | , toolbar: '#toolbarDemo' |
| | | , data: result.rows |
| | | , page: true // 开启分页 |
| | | , limit: 10 |
| | | , limit: 15 |
| | | , limits: [15, 30, 45, 60, 75, 100, 115, 130, 145, 160, 175, 200] |
| | | , cols: [col] |
| | | , done: function (res, curr, count) { |
| | | res.data.forEach(function (item, index) { |
| | |
| | | tr.css("background-color", "rgb(253,253,150)"); |
| | | } |
| | | }) |
| | | |
| | | // 监听table复选框的选择事件 |
| | | table.on('radio(tb_order)', function (obj) { |
| | | selectedIds = table.checkStatus('tb_order').data.map(item => item.id).sort(function (a, b) { |
| | | return a - b; |
| | | }); |
| | | |
| | | console.log('selectedIds'); |
| | | console.log(selectedIds); |
| | | |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | |
| | | // 监听table复选框的选择事件 |
| | | table.on('radio(tb_order)', function (obj) { |
| | | selectedIds = table.checkStatus('tb_order').data.map(item => item.id).sort(function (a, b) { |
| | | return a - b; |
| | | }); |
| | | |
| | | console.log('selectedIds'); |
| | | console.log(selectedIds); |
| | | |
| | | }); |
| | | } |
| | | }) |
| | | }); |
| | |
| | | type: "GET", |
| | | url: GetWEBURL() + '/loaddata/DeliveryTableData2', |
| | | contentType: "application/json;charset=utf-8", |
| | | data: { "limit": "10", "offset": num2 }, |
| | | data: { "limit": "15", "offset": num2 }, |
| | | async: false, |
| | | dataType: "json", |
| | | json: 'callback', |
| | |
| | | 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) { |
| | | field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', width: 120, formatter: function (value, row, index) { |
| | | return parseFloat(value).toFixed(2); |
| | | } |
| | | }); |
| | | } |
| | | else if (result.columnNameList[key].ColmCols == '日期' || result.columnNameList[key].ColmCols == '客户名称' || result.columnNameList[key].ColmCols == '司机电话') { |
| | | col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', width: 120 }); |
| | | } |
| | | else if (result.columnNameList[key].ColmCols == '装车时间' || result.columnNameList[key].ColmCols == '进厂时间' || result.columnNameList[key].ColmCols == '出厂时间') { |
| | | col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', width: 170 }); |
| | | } |
| | | else if (result.columnNameList[key].ColmCols == '物料名称') { |
| | | col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', width: 150 }); |
| | | } |
| | | else if (result.columnNameList[key].ColmCols == '规格型号') { |
| | | col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', width: 250 }); |
| | | } else { |
| | | col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', width: 180 }); |
| | | col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', width: 110 }); |
| | | } |
| | | |
| | | } |
| | | |
| | | var num_total2 = (result.total) / 10; |
| | | var num_total2 = (result.total) / 15; |
| | | if (num2 >= num_total2) { |
| | | num2 = 0; |
| | | } |
| | |
| | | , toolbar: '#toolbarDemo2' |
| | | , data: result.rows |
| | | , page: true // 开启分页 |
| | | , limit: 10 |
| | | , limit: 15 |
| | | , limits: [15, 30, 45, 60, 75, 100, 115, 130, 145, 160, 175, 200] |
| | | , cols: [col] |
| | | , done: function (res, curr, count) { |
| | | res.data.forEach(function (item, index) { |
| | |
| | | type: "GET", |
| | | url: GetWEBURL() + '/loaddata/DeliveryTableData3', |
| | | contentType: "application/json;charset=utf-8", |
| | | data: { "limit": "10", "offset": num3 }, |
| | | data: { "limit": "15", "offset": num3 }, |
| | | async: false, |
| | | dataType: "json", |
| | | json: 'callback', |
| | |
| | | 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) { |
| | | field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', width: 120, formatter: function (value, row, index) { |
| | | return parseFloat(value).toFixed(2); |
| | | } |
| | | }); |
| | | } |
| | | else if (result.columnNameList[key].ColmCols == '日期' || result.columnNameList[key].ColmCols == '客户名称' || result.columnNameList[key].ColmCols == '司机电话') { |
| | | col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', width: 120 }); |
| | | } |
| | | else if (result.columnNameList[key].ColmCols == '装车时间' || result.columnNameList[key].ColmCols == '进厂时间' || result.columnNameList[key].ColmCols == '出厂时间') { |
| | | col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', width: 170 }); |
| | | } |
| | | else if (result.columnNameList[key].ColmCols == '物料名称') { |
| | | col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', width: 150 }); |
| | | } |
| | | else if (result.columnNameList[key].ColmCols == '规格型号') { |
| | | col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', width: 250 }); |
| | | } else { |
| | | col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', width: 180 }); |
| | | col.push({ field: result.columnNameList[key].ColmCols, title: result.columnNameList[key].ColmCols, align: 'center', width: 110 }); |
| | | } |
| | | |
| | | } |
| | | |
| | | var num_total3 = (result.total) / 10; |
| | | var num_total3 = (result.total) / 15; |
| | | if (num3 >= num_total3) { |
| | | num3 = 0; |
| | | } |
| | |
| | | , toolbar: '#toolbarDemo3' |
| | | , data: result.rows |
| | | , page: true // 开启分页 |
| | | , limit: 10 |
| | | , limit: 15 |
| | | , limits: [15, 30, 45, 60, 75, 100, 115, 130, 145, 160, 175, 200] |
| | | , cols: [col] |
| | | , done: function (res, curr, count) { |
| | | res.data.forEach(function (item, index) { |
| | |
| | | <!--基本信息--> |
| | | <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 class="col-sm-12 left"> |
| | | <div> |
| | | <table id="tb_order" lay-filter="tb_order" class="table-condensed table-responsive tb_order" data-filter-control="true"></table> |
| | | </div> |
| | |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="OutFactory1">出厂</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="DOutFactory1">撤销出厂</button> |
| | | </div> |
| | | </script>S |
| | | </script> |
| | | </div> |
| | | </div> |
| | | <!--基本信息--> |
| | | <div class="layui-tab-item layui-two"> |
| | | <div class="layui-form-item" style="padding-top: 10px;"> |
| | | <div class="col-sm-8 left"> |
| | | <div class="col-sm-12 left"> |
| | | <div> |
| | | <table id="tb_order2" lay-filter="tb_order2" class="table-condensed table-responsive tb_order2" data-filter-control="true"></table> |
| | | </div> |
| | |
| | | <!--基本信息--> |
| | | <div class="layui-tab-item layui-three"> |
| | | <div class="layui-form-item" style="padding-top: 10px;"> |
| | | <div class="col-sm-8 left"> |
| | | <div class="col-sm-12 left"> |
| | | <div> |
| | | <table id="tb_order3" lay-filter="tb_order3" class="table-condensed table-responsive tb_order3" data-filter-control="true"></table> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | |
| | | </div> |
| | | </form> |
| | | |
| | | |
| | | |
| | | |
| | | <div class="col-sm-4 right"> |
| | | <!--<div class="col-sm-4 right"> |
| | | <div class="col-sm-6 right"> |
| | | <ul id="cList"> |
| | | <li style="font-size:24px;color:#3bff72">状态</li> |
| | |
| | | </div> |
| | | <div class="col-sm-2 right"> |
| | | <div id="mychart3"></div> |
| | | </div> |
| | | |
| | | |
| | | </div>--> |
| | | |
| | | </body> |
| | | |