You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
288 lines
11 KiB
288 lines
11 KiB
<#import "../master.ftl" as master>
|
|
<@master.layout>
|
|
|
|
<style>
|
|
#fm label {
|
|
width: 150px;
|
|
}
|
|
</style>
|
|
|
|
<div class="page-header">
|
|
<h2>Slitting Roll Comfirm</h2>
|
|
</div>
|
|
|
|
<table id="dg" class="easyui-datagrid" style="width:100%;height:460px;display: none;"
|
|
data-options="pagination: true, showFooter: true, singleSelect:true, fitColumns:true , url:'/scanning/getSlittingCheckData',method:'get',pageSize:20,toolbar:'#tb'">
|
|
<thead>
|
|
<tr>
|
|
<th data-options="field:'orderNo',width:100">Order No</th>
|
|
<th data-options="field:'slittingNo',width:100">FG roll number</th>
|
|
<th data-options="field:'status',width:80,align:'left'">Status</th>
|
|
<th data-options="field:'statement',width:80,align:'left', formatter:getStatement">Close status</th>
|
|
<th data-options="field:'statementBy',width:100">Close By</th>
|
|
<th data-options="field:'statementDate',width:100,formatter:formatDateTime">Close Date</th>
|
|
<th data-options="field:'id',width:100,editor:'textbox', formatter:formatAction">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
|
|
<div id="tb" style="padding:10px 5px;display: none;">
|
|
<div>
|
|
订单号: <input class="easyui-textbox" id="orderNo" style="width:110px">
|
|
小卷号: <input class="easyui-textbox" id="slittingNo" style="width:110px">
|
|
卷状态: <select id="status" class="easyui-combobox" style="width:110px;" data-options="required:true">
|
|
<option value="">All</option>
|
|
<option value="Created">Created</option>
|
|
<option value="Printed">Printed</option>
|
|
<option value="Diecuted">Diecuted</option>
|
|
<option value="Inspected">Inspected</option>
|
|
<option value="Scanned">Scanned</option>
|
|
</select>
|
|
结单状态: <select id="statement" class="easyui-combobox" style="width:110px;" data-options="required:true">
|
|
<option value="">All</option>
|
|
<option value="N">Open</option>
|
|
<option value="Y">Closed</option>
|
|
</select>
|
|
<a href="#nowhere" id="queryLink" class="easyui-linkbutton" iconCls="icon-search">Search</a>
|
|
<#if currentUser.isAdmin>
|
|
<a href="javascript:void(0)" id="closedAllRoll" class="easyui-linkbutton" iconCls="icon-edit" onclick="closedAllRoll()">Batch close</a>
|
|
</#if>
|
|
<#if currentUser.isAdmin || currentUser.authorities?contains("closeorder")>
|
|
<a href="javascript:void(0)" id="forceClosed" class="easyui-linkbutton" iconCls="icon-remove" onclick="forceClosed()">Force close</a>
|
|
</#if>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="dlgDtls" class="easyui-dialog" style="width:300px;display: none;"
|
|
closed="true">
|
|
<div novalidate style="margin:0;padding:20px 20px">
|
|
<div style="margin-bottom:10px">
|
|
<input id = "order_No" name="orderNo" class="easyui-textbox" label="订单号:" style="width:100%">
|
|
</div>
|
|
<div style="margin-bottom:10px">
|
|
<input id = "slitting_No" name="rollNo" class="easyui-textbox" label="小卷号:" style="width:100%">
|
|
</div>
|
|
<div style="margin-bottom:10px">
|
|
<input id = "roll_Qty"name="rollQty" class="easyui-textbox" label="卷标签数量:" style="width:100%">
|
|
</div>
|
|
<div style="margin-bottom:10px">
|
|
<input id = "state_ment"name="statement" class="easyui-textbox" label="结单状态:" style="width:100%">
|
|
</div>
|
|
<div style="margin-bottom:10px">
|
|
<input id = "scan_Qty" name="scanQty" class="easyui-textbox" label="已扫描数量:" style="width:100%">
|
|
</div>
|
|
<div style="margin-bottom:10px">
|
|
<input id = "noScan_Qty" name="noScanQty" class="easyui-textbox" label="未扫描数量:" style="width:100%">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script>
|
|
|
|
$(window).resize(function () {
|
|
$("#dg").datagrid({"height": $(window).height() - $(".datagrid").offset().top - 20});
|
|
});
|
|
|
|
$(function () {
|
|
$(window).resize();
|
|
});
|
|
|
|
|
|
$("#queryLink").click(function(){
|
|
var dg = $('#dg').datagrid({
|
|
queryParams: {
|
|
orderNo: $("#orderNo").val(),
|
|
slittingNo: $("#slittingNo").val(),
|
|
status: $("#status").val(),
|
|
statement: $("#statement").val()
|
|
}
|
|
});
|
|
});
|
|
|
|
function formatAction(value, row){
|
|
var action = "<a href='javascript:viewSerials(\""+row.orderNo+ "\",\""+row.rowFrom+"\",\""+row.rowTo+"\",\""+row.slittingNo+"\",\""+row.statement+"\")'>Query</a>";
|
|
action += " | <a onclick='downRollSerial(\""+row.slittingNo+ "\")'>Trace</a>";
|
|
//action += " | <a onclick='unscannedReport(\""+row.rollNo+ "\")'>未扫描报告</a>";
|
|
if(row.statement=="Y"){
|
|
action += " | Closed";
|
|
}else{
|
|
action += " | <a onclick='closedRoll(\""+row.orderNo+ "\",\""+row.rowFrom+"\",\""+row.rowTo+"\",\""+row.slittingNo+"\")'>Close</a>";
|
|
}
|
|
return action;
|
|
}
|
|
//获取卷标签数量
|
|
function getRollQty(value, row){
|
|
if(row.rowTo==null||row.rowTo==""
|
|
||row.rowFrom==null||row.rowFrom==""){
|
|
return 0;
|
|
}
|
|
var qty = row.rowTo-row.rowFrom+1;
|
|
return qty;
|
|
}
|
|
//获取结单状态
|
|
function getStatement(value, row){
|
|
if(value==""||value==null||value=="N"){
|
|
return "Open";
|
|
}else if(value=="Y"){
|
|
return "Closed";
|
|
}else if(value=="W"){
|
|
return "To be closed";
|
|
}
|
|
}
|
|
|
|
function lodopPrint(rollNo){
|
|
var url = "/print/finalrollScan/"+rollNo+"/";
|
|
//设置href
|
|
$("#lodopPrint"+rollNo).attr("href", url);
|
|
}
|
|
|
|
function formatDtlAction(value, row){
|
|
return "<a href='/shipment/boxes/scan/" + value + "'>Scan and delivery</a>";
|
|
}
|
|
|
|
function viewSerials(orderNo,rowFrom,rowTo,slittingNo,statement){
|
|
if(rowTo==null||rowTo==""
|
|
||rowFrom==null||rowFrom==""){
|
|
return 0;
|
|
}
|
|
var qty = rowTo-rowFrom+1;
|
|
var state;
|
|
if(statement=="Y"){
|
|
state = "Closed";
|
|
}else {
|
|
state = "Open";
|
|
}
|
|
$("#order_No").textbox('setValue',orderNo);
|
|
$('#order_No').textbox('textbox').attr('readonly',true);
|
|
$("#slitting_No").textbox('setValue',slittingNo);
|
|
$('#slitting_No').textbox('textbox').attr('readonly',true);
|
|
$("#state_ment").textbox('setValue',state);
|
|
$('#state_ment').textbox('textbox').attr('readonly',true);
|
|
$.post("/scanning/getSlittingSerial", {slittingNo: slittingNo,rowFrom: rowFrom,rowTo: rowTo}, function(ret){
|
|
console.log(ret);
|
|
if(ret.success){
|
|
//qty = qty * ret.ret.noOfCross;
|
|
$("#roll_Qty").textbox('setValue',qty);
|
|
$('#roll_Qty').textbox('textbox').attr('readonly',true);
|
|
$("#scan_Qty").textbox('setValue',ret.ret.scanQty);
|
|
$('#scan_Qty').textbox('textbox').attr('readonly',true);
|
|
$("#noScan_Qty").textbox('setValue',ret.ret.noScanQty);
|
|
$('#noScan_Qty').textbox('textbox').attr('readonly',true);
|
|
$('#dlgDtls').dialog('open').dialog('center').dialog('setTitle',orderNo+':Detail');
|
|
}else{
|
|
$.messager.alert('Error',ret.errorMsg, 'error');
|
|
}
|
|
});
|
|
}
|
|
|
|
function deleteBadRoll(finalRollNo){
|
|
$.messager.confirm('Confirm','Do you want to delete the defective roll <b>'+finalRollNo+'</b> ?',function(r){
|
|
if (r){
|
|
$.post('/scanning/deleteQcRoll/do',{finalRollNo: finalRollNo},function(result){
|
|
if (result.success){
|
|
$('#dg').datagrid('reload'); // reload the user data
|
|
} else {
|
|
$.messager.alert('error',result.errorMsg, 'error');
|
|
}
|
|
},'json');
|
|
}
|
|
});
|
|
}
|
|
|
|
function downExcel() {
|
|
//拼接url
|
|
$("#query_rollNo").val($("#finalRollNo").val());
|
|
$("#query_jobId").val($("#jobId").val());
|
|
$("#query_dateFrom").val($("#createdDateFrom").val());
|
|
$("#query_dateTo").val($("#createdDateTo").val());
|
|
var url = "/scanning/down/currentRollList?query_rollNo="+$("#query_rollNo").val()+"&query_jobId="+$("#query_jobId").val()+
|
|
"&query_dateFrom="+$("#query_dateFrom").val()+"&query_dateTo="+$("#query_dateTo").val()+"&query_openNo=40";
|
|
//设置href
|
|
$("#downExcel").attr("href", url);
|
|
}
|
|
//trace
|
|
function downRollSerial(rollNo){
|
|
$.post("/scanning/downSlittingRollSerial", {rollNo: rollNo}, function(ret){
|
|
console.log(ret);
|
|
if(ret.success){
|
|
window.location.href="/prepress/downloadFileZip/"+ret.fileName;
|
|
}else{
|
|
$.messager.alert('Error',ret.errorMsg, 'error');
|
|
}
|
|
});
|
|
}
|
|
//未扫描报告
|
|
function unscannedReport(rollNo){
|
|
$.post("/scanning/unscannedReport", {rollNo: rollNo}, function(ret){
|
|
console.log(ret);
|
|
if(ret.success){
|
|
window.location.href="/prepress/downloadFileZip/"+ret.fileName;
|
|
}else{
|
|
$.messager.alert('Error',ret.errorMsg, 'error');
|
|
}
|
|
});
|
|
}
|
|
//结单
|
|
function closedRoll(orderNo,rowFrom,rowTo,slittingNo){
|
|
$.messager.confirm('Confirm','Close confirm ?',function(r){
|
|
if (r){
|
|
$.post('/scanning/closedSlitting',{orderNo: orderNo,rowFrom: rowFrom,rowTo: rowTo,slittingNo: slittingNo},function(result){
|
|
console.log(result);
|
|
if (result.success){
|
|
$('#dg').datagrid('reload');
|
|
} else {
|
|
$.messager.alert('Error',result.errorMsg, 'error');
|
|
}
|
|
},'json');
|
|
}
|
|
});
|
|
}
|
|
//批量结单
|
|
function closedAllRoll(){
|
|
$.messager.confirm('Confirm','Are you sure to close the SO existing empty roll ?',function(r){
|
|
if (r){
|
|
$.messager.progress({
|
|
title: 'Point',
|
|
msg: 'Please Wait……',
|
|
text: '',
|
|
interval: 300
|
|
});
|
|
$.post('/scanning/closedAllSlitting',{},function(result){
|
|
console.log(result);
|
|
$.messager.progress('close');//进度条关闭
|
|
if (result.success){
|
|
$('#dg').datagrid('reload');
|
|
} else {
|
|
$.messager.alert('Error',result.errorMsg, 'error');
|
|
}
|
|
},'json');
|
|
}
|
|
});
|
|
}
|
|
//强制结单
|
|
function forceClosed(){
|
|
var row = $('#dg').datagrid('getSelected');
|
|
if (row){
|
|
var slittingNo = row.slittingNo;
|
|
$.messager.confirm('Confirm','Force Close?',function(r){
|
|
if (r){
|
|
$.post('/scanning/forceClosedSlitting/',{slittingNo: slittingNo},function(result){
|
|
if (result.success){
|
|
$('#dg').datagrid('reload');
|
|
} else {
|
|
$.messager.alert('Error',result.errorMsg, 'error');
|
|
}
|
|
},'json');
|
|
}
|
|
});
|
|
}else{
|
|
$.messager.alert('Warning','Please select a row.', 'warning');
|
|
}
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
</@master.layout>
|
|
|