<!DOCTYPE html>
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
<head>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<title>生产任务单列表</title>
|
<meta name="renderer" content="webkit">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
<link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
|
<link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
|
<script src="../../../layuiadmin/layui/layui.js"></script>
|
<script src="../../../layuiadmin/Scripts/json2.js"></script>
|
<script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
|
<script src="../../../layuiadmin/Scripts/webConfig.js"></script>
|
<script src="../../../layuiadmin/PubCustom.js"></script>
|
</head>
|
<body>
|
<div class="layui-fluid">
|
<div class="layui-col-md12">
|
<div class="layui-card" style="padding: 1px">
|
<div class="layui-card-body" style="padding: 1px;">
|
<form class="layui-form" action="" lay-filter="component-form-group">
|
<div class="layui-collapse">
|
<div class="layui-colla-item">
|
<div class="layui-colla-title layui-inline">
|
<div class="layui-inline">
|
<span>更多</span>
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label">开始日期</label>
|
<div class="layui-input-block">
|
<input type="date" class="layui-input" id="HDate">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label">结束日期</label>
|
<div class="layui-input-block">
|
<input type="date" class="layui-input" id="HDate1">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label">单据号</label>
|
<div class="layui-input-block">
|
<input type="text" class="layui-input" name="WorkCenter" id="WorkCenter">
|
</div>
|
</div>
|
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
|
</button>
|
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">重置</button>
|
|
<div class="layui-inline">
|
<label class="layui-form-label">单据号</label>
|
<div class="layui-input-block">
|
<input type="text" class="layui-input" name="HBillno2" id="HBillno2" style="width:190px;">
|
</div>
|
</div>
|
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnResCnz" id="btnReSearch" style="padding:0 5px">重新同步</button>
|
|
|
|
<div class="layui-colla-content">
|
<div class="layui-inline">
|
<div class="layui-inline">
|
<span>其他条件></span>
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label">生产车间</label>
|
<div class="layui-input-block">
|
<select name="HDeptName" id="HDeptName" lay-verify="required" lay-search class="layui-input">
|
|
<!--动态渲染车间-->
|
</select>
|
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label">业务状态</label>
|
<div class="layui-input-block">
|
<select name="HStatus" id="HStatus" lay-verify="required" lay-search class="layui-input">
|
<option value="0" selected>全部</option>
|
<option value="计划">计划</option>
|
<option value="计划确认">计划确认</option>
|
<option value="下达">下达</option>
|
<option value="开工">开工</option>
|
<option value="完工">完工</option>
|
<option value="结案">结案</option>
|
</select>
|
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label">单据类型</label>
|
<div class="layui-input-block">
|
<input type="text" class="layui-input" name="HBillType" id="HBillType">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label">物料编码</label>
|
<div class="layui-input-block">
|
<input type="text" class="layui-input" name="HMaterName" id="HMaterName">
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<table class="" id="mainTable" lay-filter="mainTable"></table>
|
<script type="text/html" id="toolbarDemo">
|
<div class="layui-btn-container">
|
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_ShowBill"><i class="layui-icon layui-icon-form"></i>下推</button>
|
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>删除</button>
|
<button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>刷新</button>
|
<button type="button" class="layui-btn layui-btn-sm" lay-event="get-view"><i class="layui-icon layui-icon-tips"></i>预览</button>
|
<button type="button" class="layui-btn layui-btn-sm" lay-event="get-print"><i class="layui-icon layui-icon-print"></i>打印</button>
|
<button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>退出</button>
|
</div>
|
</script>
|
</form>
|
</div>
|
</div>
|
</div>
|
</div>
|
<script src="../../../layuiadmin/layui/layui.js"></script>
|
<script src="../../../layuiadmin/Scripts/json2.js"></script>
|
<script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
|
<script src="../../../layuiadmin/Scripts/webConfig.js"></script>
|
<script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
|
<script>
|
layui.config({
|
base: '../../../layuiadmin/' //静态资源所在路径
|
}).extend({
|
index: 'lib/index', //主入口模块
|
}).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
|
var $ = layui.$
|
, admin = layui.admin
|
, layer = layui.layer
|
, table = layui.table
|
, form = layui.form
|
, element = layui.element
|
, laypage = layui.laypage
|
, laydate = layui.laydate
|
//var sWhere = " 产品代码 = 'BX0002'";
|
var sWhere = "";
|
var sWhere = "";
|
|
|
//初始化界面
|
set_ClearBill();
|
//获取车间列
|
var HDeptName = '<option value="0" style="color:red;">全部车间</option>';
|
$.ajax({
|
type: "get",
|
url: GetWEBURL() + "/Sc_ICMOBill/GetHDeptList",
|
success: function (result) {
|
if (result.count == 1) { // 说明验证成功了,
|
var data = result.data;
|
for (var i = 0; i < data.length; i++) {
|
if (i == 0)
|
HDeptName += '<option style="color:blue;" value="' + data[i].HItemID + '" selected>' + data[i].HName + '</option>';
|
else
|
HDeptName += '<option style="color:blue;" value="' + data[i].HItemID + '">' + data[i].HName + '</option>';
|
|
}
|
$("#HDeptName").append(HDeptName);
|
form.render('select');
|
}
|
layer.closeAll("loading");
|
}
|
})
|
//#endregion
|
|
|
//头工具栏事件
|
table.on('toolbar(mainTable)', function (obj) {
|
switch (obj.event) {
|
//下推
|
case 'set_ShowBill': set_ShowBill();
|
break;
|
//删除
|
case 'set_DeleteBill': set_DeleteBill();
|
break;
|
case 'get-view': get_ViewReport();
|
break;
|
case 'get-print': get_PrintReport();
|
break;
|
//刷新
|
case 'get_Refresh': get_Refresh();
|
break;
|
//退出按钮
|
case 'get_Exit': Pub_Close(2);
|
break;
|
//打印
|
case 'btn-print':
|
get_PrintReport();
|
break;
|
};
|
});
|
|
//重新同步按钮
|
form.on('submit(btnResCnz)', function (data) {
|
set_ResCnz();
|
});
|
|
//重置按钮
|
form.on('submit(btnReSearch)', function (data) {
|
set_ClearQuery();
|
|
});
|
|
//查询按钮
|
form.on('submit(btnSearch)', function (data) {//选择仓位
|
|
get_FastQuery();
|
});
|
|
//#region 初始化界面
|
function set_ClearBill() {
|
//初始化表格
|
set_InitGrid();
|
//查询
|
get_FastQuery();
|
}
|
//#endregion
|
|
|
option_YQN = {
|
elem: '#mainTable'
|
, toolbar: '#toolbarDemo'
|
, height: 'full-50'
|
, page: true
|
, cellMinWidth: 90
|
, limit: 50
|
, limits: [50, 500, 5000, 20000]
|
, cols: [[
|
{ type: 'checkbox', fixed: 'left' }
|
, { field: 'hmainid', title: 'hmainid', sort: true, width: 165, hide: true }
|
, { field: 'HEntryID', title: 'HEntryID', sort: true, width: 165, hide: true }
|
|
, { field: '日期', title: '日期', sort: true, width: 120, hide: true }
|
, { field: '销售订单日期', title: '销售订单日期', sort: true, width: 120, hide: true }
|
, { field: '单据号', title: '单据号', sort: true, width: 170, hide: true }
|
|
, { field: '销售订单日期', title: '销售订单日期', sort: true, width: 200 }
|
, { field: '销售订单编号', title: '销售订单编号', sort: true, width: 200 }
|
, { field: '销售物料名称', title: '销售物料名称', sort: true, width: 200 }
|
, { field: '包装方式', title: '包装方式', sort: true, width: 150 }
|
, { field: '销售数量', title: '销售数量', sort: true, width: 150 }
|
, { field: '销售订单联系人', title: '销售订单联系人', sort: true, width: 150 }
|
, { field: '业务状态', title: '业务状态', sort: true, width: 150 }
|
|
, { field: '订单跟踪号', title: '订单跟踪号', sort: true, width: 120, hide: true }
|
, { field: 'HDeptID', title: 'HDeptID', hide: true }
|
, { field: '生产车间代码', title: '生产车间代码', width: 115, hide: true }
|
, { field: '生产车间', title: '生产车间', width: 115, hide: true }
|
, { field: 'HMaterID', title: 'HMaterID', hide: true }
|
, { field: '产品代码', title: '产品代码', width: 160, hide: true }
|
, { field: '产品名称', title: '产品名称', width: 160, hide: true }
|
, { field: '规格型号', title: '规格型号', width: 215, hide: true }
|
, { field: 'hunitid', title: 'hunitid', hide: true }
|
, { field: '计量单位代码', title: '计量单位代码', width: 115, hide: true }
|
, { field: '计量单位', title: '计量单位', hide: true }
|
|
, { field: 'hempid', title: 'hempid', hide: true }
|
, { field: '业务员代码', title: '业务员代码', width: 100, hide: true }
|
, { field: '业务员', title: '业务员', hide: true }
|
, { field: 'hcusid', title: 'hcusid', hide: true }
|
, { field: '客户代码', title: '客户代码', hide: true }
|
, { field: '客户', title: '客户', hide: true }
|
, { field: 'HCenterID', title: 'HCenterID', hide: true }
|
, { field: '工作中心代码', title: '工作中心代码', hide: true }
|
, { field: '工作中心', title: '工作中心', hide: true }
|
, { field: 'hbomid', title: 'hbomid', hide: true }
|
, { field: 'BOM单编码', title: 'BOM单编码', hide: true }
|
, { field: 'HRoutingInterID', title: 'HRoutingInterID', hide: true }
|
, { field: '工艺路线代码', title: '工艺路线代码', hide: true }
|
, { field: '工艺路线', title: '工艺路线', hide: true }
|
, { field: '计划开工日期', title: '计划开工日期', hide: true }
|
, { field: '计划完工日期', title: '计划完工日期', hide: true }
|
, { field: '最迟开工日期', title: '最迟开工日期', hide: true }
|
, { field: '最迟完工日期', title: '最迟完工日期', hide: true }
|
, { field: '齐套数量', title: '齐套数量', hide: true }
|
, { field: '计划生产数量', title: '计划生产数量', hide: true }
|
, { field: '关联数量', title: '关联数量', hide: true }
|
, { field: '未关联数量', title: '未关联数量', hide: true }
|
, { field: '表头备注', title: '表头备注', hide: true }
|
, { field: 'hsubid', title: 'hsubid', hide: true }
|
, { field: '源单单号', title: '源单单号', hide: true }
|
, { field: '源单主内码', title: '源单主内码', hide: true }
|
, { field: '源单子内码', title: '源单子内码', hide: true }
|
, { field: '制单人', title: '制单人', hide: true }
|
, { field: '制单日期', title: '制单日期', hide: true }
|
, { field: '审核人', title: '审核人', hide: true }
|
, { field: '审核日期', title: '审核日期', hide: true }
|
, { field: '修改人', title: '修改人', hide: true }
|
, { field: '修改日期', title: '修改日期', hide: true }
|
, { field: '关闭人', title: '关闭人', hide: true }
|
, { field: '关闭日期', title: '关闭日期', hide: true }
|
, { field: '作废人', title: '作废人', hide: true }
|
, { field: '作废日期', title: '作废日期', hide: true }
|
, { field: '行关闭人', title: '行关闭人', hide: true }
|
, { field: '关闭类型', title: '关闭类型', hide: true }
|
, { field: '单据类型', title: '单据类型', hide: true }
|
, { field: '计划跟踪号', title: '计划跟踪号', hide: true }
|
]]
|
};
|
|
function set_InitGrid() {
|
$("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
|
$("#HDate1").val(Format(new Date(), "yyyy-MM-dd"));
|
option = {
|
elem: '#mainTable'
|
, toolbar: '#toolbarDemo'
|
, height: 'full-50'
|
, page: true
|
, cellMinWidth: 90
|
, limit: 50
|
, limits: [50, 500, 5000, 20000]
|
, cols: [[
|
{ type: 'checkbox', fixed: 'left' }
|
, { field: 'hmainid', title: 'hmainid', sort: true, width: 165, hide: true }
|
, { field: 'HEntryID', title: 'HEntryID', sort: true, width: 165, hide: true }
|
, { field: '单据号', title: '单据号', sort: true, width: 170 }
|
, { field: '日期', title: '日期' }
|
, { field: '产品代码', title: '产品代码', width: 160 }
|
, { field: '产品名称', title: '产品名称', width: 160 }
|
, { field: '规格型号', title: '规格型号', width: 215 }
|
, { field: '生产车间代码', title: '生产车间代码', width: 115 }
|
, { field: '生产车间', title: '生产车间', width: 115 }
|
, { field: '计量单位代码', title: '计量单位代码', width: 115 }
|
, { field: '计量单位', title: '计量单位' }
|
, { field: '计划开工日期', title: '计划开工日期' }
|
, { field: '计划完工日期', title: '计划完工日期' }
|
, { field: '最迟开工日期', title: '最迟开工日期' }
|
, { field: '最迟完工日期', title: '最迟完工日期' }
|
, { field: '齐套数量', title: '齐套数量' }
|
, { field: '计划生产数量', title: '计划生产数量' }
|
, { field: '关联数量', title: '关联数量' }
|
, { field: '未关联数量', title: '未关联数量' }
|
, { field: '表头备注', title: '表头备注' }
|
, { field: '制单人', title: '制单人' }
|
, { field: '制单日期', title: '制单日期' }
|
, { field: '审核人', title: '审核人' }
|
, { field: '审核日期', title: '审核日期' }
|
, { field: '修改人', title: '修改人' }
|
, { field: '修改日期', title: '修改日期' }
|
, { field: '关闭人', title: '关闭人' }
|
, { field: '关闭日期', title: '关闭日期' }
|
, { field: '作废人', title: '作废人', hide: true }
|
, { field: '作废日期', title: '作废日期', hide: true }
|
, { field: '销售订单日期', title: '销售订单日期', sort: true, width: 120, hide: true }
|
|
, { field: '销售订单日期', title: '销售订单日期', sort: true, width: 200 }
|
, { field: '销售订单编号', title: '销售订单编号', sort: true, width: 200 }
|
, { field: '销售物料名称', title: '销售物料名称', sort: true, width: 200 }
|
, { field: '包装方式', title: '包装方式', sort: true, width: 150 }
|
, { field: '销售数量', title: '销售数量', sort: true, width: 150 }
|
, { field: '销售订单联系人', title: '销售订单联系人', sort: true, width: 150 }
|
, { field: '业务状态', title: '业务状态', sort: true, width: 150 }
|
, { field: '订单跟踪号', title: '订单跟踪号', sort: true, width: 120, hide: true }
|
, { field: 'HDeptID', title: 'HDeptID', hide: true}
|
, { field: 'HMaterID', title: 'HMaterID', hide: true }
|
, { field: 'hunitid', title: 'hunitid', hide: true }
|
, { field: 'hempid', title: 'hempid' , hide: true}
|
, { field: '业务员代码', title: '业务员代码', width: 100, hide: true}
|
, { field: '业务员', title: '业务员', hide: true}
|
, { field: 'hcusid', title: 'hcusid', hide: true }
|
, { field: '客户代码', title: '客户代码', hide: true }
|
, { field: '客户', title: '客户', hide: true }
|
, { field: 'HCenterID', title: 'HCenterID' , hide: true}
|
, { field: '工作中心代码', title: '工作中心代码', hide: true}
|
, { field: '工作中心', title: '工作中心', hide: true}
|
, { field: 'hbomid', title: 'hbomid' , hide: true}
|
, { field: 'BOM单编码', title: 'BOM单编码', hide: true }
|
, { field: 'HRoutingInterID', title: 'HRoutingInterID' , hide: true}
|
, { field: '工艺路线代码', title: '工艺路线代码', hide: true }
|
, { field: '工艺路线', title: '工艺路线', hide: true}
|
, { field: 'hsubid', title: 'hsubid' , hide: true}
|
, { field: '源单单号', title: '源单单号', hide: true}
|
, { field: '源单主内码', title: '源单主内码', hide: true}
|
, { field: '源单子内码', title: '源单子内码', hide: true}
|
, { field: '行关闭人', title: '行关闭人', hide: true}
|
, { field: '关闭类型', title: '关闭类型', hide: true}
|
, { field: '单据类型', title: '单据类型', hide: true}
|
, { field: '计划跟踪号', title: '计划跟踪号', hide: true}
|
]]
|
};
|
}
|
|
//#region 查询
|
function get_Display(sWhere) {
|
sWhere += " and HPRDORGID=" + sessionStorage["OrganizationID"] + " ";
|
var ajaxLoad = layer.load();
|
$.ajax({
|
url: GetWEBURL() + '/LEMS/MES_IF_ICMOBillList_Json',
|
type: "GET",
|
data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
|
success: function (data1) {
|
if (data1.count == 1) {
|
option.data = data1.data;
|
table.render(option);
|
layer.close(ajaxLoad);
|
//layer.alert("查询成功", { icon: 1 });
|
} else {
|
layer.close(ajaxLoad);
|
layer.alert(data1.code + data1.Message, { icon: 5 });
|
}
|
}, error: function () {
|
layer.close(ajaxLoad);
|
layer.alert("接口请求失败!", { icon: 5 });
|
}
|
});
|
|
}
|
//#endregion
|
|
//#region 快速过滤
|
function get_FastQuery() {
|
var HDate = $("#HDate").val();//开始日期
|
var HDate1 = $("#HDate1").val();//结束日期
|
var HOrderProcNO = $("#HOrderProcNO").val();//订单跟踪号
|
var WorkCenter = $("#WorkCenter").val();//单据号
|
var HMaterName = $("#HMaterName").val();//单据号
|
var HDeptName = $("#HDeptName").val();//单据号
|
var HStatus = $("#HStatus").val();//单据号
|
var HBillType = $("#HBillType").val();//单据类型
|
if (HDate) {
|
sWhere += " and 日期 >= '" + HDate + "'";
|
}
|
if (HDate1) {
|
sWhere += " and 日期 <= '" + HDate1 + "'";
|
}
|
if (HOrderProcNO) {
|
sWhere += " and 订单跟踪号 like '%" + HOrderProcNO + "%'";
|
}
|
if (WorkCenter) {
|
sWhere += " and 单据号 like '%" + WorkCenter + "%'";
|
}
|
if (HMaterName) {
|
sWhere += " and 产品代码 like '%" + HMaterName + "%'";
|
}
|
if (HDeptName && HDeptName!=0) {
|
sWhere += " and HDeptID = " + HDeptName ;
|
}
|
if (HStatus && HStatus != 0) {
|
sWhere += " and 业务状态 like '%" + HStatus + "%'";
|
}
|
if (HBillType) {
|
sWhere += " and 单据类型 like '%" + HBillType + "%'";
|
}
|
get_Display(sWhere);
|
sWhere = "";//调用接口后清空sWhere缓存
|
}
|
//#endregion
|
|
//#region 重置过滤条件方法
|
function set_ClearQuery() {
|
$("#HDate").val("");//开始日期
|
$("#HDate1").val("");//结束日期
|
$("#HOrderProcNO").val("");//订单跟踪号
|
$("#WorkCenter").val("");//单据号
|
$("#HDeptName").val("");//单据号
|
$("#HMaterName").val("");//单据号
|
$("#HDeptName").val("");//单据号
|
$("#HStatus").val("");//单据号
|
$("#btnSearch").click();
|
sWhere = "";
|
}
|
//#endregion
|
////进入页面显示的缓存列表
|
//var index0 = layer.load(0, { shade: false });
|
//$.ajax({
|
// //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
|
// url: GetWEBURL() + '/LEMS/MES_IF_ICMOBillList_Json',
|
// type: "GET",
|
// data: { "sWhere": sWhere },
|
// success: function (data1) {
|
// if (data1.count == 1) {
|
// option.data = data1.data;
|
// table.render(option);
|
// layer.close(index0);
|
// } else {
|
// layer.close(index0);
|
// layer.alert(data1.code + data1.Message, { icon: 5 });
|
// }
|
// }, error: function () {
|
// layer.close(index0);
|
// layer.alert("接口请求失败!", { icon: 5 });
|
// }
|
//});
|
//编辑单据
|
function set_ShowBill() {
|
var checkStatus = table.checkStatus('mainTable')
|
, data = checkStatus.data;
|
if (data.length === 1) {
|
var linterid = data[0].hmainid.toString();
|
var HEntryID = data[0].HEntryID.toString();
|
layer.open({
|
type: 2
|
, area: ['100%', '100%']
|
, title: '工序流转卡-编辑'
|
, shift: 0//弹出动画
|
, content: '../../车间管理/工序流转卡/Sc_ProcessExchangeBill.html?OperationType=2&linterid=' + linterid + '&HEntryID=' + HEntryID+'&HSouceBillType=3772'
|
})
|
} else {
|
layer.msg('请选择一行数据下推!');
|
}
|
}
|
|
//#region 删除
|
function set_DeleteBill() {
|
var checkStatus = table.checkStatus('mainTable')
|
, data = checkStatus.data;
|
if (checkStatus.data.length === 1) {
|
var hmainid = data[0].hmainid;
|
layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
|
var wait = layer.load();
|
//逻辑删除方法
|
$.ajax({
|
url: GetWEBURL() + '/Sc_ICMOBill/DeltetSc_ICMOReportBill',
|
type: "GET",
|
data: { "HInterID": hmainid, "user": sessionStorage["HUserName"]},
|
success: function (result) {
|
if (result.count == 1) {
|
layer.msg(result.Message, { icon: 1 }, function () {
|
// 得到frame索引
|
var index = layer.getFrameIndex(window.name);
|
//关闭当前frame
|
layer.close(wait);
|
//修改为功后刷新界面
|
window.location.reload();
|
});
|
} else {
|
layer.alert(result.code + result.Message, { icon: 5 });
|
layer.close(wait);
|
}
|
}, error: function () {
|
layer.alert("接口请求失败!", { icon: 5 });
|
layer.close(wait);
|
}
|
});
|
})
|
}
|
else {
|
layer.msg('请选择一行数据删除!');
|
}
|
|
}
|
//#endregion
|
|
//重新同步按钮
|
function set_ResCnz() {
|
var HBillno2 = $('#HBillno2').val();
|
$.ajax({
|
url: GetWEBURL() + '/Cg_POOrderBill/Resynchronize',
|
type: "GET",
|
data: { "HBillNo": HBillno2, "HBillType": 3710 },
|
success: function (result) {
|
if (result.count == 1) {
|
layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
|
// 得到frame索引
|
var index = layer.getFrameIndex(window.name);
|
//关闭当前frame
|
layer.close(index);
|
//修改为功后刷新界面
|
window.location.reload();
|
});
|
|
} else {
|
layer.alert(result.code + result.Message, { icon: 5 });
|
}
|
}, error: function () {
|
layer.close(wait);
|
layer.alert("接口请求失败!", { icon: 5 });
|
}
|
});
|
}
|
//#endregion
|
|
//#region 刷新
|
function get_Refresh() {
|
set_ClearQuery();
|
get_Display(sWhere);
|
}
|
//#endregion
|
|
//#region 打印
|
//预览
|
function get_ViewReport() {
|
var checkStatus = table.checkStatus('mainTable')
|
, data = checkStatus.data;
|
var PrintIds = "";
|
if (checkStatus.data.length >= 1) {
|
for (var i = 0; i < data.length; i++) {
|
PrintIds += data[i].hmainid+"0"+data[i].HEntryID + ","
|
}
|
PrintIds = PrintIds.substring(0, PrintIds.length - 1);
|
layer.open({
|
type: 2
|
, area: ['50%', '50%']
|
, title: '打印模版选择'
|
, shade: 0.6 //遮罩透明度
|
, maxmin: false //允许全屏最小化
|
, anim: 0 //0-6的动画形式,-1不开启
|
, content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + PrintIds + '&MyMsg=' + data[0].hmainid.toString() + '&Type=HIcmoBill', 'yes']
|
, resize: false
|
})
|
}
|
else {
|
layer.msg('请选择至少一行数据打印!');
|
}
|
}
|
|
//打印
|
function get_PrintReport() {
|
var checkStatus = table.checkStatus('mainTable')
|
, data = checkStatus.data;
|
var PrintIds = "";
|
if (checkStatus.data.length >= 1) {
|
for (var i = 0; i < data.length; i++) {
|
PrintIds += data[i].hmainid + "-" + data[i].HEntryID + ","
|
}
|
PrintIds = PrintIds.substring(0, PrintIds.length - 1);
|
layer.open({
|
type: 2
|
, area: ['50%', '50%']
|
, title: '打印模版选择'
|
, shade: 0.6 //遮罩透明度
|
, maxmin: false //允许全屏最小化
|
, anim: 0 //0-6的动画形式,-1不开启
|
, content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + PrintIds + '&MyMsg=' + data[0].hmainid.toString() + '&Type=HIcmoBill', 'yes']
|
, resize: false
|
})
|
}
|
else {
|
layer.msg('请选择至少一行数据打印!');
|
}
|
}
|
|
//#endregion
|
|
//以上是layui模块
|
});
|
|
</script>
|
|
</body>
|
</html>
|