|
|
@@ -529,6 +529,9 @@
|
|
|
{field: 'print_date', title: '打印时间', align: 'center', sortable: true, width: 80},
|
|
|
{field: 'p_nums', title: '打印次数', align: 'right', sortable: true, width: 50},
|
|
|
{field: 'smalltotal', title: '小件数量', align: 'center', sortable: true, width: 80},
|
|
|
+ {field: 'l_weight', title: '大件重量', align: 'center', sortable: true, width: 80,
|
|
|
+ formatter: function(value,row,index){return value/100;}
|
|
|
+ },
|
|
|
{field: 'type', title: '打印状态', align: 'center', sortable: true, width: 80},
|
|
|
{field: 'l_status', title: '导出状态', align: 'center', sortable: true, width: 80,
|
|
|
formatter: function(value,row,index){
|
|
|
@@ -869,7 +872,7 @@
|
|
|
return;
|
|
|
}
|
|
|
$('#reptWin3').window('open'); // open a window
|
|
|
- $('#reptForm3').form('load', {'reptQty3': ''});
|
|
|
+ $('#reptForm3').form('load', {'reptQty3': '','reptQty33': ''});
|
|
|
}
|
|
|
|
|
|
$('#type').change(function () {
|
|
|
@@ -1697,8 +1700,6 @@
|
|
|
$('#type1').html("<span class='msg onError'>" + errorMsg + "</span>");
|
|
|
return
|
|
|
}
|
|
|
- console.log(reptQty)
|
|
|
- console.log(type)
|
|
|
var idList = new Array();
|
|
|
var chechRows = supTgGrid.datagrid('getChecked');
|
|
|
for (var i in chechRows) {
|
|
|
@@ -1718,6 +1719,122 @@
|
|
|
success: function (result) {
|
|
|
if(result.code==0){
|
|
|
$.messager.alert('系统提示','修改成功','success');
|
|
|
+ supTgGrid = $('#supTgGrid').datagrid({
|
|
|
+ url: 'index.php?s=/Admin/NewQcode/GetLargeLabelApi',
|
|
|
+ method: 'get',
|
|
|
+ toolbar: '#supTgGridToolbar',
|
|
|
+ rownumbers: true, // 如果为true,则显示一个行号列。
|
|
|
+ singleSelect: false, // 如果为true,则只允许选择一行。
|
|
|
+ nowrap: false, // 如果为true,则在同一行中显示数据。设置为true可以提高加载性能。
|
|
|
+ fit: true, // datagrid自适应宽高
|
|
|
+ fitColumns: true, // 使列自动展开/收缩到合适的数据表格宽度。
|
|
|
+ autoRowHeight: false, //定义设置行的高度,根据该行的内容。设置为false可以提高负载性能。
|
|
|
+ pagination: false, // 显示分页工具条
|
|
|
+ sortName: 'id', // 排序字段
|
|
|
+ sortOrder: 'asc', // 排序方式
|
|
|
+ pageSize: 20,//初始化页面大小
|
|
|
+ pageList: [20, 30, 50, 100, 500],// 初始化页面大小选择列表
|
|
|
+ columns: [[
|
|
|
+ {field: 'ck', checkbox: true},
|
|
|
+ {field: 'code_cp1', title: '当前托盘号', align: 'center', sortable: true, width: 50},
|
|
|
+ {field: 'code', title: '标签代码', align: 'center', sortable: true, width: 350},
|
|
|
+ {field: 'print_date', title: '打印时间', align: 'center', sortable: true, width: 80},
|
|
|
+ {field: 'p_nums', title: '打印次数', align: 'right', sortable: true, width: 50},
|
|
|
+ {field: 'smalltotal', title: '小件数量', align: 'center', sortable: true, width: 80},
|
|
|
+ {field: 'l_weight', title: '大件重量', align: 'center', sortable: true, width: 80,
|
|
|
+ formatter: function(value,row,index){return value/100;}
|
|
|
+ },
|
|
|
+ {field: 'type', title: '打印状态', align: 'center', sortable: true, width: 80},
|
|
|
+ {field: 'l_status', title: '导出状态', align: 'center', sortable: true, width: 80,
|
|
|
+ formatter: function(value,row,index){
|
|
|
+ if(value==0){
|
|
|
+ return '<span style="color:red;font-size: 14px">未导出</span>';
|
|
|
+ }else{
|
|
|
+ return '<span style="color:green;font-size: 14px">已导出</span>';
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]],
|
|
|
+ onLoadError: function (data) {
|
|
|
+ //console.log(data);
|
|
|
+ $.messager.alert('系统提示', '数据加载错误,请刷新重试!', 'error');
|
|
|
+ },
|
|
|
+
|
|
|
+ onClickRow: function (rowIndex, rowData) {
|
|
|
+
|
|
|
+ //点击大标签,弹出小标签列表
|
|
|
+ $('#supTgGridS').html("");
|
|
|
+ //console.log(rowData);
|
|
|
+ if(bt_is_load) {
|
|
|
+ bt_is_load=false;
|
|
|
+ var large_id = rowData.id;
|
|
|
+ var large_tuopan = rowData.code_cp1;
|
|
|
+ $('#large_id').val(large_id);
|
|
|
+ $.ajax({
|
|
|
+ url: "index.php?s=/Admin/NewQcode/GetSmallLabelApi",
|
|
|
+ data: "large_id=" + large_id + "&large_tuopan=" + large_tuopan,
|
|
|
+ dataType: "json",
|
|
|
+ type: "get",
|
|
|
+ success: function (data) {
|
|
|
+ //console.log(data);
|
|
|
+ var result = "<tr style='background: #f5f5f5;'>" +
|
|
|
+ "<td width='60%' align='center'>标签代码</td>" +
|
|
|
+ "<td width='8%' align='center'>当前序号</td>" +
|
|
|
+ "<td width='8%' align='center'>标签状态</td>" +
|
|
|
+ "<td width='8%' align='center'>打印次数</td>" +
|
|
|
+ "<td width='8%' align='center'>是否导出</td>" +
|
|
|
+ "<td width='8%' align='center'>操作</td>" +
|
|
|
+ "</tr>";
|
|
|
+ data.forEach(function (item, index) {
|
|
|
+ if (item.status == '0') {
|
|
|
+ tip = "正常"
|
|
|
+ color = "green";
|
|
|
+ } else {
|
|
|
+ tip = "已删除"
|
|
|
+ color = "red";
|
|
|
+ }
|
|
|
+ result += "<tr data_id='" + index + "'>" +
|
|
|
+ "<td >" + item.code + "</td>" +
|
|
|
+ "<td align='center' >" + item.l_flow+ "</td>" +
|
|
|
+ "<td align='center' style='color:" + color + "'>" + tip + "</td>" +
|
|
|
+ "<td align='center' >" + item.p_nums + "</td>" +
|
|
|
+ "<td align='center'>" +
|
|
|
+ "<button style='color:green;' class='yes' onclick='yes(" + item.id + "," + rowData.id + ")'>是</button>" +
|
|
|
+ "<button class='no' style='color:red;' onclick='no(" + item.id + "," + rowData.id + ")' >否</button>" +
|
|
|
+ "</td>" +
|
|
|
+ "<td align='center'>" +
|
|
|
+ "<button style='color:green;' class='yes' onclick='p_small(" + item.id + "," + index + ")'>打印</button>" +
|
|
|
+ "</td>" +
|
|
|
+ "</tr>"
|
|
|
+ });
|
|
|
+ $('#supTgGridS').append(result);
|
|
|
+ bt_is_load=true;
|
|
|
+ $('#win').window({
|
|
|
+ closed: false,
|
|
|
+ collapsible: false,
|
|
|
+ minimizable: false,
|
|
|
+ maximizable: false
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ error: function (error) {
|
|
|
+ // alert("error");
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ onBeforeLoad: function (param) {
|
|
|
+ //console.log(param);
|
|
|
+ var selecteRow = $('#supBthGrid').datagrid('getSelected');
|
|
|
+ $('#supTgGrid').datagrid('clearChecked');
|
|
|
+ if (selecteRow == null) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
error: function (XMLHttpRequest, textStatus, errorThrown) {
|