|
@@ -13,17 +13,54 @@
|
|
<#include "/base/list_base.ftl">
|
|
<#include "/base/list_base.ftl">
|
|
</head>
|
|
</head>
|
|
<body>
|
|
<body>
|
|
- <div>
|
|
|
|
- <input class="my-input" type="text" placeholder="请输入机器编号"/>
|
|
|
|
- <select class="my-select">
|
|
|
|
- <option value ="未打印">未打印</option>
|
|
|
|
- </select>
|
|
|
|
- <select class="my-select">
|
|
|
|
- <option value ="正常">正常</option>
|
|
|
|
- </select>
|
|
|
|
- <button type="submit" class="my-btn-search">搜索</button>
|
|
|
|
|
|
+ <div class="text-c" style="margin-top: 20px;">
|
|
|
|
+ <form action="${path}/admin/machine/_machine_list" method="post">
|
|
|
|
+
|
|
|
|
+ <input class="my-input" type="text" name="printNumber" value="${printNumber!''}" placeholder="每个机器打印数量"/>
|
|
|
|
+ <button type="button" class="my-btn-search" style="margin-right: 50px;">打印</button>
|
|
|
|
+
|
|
|
|
+ <input class="my-input" type="text" name="machineBarcode" value="${machineBarcode!''}" placeholder="请输入机器编号"/>
|
|
|
|
+ <select class="my-select" name="machineIsPrint">
|
|
|
|
+ <option value ="">是否打印过</option>
|
|
|
|
+ <#if machineIsPrint??>
|
|
|
|
+ <#if machineIsPrint == 1>
|
|
|
|
+ <option value ="1" selected>未打印</option>
|
|
|
|
+ <#else >
|
|
|
|
+ <option value ="1">未打印</option>
|
|
|
|
+ </#if>
|
|
|
|
+ <#if machineIsPrint == 2>
|
|
|
|
+ <option value ="2" selected>已打印</option>
|
|
|
|
+ <#else >
|
|
|
|
+ <option value ="2">已打印</option>
|
|
|
|
+ </#if>
|
|
|
|
+ <#else >
|
|
|
|
+ <option value ="1">未打印</option>
|
|
|
|
+ <option value ="2">已打印</option>
|
|
|
|
+ </#if>
|
|
|
|
+ </select>
|
|
|
|
+ <select class="my-select" name="machineProcessState">
|
|
|
|
+ <option value ="">流程是否正常</option>
|
|
|
|
+
|
|
|
|
+ <#if machineProcessState??>
|
|
|
|
+ <#if machineProcessState == 1>
|
|
|
|
+ <option value ="1" selected>正常</option>
|
|
|
|
+ <#else >
|
|
|
|
+ <option value ="1">正常</option>
|
|
|
|
+ </#if>
|
|
|
|
+ <#if machineProcessState == 2>
|
|
|
|
+ <option value ="2" selected>异常</option>
|
|
|
|
+ <#else >
|
|
|
|
+ <option value ="2">异常</option>
|
|
|
|
+ </#if>
|
|
|
|
+ <#else >
|
|
|
|
+ <option value ="1">正常</option>
|
|
|
|
+ <option value ="2">异常</option>
|
|
|
|
+ </#if>
|
|
|
|
+ </select>
|
|
|
|
+ <button type="submit" class="my-btn-search">搜索</button>
|
|
|
|
+ </form>
|
|
</div>
|
|
</div>
|
|
- <div class="mt-20">
|
|
|
|
|
|
+ <div class="mt-20" style="margin: 20px;">
|
|
<table class="table table-border table-bordered table-bg table-hover table-sort">
|
|
<table class="table table-border table-bordered table-bg table-hover table-sort">
|
|
<thead>
|
|
<thead>
|
|
<tr class="text-c">
|
|
<tr class="text-c">
|
|
@@ -38,10 +75,10 @@
|
|
</tr>
|
|
</tr>
|
|
</thead>
|
|
</thead>
|
|
<tbody id="listid">
|
|
<tbody id="listid">
|
|
- <#list page.dataList as order>
|
|
|
|
|
|
+ <#list page.dataList as list>
|
|
<tr>
|
|
<tr>
|
|
- <td class="text-c" width="10">${list.machineBarcode }</td>
|
|
|
|
- <td class="text-c" width="100"><div id="${100000 + st.index}"><img style="width: 50px;height: 50px;" src="${list.machineQrcode }"></td>
|
|
|
|
|
|
+ <td class="text-c" width="100">${list.machineBarcode }</td>
|
|
|
|
+ <td class="text-c" width="100"><div id="${100000 + list_index}"><img style="width: 50px;height: 50px;" src="${list.machineQrcode }"></td>
|
|
<td class="text-c" width="100">
|
|
<td class="text-c" width="100">
|
|
<#if list.machineIsPrint == 1>
|
|
<#if list.machineIsPrint == 1>
|
|
未打印
|
|
未打印
|
|
@@ -58,7 +95,7 @@
|
|
未售出
|
|
未售出
|
|
</#if>
|
|
</#if>
|
|
</td>
|
|
</td>
|
|
- <td class="text-c" width="100"><fmt:formatDate value="${list.machineSalesDate }" pattern="yyyy-MM-dd HH:mm" /></td>
|
|
|
|
|
|
+ <td class="text-c" width="100">${(list.machineSalesDate?string("yyyy-MM-dd"))!''}</td>
|
|
<td class="text-c" width="100">
|
|
<td class="text-c" width="100">
|
|
<#if list.machineProcessState == 1>
|
|
<#if list.machineProcessState == 1>
|
|
正常
|
|
正常
|
|
@@ -67,7 +104,7 @@
|
|
异常
|
|
异常
|
|
</#if>
|
|
</#if>
|
|
</td>
|
|
</td>
|
|
- <td class="text-c" width="100"><fmt:formatDate value="${list.machineProducedTime }" pattern="yyyy-MM-dd HH:mm" /></td>
|
|
|
|
|
|
+ <td class="text-c" width="100">${(list.machineProducedTime?string("yyyy-MM-dd"))!''}</td>
|
|
<!-- 遍历操作 -->
|
|
<!-- 遍历操作 -->
|
|
<td class="td-manage text-c">
|
|
<td class="td-manage text-c">
|
|
<#--<a onclick="print(${100000 + st.index},${list.numberId},${list.numberIsPrint})" title="打印" href="javascript:;" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont"></i></a>
|
|
<#--<a onclick="print(${100000 + st.index},${list.numberId},${list.numberIsPrint})" title="打印" href="javascript:;" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont"></i></a>
|
|
@@ -77,7 +114,91 @@
|
|
</#list>
|
|
</#list>
|
|
</tbody>
|
|
</tbody>
|
|
</table>
|
|
</table>
|
|
|
|
+ <input type="hidden" value="${machineId!''}" name="machineId" id="machineId">
|
|
</div>
|
|
</div>
|
|
<#include "/base/page_util.ftl">
|
|
<#include "/base/page_util.ftl">
|
|
|
|
+ <script type="text/javascript">
|
|
|
|
+ ref = setInterval(function(){
|
|
|
|
+ latestMachine();
|
|
|
|
+ },2000);
|
|
|
|
+ function latestMachine() {
|
|
|
|
+ $.ajax({
|
|
|
|
+ cache: true,
|
|
|
|
+ type: "POST",
|
|
|
|
+ url: "${path}/admin/machine/_LatestMachine_list",
|
|
|
|
+ data:{machineId : $("#machineId").val()},// 你的formid
|
|
|
|
+ success: function(data){
|
|
|
|
+ if(data != null){
|
|
|
|
+ $.each(data,function(i,value) {
|
|
|
|
+ if(i+1 == data.length){
|
|
|
|
+ $("#machineId").val(value.machineId);
|
|
|
|
+ }
|
|
|
|
+ var machineIsPrint = null;
|
|
|
|
+ var machineSalesState = null;
|
|
|
|
+ var machineProcessState = null;
|
|
|
|
+
|
|
|
|
+ if(value.machineIsPrint == 1){
|
|
|
|
+ machineIsPrint = "未打印";
|
|
|
|
+ }else{
|
|
|
|
+ machineIsPrint = "已打印";
|
|
|
|
+ }
|
|
|
|
+ if(value.machineSalesState == 1){
|
|
|
|
+ machineSalesState = "已售出";
|
|
|
|
+ }else{
|
|
|
|
+ machineSalesState = "未售出";
|
|
|
|
+ }
|
|
|
|
+ if(value.machineProcessState == 1){
|
|
|
|
+ machineProcessState = "正常";
|
|
|
|
+ }else{
|
|
|
|
+ machineProcessState = "异常";
|
|
|
|
+ }
|
|
|
|
+ var machineSalesDate = null;
|
|
|
|
+ if(value.machineSalesDate != null && value.machineSalesDate != undefined){
|
|
|
|
+ machineSalesDate = formatDate(value.machineSalesDate);
|
|
|
|
+ }
|
|
|
|
+ var machineProducedTime = null;
|
|
|
|
+ if(value.machineProducedTime != null && value.machineProducedTime != undefined){
|
|
|
|
+ machineProducedTime = formatDate(value.machineProducedTime);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $("#listid").prepend('<tr>'
|
|
|
|
+ +'<td class="text-c" width="100">'+value.machineBarcode+'</td>'
|
|
|
|
+ +'<td class="text-c" width="100"><div id=""><img style="width: 50px;height: 50px;" src="'+value.machineQrcode+'"></td>'
|
|
|
|
+ +'<td class="text-c" width="100">'+machineIsPrint+'</td>'
|
|
|
|
+ +'<td class="text-c" width="100">'+machineSalesState+'</td>'
|
|
|
|
+ +'<td class="text-c" width="100">'+machineSalesDate+'</td>'
|
|
|
|
+ +'<td class="text-c" width="100">'+machineProcessState+'</td>'
|
|
|
|
+ +'<td class="text-c" width="100">'+machineProducedTime+'</td>'
|
|
|
|
+ +'<td class="td-manage text-c"></td></tr>');
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ error: function(){
|
|
|
|
+ console.log("查询最新机器失败!");
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function formatDate(now) {
|
|
|
|
+ var time = new Date(now);
|
|
|
|
+ var year=time.getFullYear();
|
|
|
|
+ var month=time.getMonth()+1;
|
|
|
|
+ var date=time.getDate();
|
|
|
|
+ var hour=time.getHours();
|
|
|
|
+ var minute=time.getMinutes();
|
|
|
|
+ var second=time.getSeconds();
|
|
|
|
+ if(month < 10){
|
|
|
|
+ month = "0"+month;
|
|
|
|
+ }
|
|
|
|
+ if(date < 10){
|
|
|
|
+ date = "0"+date;
|
|
|
|
+ }
|
|
|
|
+ if(minute < 10){
|
|
|
|
+ minute = "0"+minute;
|
|
|
|
+ }
|
|
|
|
+ return year+"-"+month+"-"+date;
|
|
|
|
+ }
|
|
|
|
+ </script>
|
|
</body>
|
|
</body>
|
|
</html>
|
|
</html>
|