<!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">
|
<!--引用layui样式文件-->
|
<link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
|
<link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
|
<!--引用layui js文件-->
|
<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>
|
<script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
|
<!--自定义样式-->
|
<style>
|
.maintitle {
|
background-color: #1492ff;
|
color: #fff;
|
padding: 5px 10px;
|
border: none;
|
border-radius: 4px;
|
}
|
|
.title {
|
border-left: 4px solid #1492ff;
|
padding-left: 6px;
|
margin: 20px 10px 4px;
|
font-size: 16px;
|
color: #333;
|
}
|
|
.buttom_box_little {
|
width: 60px;
|
height: 36px;
|
color: #fff;
|
background-color: #1492ff;
|
border-radius: 4px;
|
border: none;
|
margin: 10px;
|
}
|
|
.layui-input {
|
width: 93%;
|
}
|
|
.layui-inline, img {
|
display: block;
|
vertical-align: middle
|
}
|
|
.layui-input, .layui-textarea {
|
display: inline-block;
|
width: 100%;
|
padding-left: 10px;
|
}
|
|
.laydate-time-list ol {
|
overflow-x: hidden !important;
|
overflow-y: auto !important;
|
}
|
|
.layui-form-label {
|
padding: 9px 5px;
|
width: 85px;
|
}
|
|
.layui-input-block {
|
margin-left: 85px;
|
min-height: 36px;
|
}
|
</style>
|
</head>
|
|
<body>
|
<div class="layui-fluid" style="padding: 0;">
|
<div class="layui-card" style="padding: 15px;background-color: #efefef;">
|
<div class="layui-card-body" style="padding: 1px;">
|
<form class="layui-form" action="" lay-filter="formData" id="formData" style="background-color:white;">
|
<div class="maintitle">工序进站接收单</div>
|
<div class="layui-tab layui-tab-card" lay-filter="TabTest">
|
<ul class="layui-tab-title">
|
<li class="layui-this">单据信息</li>
|
<li>其他信息</li>
|
<li>制单信息</li>
|
<li>明细信息</li>
|
</ul>
|
<div class="layui-tab-content">
|
<!--单据信息-->
|
<div class="layui-tab-item layui-show">
|
<div class="layui-form-item" style="padding-top: 10px;">
|
<div class="layui-row">
|
<label class="layui-form-label" style="width: 85px;"><span style="color:red;">*</span>条形码</label>
|
<div class="layui-input-block" style="margin-left: 100px;width:46%;">
|
<input type="text" name="HBarCode" id="HBarCode" lay-verify="required" placeholder="请键入后回车" autocomplete="off" class="layui-input">
|
<button type="button" lay-submit="" class="layui-btn layui-btn-primary" lay-filter="QueDin" style="width: 70px; background-color: #1492ff;color:white">确定</button>
|
</div>
|
</div>
|
</div>
|
<div class="layui-form-item" style="padding-top: 10px;">
|
<div class="layui-row">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;"><span style="color:red;">*</span>单据号:</label>
|
<div class="layui-input-block" style="margin-left: 95px;">
|
<input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly>
|
<input type="hidden" name="HInterID" id="HInterID">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;"><span style="color:red;">*</span>单据日期:</label>
|
<div class="layui-input-block" style="margin-left: 95px;">
|
<input type="text" class="layui-input" name="HDate" id="HDate" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">生产组织:</label>
|
<div class="layui-input-block" style="margin-left: 95px;">
|
<input type="text" name="HPRDOrg" id="HPRDOrg" class="layui-input" style="background-color:#efefef4d;" readonly>
|
<input type="hidden" name="HPRDOrgID" id="HPRDOrgID" value="0">
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;"><span style="color:red;">*</span>生产订单号:</label>
|
<div class="layui-input-block" style="margin-left: 95px;">
|
<input type="text" class="layui-input" name="HICMOBillNo" id="HICMOBillNo" style="background-color:#efefef4d;" readonly>
|
<input type="hidden" name="HICMOInterID" id="HICMOInterID">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">订单数量:</label>
|
<div class="layui-input-block" style="margin-left: 95px;">
|
<input type="text" class="layui-input" name="HICMOQty" id="HICMOQty" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">订单跟踪号:</label>
|
<div class="layui-input-block" style="margin-left: 95px;">
|
<input type="text" class="layui-input" name="HOrderProcNO" id="HOrderProcNO" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;"><span style="color:red;">*</span>产品代码:</label>
|
<div class="layui-input-block" style="margin-left: 95px;">
|
<input type="text" name="HMaterNumber" id="HMaterNumber" class="layui-input" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">产品名称:</label>
|
<div class="layui-input-block" style="margin-left: 95px;">
|
<input type="text" name="HMaterName" id="HMaterName" class="layui-input" style="background-color:#efefef4d;" readonly>
|
<input type="hidden" name="HMaterID" id="HMaterID">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">规格型号:</label>
|
<div class="layui-input-block" style="margin-left: 95px;">
|
<input type="text" name="HMaterModel" id="HMaterModel" class="layui-input" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;"><span style="color:red;">*</span>流转卡号</label>
|
<div class="layui-input-block" style="margin-left: 95px;">
|
<input type="text" class="layui-input" name="HProcExchBillNo" id="HProcExchBillNo" style="background-color:#efefef4d;" readonly>
|
<input type="hidden" class="layui-input" name="HProcExchHinteID" id="HProcExchHinteID">
|
</div>
|
</div>
|
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;padding: 9px 5px;"><span style="color:red;">*</span>当前工序</label>
|
<div class="layui-input-block">
|
<input type="text" class="layui-input" name="HProcName" id="HProcName" style="width: 80%; background-color: #efefef4d;" readonly>
|
<button class="layui-btn layui-btn-primary" type="button" lay-submit="" lay-filter="CurrPro-BT" id="SerialNum-BT" style="width: 40px;">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
|
</button>
|
<input type="hidden" name="HProcID" id="HProcID" value="0">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">流转卡数量</label>
|
<div class="layui-input-block" style="margin-left: 95px;">
|
<input type="text" class="layui-input" name="HPlanQty" id="HPlanQty" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;"><span style="color:red;">*</span>流水号</label>
|
<div class="layui-input-block" style="margin-left: 95px;">
|
<input type="text" class="layui-input" name="HProcNo" id="HProcNo" placeholder="请键入后回车">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;padding: 9px 5px;">生产资源</label>
|
<div class="layui-input-block">
|
<input type="text" class="layui-input" name="HSourceName" id="HSourceName" style="width: 80%; background-color: #efefef4d; display: inline-block;" readonly>
|
<button type="button" class="layui-btn layui-btn-primary" lay-submit="" lay-filter="ProductionResources-BT" id="ProductionResources-BT" style="width: 40px;">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
|
</button>
|
<input type="hidden" name="HSourceID" id="HSourceID" value="0">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;padding: 9px 5px;">生产班组</label>
|
<div class="layui-input-block">
|
<input type="text" class="layui-input" name="HGroupName" id="HGroupName" style="width: 80%; background-color: #efefef4d; display: inline-block;" readonly>
|
<button type="button" class="layui-btn layui-btn-primary" lay-submit="" lay-filter="ProductionTeam-BT" id="ProductionTeam-BT" style="width: 40px; ">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
|
</button>
|
<input type="hidden" name="HGroupID" id="HGroupID" value="0">
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;padding: 9px 5px;"><span style="color:red;">*</span>接收人</label>
|
<div class="layui-input-block">
|
<input type="text" class="layui-input" name="HEmpNumber" id="HEmpNumber" style="width: 80%;">
|
<input type="text" class="layui-input" name="HEmpName" id="HEmpName" style="margin-left:10px;width: 80%; background-color: #efefef4d; display: inline-block;" readonly>
|
<button type="button" class="layui-btn layui-btn-primary" lay-submit="" lay-filter="HEmployeeID-BT" id="HEmployeeID-BT" style="width: 40px;">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
|
</button>
|
<input type="hidden" name="HEmpID" id="HEmpID" value="0">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;"><span style="color:red;">*</span>接收数量</label>
|
<div class="layui-input-block" style="margin-left: 95px;">
|
<input type="text" class="layui-input" name="HQty" id="HQty" value="0">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;padding: 9px 5px;"><span style="color:red;">*</span>工作中心</label>
|
<div class="layui-input-block">
|
<input type="text" class="layui-input" name="HCenterName" id="HCenterName" style="width: 80%; background-color: #efefef4d; display: inline-block;" readonly>
|
<button type="button" class="layui-btn layui-btn-primary" lay-submit="" lay-filter="HWorkingProcedure-BT" id="HWorkingProcedure-BT" style="width: 40px;">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
|
</button>
|
<input type="hidden" name="HCenterID" id="HCenterID" value="0">
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">备注</label>
|
<div class="layui-input-block" style="margin-left: 95px;">
|
<input type="text" class="layui-input" name="HRemark" id="HRemark">
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<!--其他信息-->
|
<div class="layui-tab-item">
|
<div class="layui-form-item" style="padding-top: 10px;">
|
<div class="layui-row">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">接收件数</label>
|
<div class="layui-input-block" style="margin-left: 95px;">
|
<input type="text" class="layui-input" name="HPieceQty" id="HPieceQty" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;padding: 9px 5px;">生产资源2</label>
|
<div class="layui-input-block">
|
<input type="text" class="layui-input" name="HSourceName" id="HSourceName" style="width: 80%; background-color: #efefef4d; display: inline-block;" readonly>
|
<button type="button" class="layui-btn layui-btn-primary" lay-submit="" lay-filter="ProductionResources-BT" id="ProductionResources-BT" style="width: 40px;">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
|
</button>
|
<input type="hidden" name="HSourceID" id="HSourceID" value="0">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;padding: 9px 5px;">生产资源3</label>
|
<div class="layui-input-block">
|
<input type="text" class="layui-input" name="HSourceName" id="HSourceName" style="width: 80%; background-color: #efefef4d; display: inline-block;" readonly>
|
<button type="button" class="layui-btn layui-btn-primary" lay-submit="" lay-filter="ProductionResources-BT" id="ProductionResources-BT" style="width: 40px">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
|
</button>
|
<input type="hidden" name="HSourceID" id="HSourceID" value="0">
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;padding: 9px 5px;">生产资源4</label>
|
<div class="layui-input-block">
|
<input type="text" class="layui-input" name="HSourceName" id="HSourceName" style="width: 80%; background-color: #efefef4d; display: inline-block;" readonly>
|
<button type="button" class="layui-btn layui-btn-primary" lay-submit="" lay-filter="ProductionResources-BT" id="ProductionResources-BT" style="width: 40px;">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
|
</button>
|
<input type="hidden" name="HSourceID" id="HSourceID" value="0">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;padding: 9px 5px;">生产资源5</label>
|
<div class="layui-input-block">
|
<input type="text" class="layui-input" name="HSourceName" id="HSourceName" style="width: 80%; background-color: #efefef4d; display: inline-block;" readonly>
|
<button type="button" class="layui-btn layui-btn-primary" lay-submit="" lay-filter="ProductionResources-BT" id="ProductionResources-BT" style="width: 40px;">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
|
</button>
|
<input type="hidden" name="HSourceID" id="HSourceID" value="0">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">进站时间</label>
|
<div class="layui-input-block" style="margin-left: 95px;">
|
<input type="text" class="layui-input" name="HStationInTime" id="HStationInTime" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<!--制单信息-->
|
<div class="layui-tab-item">
|
<div class="layui-form-item" style="padding-top: 10px;">
|
<div class="layui-row">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">制单人</label>
|
<div class="layui-input-block" style="margin-left: 95px;">
|
<input type="text" class="layui-input" name="HMaker" id="HMaker" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">修改人</label>
|
<div class="layui-input-block" style="margin-left: 95px;">
|
<input type="text" class="layui-input" name="HUpDater" id="HUpDater" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">审核人</label>
|
<div class="layui-input-block" style="margin-left: 95px;">
|
<input type="text" class="layui-input" name="HChecker" id="HChecker" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">制单日期</label>
|
<div class="layui-input-block" style="margin-left: 95px;">
|
<input type="text" class="layui-input" name="HMakeDate" id="HMakeDate" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">修改日期</label>
|
<div class="layui-input-block" style="margin-left: 95px;">
|
<input type="text" class="layui-input" name="HUpDateDate" id="HUpDateDate" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">审核日期</label>
|
<div class="layui-input-block" style="margin-left: 95px;">
|
<input type="text" class="layui-input" name="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">关闭人</label>
|
<div class="layui-input-block" style="margin-left: 95px;">
|
<input type="text" class="layui-input" name="HCloseMan" id="HCloseMan" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">作废人</label>
|
<div class="layui-input-block" style="margin-left: 95px;">
|
<input type="text" class="layui-input" name="HDeleteMan" id="HDeleteMan" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">关闭日期</label>
|
<div class="layui-input-block" style="margin-left: 95px;">
|
<input type="text" class="layui-input" name="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">作废日期</label>
|
<div class="layui-input-block" style="margin-left: 95px;">
|
<input type="text" class="layui-input" name="HDeleteDate" id="HDeleteDate" style="background-color:#efefef4d;" readonly>
|
</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="btn-AddLine"><i class="layui-icon layui-icon-form"></i>增行</button>
|
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit"><i class="layui-icon layui-icon-form"></i>编辑</button>
|
</div>
|
</script>-->
|
<script type="text/html" id="xuhao">
|
{{d.LAY_TABLE_INDEX+1}}
|
</script>
|
<script type="text/html" id="barDemo">
|
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
|
</script>
|
</div>
|
</div>
|
<!--明细信息-->
|
<div class="layui-tab-item" lay-filter="formData" id="formData" style="background-color:white;">
|
<div class="layui-form-item" style="padding-top: 10px;">
|
<table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="layer-footer" style="text-align: center;">
|
<button type="button" lay-submit="" class="layui-btn buttom_box_little" lay-filter="Saver" id="Saver">提交</button>
|
<button type="button" lay-submit="" class="layui-btn buttom_box_little" lay-filter="Add">新增</button>
|
<button type="button" lay-submit="" class="layui-btn buttom_box_little" lay-filter="Cancel" id="Cancel">退出</button>
|
</div>
|
<!--隐藏字段-->
|
<input type="hidden" name="lngICMOEntryID" id="lngICMOEntryID">
|
<input type="hidden" name="lngBillKey" id="lngBillKey" value="0">
|
<input type="hidden" name="lngBillSubKey" id="lngBillSubKey" value="0">
|
<input type="hidden" name="HMaker" id="HMaker"><!--制单人-->
|
<input type="hidden" name="eventType" id="eventType" value="Add">
|
<input type="hidden" name="HMainInterID" id="HMainInterID" value="0">
|
</form>
|
</div>
|
</div>
|
</div>
|
|
<script>
|
layui.config({
|
base: '../../../layuiadmin/' //静态资源所在路径
|
}).extend({
|
index: 'lib/index' //主入口模块
|
}).use(['index', 'form', 'laydate', 'table', 'element'], function () {
|
var $ = layui.$
|
, admin = layui.admin
|
, layer = layui.layer
|
, table = layui.table
|
, form = layui.form
|
, laydate = layui.laydate
|
, element = layui.element;
|
var params = get_UrlVars();
|
var option = [];
|
var titleData = [];
|
//#region 初始化页面
|
laydate.render({
|
elem: '#HBeginDate'
|
, type: 'datetime'
|
});
|
laydate.render({
|
elem: '#HEndDate'
|
, type: 'datetime'
|
});
|
laydate.render({
|
elem: '#HDate'
|
, type: 'datetime'
|
});
|
laydate.render({
|
elem: '#HMakeDate'
|
, type: 'datetime'
|
});
|
laydate.render({
|
elem: '#HUpDateDate'
|
, type: 'datetime'
|
});
|
laydate.render({
|
elem: '#HCheckDate'
|
, type: 'datetime'
|
});
|
laydate.render({
|
elem: '#HDeleteDate'
|
, type: 'datetime'
|
});
|
//#endregion
|
|
if (typeof (params[params[0]]) == "undefined") {
|
var OperationType = 1;//操作类型
|
var closeType = 2; //关闭类型
|
} else if (params[params[0]] == 2) { //工序进站接收单
|
var OperationType = params[params[0]];//操作类型
|
var HBillNo = params[params[1]];//源单单号
|
var HProcNo = params[params[2]];//流水号
|
|
var HBarCode = HBillNo;//条形码
|
var sProcNo = HProcNo;//流水号
|
|
if (HBarCode != "undefined" && sProcNo != "undefined") {
|
$("#HBarCode").val(HBarCode);
|
$('#HProcNo').val(sProcNo);
|
txtHBarCode_KeyDown(HBarCode);
|
txtHProcNo_KeyDown(HBarCode, sProcNo);
|
}
|
} else {
|
var OperationType = params[params[0]];//操作类型
|
var linterid = params[params[1]];//源单id
|
var HSouceBillType = params[params[2]];//源单类型
|
var HBillNo = params[params[3]];//单据号
|
var closeType = params[params[4]]; //关闭类型
|
}
|
|
//判断是否新增
|
if (OperationType == 1 || OperationType == 2) {
|
//获取最大单据号
|
var ajaxLoad = layer.load();
|
$.ajax({
|
url: GetWEBURL() + "/Web/GetMAXNum",
|
type: "GET",
|
data: { "HBillType": '3790' },
|
success: function (d) {
|
//console.log(d.data);
|
$("#HInterID").val(d.data[0].HInterID);
|
$("#HBillNo").val(d.data[0].HBillNo);
|
//PicUpload();
|
layer.close(ajaxLoad);
|
}
|
, error: function () {
|
layer.close(ajaxLoad);
|
layer.msg("获取单据号失败,请刷新重试!");
|
}
|
});
|
$('#set_CheckBill').addClass("layui-btn-disabled").attr("disabled", true);//审核按钮默认禁用
|
$('#set_AbandonCheck').addClass("layui-btn-disabled").attr("disabled", true);//反审核按钮默认禁用
|
$('#set_Modify').addClass("layui-btn-disabled").attr("disabled", true);//修改按钮禁用
|
GetDefValByUser();
|
}
|
else if (OperationType == 3) {
|
$("#eventType").val("Modify");
|
RoadBillMain(linterid);
|
$('#set_Modify').addClass("layui-btn-disabled").attr("disabled", true);//修改按钮禁用
|
$('#Saver').removeClass("layui-btn-disabled").attr("disabled", false);//保存按钮启用
|
$('#set_CheckBill').addClass("layui-btn-disabled").attr("disabled", true);//审核按钮默认禁用
|
$('#set_AbandonCheck').addClass("layui-btn-disabled").attr("disabled", true);//反审核按钮默认禁用
|
//RoadBillSub(linterid);
|
}
|
else if (OperationType == 4) {
|
RoadBillMain(linterid);
|
$('#Saver').addClass("layui-btn-disabled").attr("disabled", true);//保存后保存按钮禁用
|
$('#set_CheckBill').removeClass("layui-btn-disabled").attr("disabled", false);//审核按钮启用
|
$('#set_AbandonCheck').removeClass("layui-btn-disabled").attr("disabled", false);//反审核按钮启用
|
//RoadBillSub(linterid);
|
}
|
|
//进入页面默认光标在条形码上
|
$("#HBarCode").focus();
|
|
//#region 触发事件:包括form.on(){}格式的所有点击事件、选择事件等
|
|
//#region 确定按钮
|
form.on('submit(QueDin)', function (data) {//
|
var HBarCode = $('#HBarCode').val();
|
|
if (!HBarCode) {
|
layer.msg("条形码不能为空!")
|
return;
|
}
|
txtHBarCode_KeyDown(HBarCode);
|
|
});
|
//#endregion
|
|
//#region 新增按钮
|
form.on('submit(Add)', function () {//提交
|
layer.confirm('新增后页面数据将消失?', { icon: 3, title: '提示' }, function (index) {
|
location.replace('MES_StationInBill_PDA.html?OperationType=1&linterid=0&HSouceBillType=&HBillNo=&closeType=2');
|
});
|
})
|
//#endregion
|
|
//#region 退出按钮
|
form.on('submit(Cancel)', function () {
|
layer.confirm('您确定要退出吗?', { icon: 3, title: '提示' }, function (index) {
|
if (OperationType == 1) {
|
Pub_Close(closeType);
|
} else if (OperationType == 3) {
|
Pub_Close(1);
|
} else if (OperationType == 4) {
|
Pub_Close(1);
|
} else if (OperationType == 2) {
|
Pub_Close(1);
|
}
|
});
|
})
|
//#endregion
|
|
//#region 修改按钮
|
form.on('submit(set_Modify)', function () {//提交
|
//编辑前判断
|
set_ShowBillJudge();
|
})
|
//#endregion
|
|
//#region 提交按钮
|
form.on('submit(Saver)', function (data) {//提交
|
//var tableData = data.field;
|
if ($("#lngBillSubKey").val() == 0) {
|
layer.msg("流水号没有选择!请输入流水号后回车!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
return;
|
}
|
//console.log(data.field);
|
var oMain = JSON.stringify(data.field) + ";" + sessionStorage["HUserName"];
|
//var oMain = data.field;
|
var HUserName = sessionStorage["HUserName"];
|
var index = layer.load();
|
$.ajax({
|
type: "POST",
|
url: GetWEBURL() + "/Cj_StationInBill/AddBill",
|
async: true,
|
data: { "oMain": oMain },
|
dataType: "json",
|
success: function (result) {
|
if (result.count == 1) {
|
layer.close(index);
|
layer.msg("提交成功");
|
|
$("#HQty").attr("disabled", "true");
|
if (result.Verify == "Y") {
|
location.replace('MES_StationInBill_PDA.html?OperationType=1&linterid=0&HSouceBillType=&HBillNo=&closeType=2');
|
} else {
|
//保存后浏览
|
ReRoadBillMain();
|
}
|
}
|
else {
|
layer.close(index);
|
layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
}
|
},
|
error: function (err) {
|
layer.close(index);
|
layer.msg("错误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
}
|
});
|
});
|
//#endregion
|
|
//#region 审核按钮
|
form.on('submit(set_CheckBill)', function () {
|
//审核方法
|
set_CheckBill();
|
})
|
//#endregion
|
|
//#region 反审核按钮
|
form.on('submit(set_AbandonCheck)', function () {
|
//反审核方法
|
set_AbandonCheck();
|
})
|
//#endregion
|
|
//#endregion
|
|
//#region 本页面所有被调用的方法
|
|
//#region 保存后浏览方法
|
function ReRoadBillMain() {
|
location.replace('MES_StationInBill_PDA.html?OperationType=4&linterid=' + $("#HInterID").val() + '&HSouceBillType=');
|
}
|
//#endregion
|
|
//#region 加载表头
|
function RoadBillMain(linterid)//加载表头
|
{
|
var index = layer.load();
|
$.ajax({
|
url: GetWEBURL() + "/Cj_StationInBill/GetStationInBill",
|
type: "GET",
|
data: { "HInterID": linterid },
|
success: function (result) {
|
var data = result.data[0];
|
txtHBarCode_KeyDown(data.HBarCode);
|
txtHProcNo_KeyDown(data.HBarCode, data.HProcNo);
|
form.val("formData", { //HGroupName
|
"HInterID": data.HInterID,
|
"HBillNo": data.HBillNo,
|
"HBarCode": data.HBarCode,
|
"HProcNo": data.HProcNo,
|
"HQty": data.HQty,
|
"HGroupID": data.HGroupID,
|
"HGroupName": data.HGroupName,
|
"HSourceID": data.HSourceID,
|
"HSourceName": data.HSourceName,
|
"HEmpID": data.HEmpID,
|
"HEmpName": data.HEmpName,
|
"HRemark": data.HRemark
|
});
|
if (data.是否审核 == "true") {
|
$('#set_CheckBill').addClass("layui-btn-disabled").attr("disabled", true);//审核按钮禁用
|
$('#set_AbandonCheck').removeClass("layui-btn-disabled").attr("disabled", false);//反审核按钮启用
|
} else {
|
$('#set_AbandonCheck').addClass("layui-btn-disabled").attr("disabled", true);//反审核按钮禁用
|
$('#set_CheckBill').removeClass("layui-btn-disabled").attr("disabled", false);//审核按钮启用
|
}
|
if (OperationType == 3) {
|
$('#set_CheckBill').addClass("layui-btn-disabled").attr("disabled", true);//审核按钮禁用
|
$('#set_AbandonCheck').addClass("layui-btn-disabled").attr("disabled", true);//反审核按钮禁用
|
}
|
//PicUpload();
|
layer.close(index);
|
}
|
, error: function () {
|
layer.close(index);
|
layer.msg("接口请求失败");
|
}
|
})
|
}
|
//#endregion
|
|
//#region 通过登录用户获取默认值
|
function GetDefValByUser() {
|
var index = layer.load();
|
$.ajax({
|
url: GetWEBURL() + "/Cj_StationInBill/GetDefValByUser",
|
type: "GET",
|
data: { "Czybm": sessionStorage["Czybm"], "Czymc": sessionStorage["HUserName"] },
|
success: function (result) {
|
var data = result.data[0];
|
|
form.val("formData", {
|
"HSourceID": data.HSourceID,
|
"HSourceName": data.生产资源名称,
|
"HGroupID": data.HGroupID,
|
"HGroupName": data.生产班组名称,
|
"HCenterID": data.HWorkCenterID,
|
"HCenterName": data.工作中心名称,
|
"HEmpID": data.HEmpID,
|
"HEmpNumber": data.操作员代码,
|
"HEmpName": data.操作员名称
|
});
|
layer.close(index);
|
}
|
, error: function () {
|
layer.close(index);
|
layer.msg("接口请求失败");
|
}
|
})
|
}
|
//#endregion
|
|
//#region 编辑前判断
|
function set_ShowBillJudge() {
|
var wait = layer.load();
|
$.ajax({
|
type: "GET",
|
url: GetWEBURL() + "/Cj_StationInBill/set_ShowBillJudge", //方法所在页面和方法名
|
data: { "HBillNo": HBillNo },
|
success: function (result) {
|
if (result.count == 1) {
|
location.replace('MES_StationInBill_PDA.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=&HBillNo=' + HBillNo);
|
} else {
|
layer.alert(result.Message, { icon: 5 });
|
}
|
layer.close(wait);
|
}, error: function () {
|
layer.close(wait);
|
layer.alert("接口请求失败!", { icon: 5 });
|
}
|
});
|
}
|
//#endregion
|
|
//#region 审核方法
|
function set_CheckBill() {
|
var wait = layer.load();
|
$.ajax({
|
type: "GET",
|
url: GetWEBURL() + "/Cj_StationInBill/set_CheckBill",
|
data: { "HInterID": linterid, "CurUserName": sessionStorage["HUserName"] },
|
success: function (result) {
|
if (result.count == 1) {
|
layer.alert(result.Message, { icon: 6 });
|
$('#set_CheckBill').addClass("layui-btn-disabled").attr("disabled", true);//审核按钮禁用
|
$('#set_AbandonCheck').removeClass("layui-btn-disabled").attr("disabled", false);//反审核按钮启用
|
} else {
|
layer.alert(result.Message, { icon: 5 });
|
}
|
layer.close(wait);
|
}, error: function () {
|
layer.close(wait);
|
layer.alert("接口请求失败!", { icon: 5 });
|
}
|
});
|
}
|
//#endregion
|
|
//#region 反审核方法
|
function set_AbandonCheck() {
|
var wait = layer.load();
|
$.ajax({
|
type: "GET",
|
url: GetWEBURL() + "/Cj_StationInBill/set_AbandonCheck",
|
data: { "HInterID": linterid, "CurUserName": sessionStorage["HUserName"] },
|
success: function (result) {
|
if (result.count == 1) {
|
layer.alert(result.Message, { icon: 6 });
|
$('#set_AbandonCheck').addClass("layui-btn-disabled").attr("disabled", true);//反审核按钮禁用
|
$('#set_CheckBill').removeClass("layui-btn-disabled").attr("disabled", false);//审核按钮启用
|
} else {
|
layer.alert(result.Message, { icon: 5 });
|
}
|
layer.close(wait);
|
}, error: function () {
|
layer.close(wait);
|
layer.alert("接口请求失败!", { icon: 5 });
|
}
|
});
|
}
|
//#endregion
|
|
//#endregion
|
|
|
//文件上传
|
//function PicUpload() {
|
// //多图片上传
|
// //多文件列表示例
|
// var ProImgByList = $('#ProImgByList')
|
// , uploadListIns = upload.render({
|
// elem: '#testList'
|
|
// , url: GetWEBURL() + "/Cj_StationOutBill/UploadFile1"
|
// , accept: 'file'
|
// , multiple: true
|
// , auto: false
|
// //, bindAction: '#testListAction' //按扭绑定
|
// , data: { "HBillNo": $("#HBillNo").val(), "HRemark": $("#HRemark").val(), "HUserName": sessionStorage["HUserName"] }
|
// , choose: function (obj) {
|
// var files = this.files = obj.pushFile(); //将每次选择的文件追加到文件队列
|
// //读取本地文件
|
// obj.preview(function (index, file, result) {
|
// var tr = $(['<tr id="upload-' + index + '">'
|
// , '<td>' + file.name + '</td>'
|
// , '<td>' + (file.size / 1014).toFixed(1) + 'kb</td>'
|
// , '<td>等待上传</td>'
|
// , '<td>'
|
// , '<button class="layui-btn layui-btn-xs demo-reload ">上传</button>'
|
// , '<button class="layui-btn layui-btn-xs layui-btn-danger demo-delete">删除</button>'
|
// , '</td>'
|
// , '</tr>'].join(''));
|
|
// //单个重传
|
// tr.find('.demo-reload').on('click', function () {
|
// obj.upload(index, file);
|
// return false;
|
// });
|
|
// //删除
|
// tr.find('.demo-delete').on('click', function () {
|
// delete files[index]; //删除对应的文件
|
// tr.remove();
|
// uploadListIns.config.elem.next()[0].value = ''; //清空 input file 值,以免删除后出现同名文件不可选
|
// });
|
|
// ProImgByList.append(tr);
|
// });
|
// }
|
// , done: function (res, index, upload) {
|
// if (res.code == 1) { //上传成功
|
// var tr = ProImgByList.find('tr#upload-' + index)
|
// , tds = tr.children();
|
// tds.eq(2).html('<span style="color: #5FB878;">上传成功</span>');
|
// tds.eq(3).html(''); //清空操作
|
// //tds.eq(3).find('.demo-reload').addClass('layui-hide'); //隐藏上传
|
// return delete this.files[index]; //删除文件队列已经上传成功的文件
|
// }
|
// this.error(index, upload);
|
// }
|
// , error: function (index, upload) {
|
// var tr = ProImgByList.find('tr#upload-' + index)
|
// , tds = tr.children();
|
// tds.eq(2).html('<span style="color: #FF5722;">上传失败[检查文件名及文件格式]</span>');
|
// tds.eq(3).find('.demo-reload').removeClass('layui-hide'); //显示上传
|
// }
|
// });
|
//}
|
|
//获取编辑时,已上传的文件列表
|
if (HBillNo != null || HBillNo != undefined) {
|
var ProImgByList = $('#ProImgByList')
|
$.ajax({
|
url: GetWEBURL() + '/Cj_StationOutBill/Filelist',
|
type: "GET",
|
data: { "HBillNo": HBillNo },
|
success: function (data1) {
|
if (data1.count == 1) {
|
var index = 0;
|
for (var i = 0; i < data1.data.length; i++) {
|
var tr = $(['<tr id="upload-' + i + '">'
|
, '<td style="display:none">' + data1.data[i].HItemID + '</td>'
|
, '<td style="display:none">' + data1.data[i].HSourceBillNo + '</td>'
|
, '<td>' + data1.data[i].HFileName + '</td>'
|
, '<td>' + (data1.data[i].HFileSize / 1014).toFixed(1) + 'kb</td>'
|
, '<td style="color: #5FB878;">上传成功</td>'
|
, '<td style="display:none">' + data1.data[i].url + '</td>'
|
, '<td>'
|
, '<button class="layui-btn layui-btn-xs demo-dowload" type="button" id="deltefile" onclick="javascript:dowload(this)"><i class="layui-icon layui-icon-download-circle layuiadmin-button-btn"></i>下载</button>'
|
, '<button class="layui-btn layui-btn-xs layui-btn-danger demo-delete" type="button" id="deltefile" onclick="javascript:toManager(this)"><i class="layui-icon layui-icon-delete layuiadmin-button-btn"></i>删除</button>'
|
, '</td>'
|
, '</tr>'].join(''));
|
|
$('#ProImgByList').append(tr);
|
}
|
} else {
|
layer.alert(data1.code + data1.Message, { icon: 5 });
|
}
|
}, error: function () {
|
layer.alert("接口请求失败!", { icon: 5 });
|
}
|
});
|
|
}
|
|
//流转卡是否扫描标记
|
var HProcExchBillNoFlag = false;
|
//初始基本信息赋值
|
$("#HStationInTime").val(Pub_Format(new Date(), "yyyy-MM-dd hh:mm:ss"));
|
$("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
|
//$("#HEmpID").val(sessionStorage["Czybm"]);
|
//$("#HEmp").val(sessionStorage["HUserName"]);
|
$("#HMaker").val(sessionStorage["HUserName"]);
|
|
|
|
//条形码回车方法
|
$('#HBarCode').on('keydown', function (event) {
|
var HBarCode = $('#HBarCode').val();
|
if (event.keyCode == 13) {
|
if (!HBarCode) {
|
layer.msg("条形码不能为空!")
|
return;
|
}
|
txtHBarCode_KeyDown(HBarCode);
|
}
|
});
|
|
function txtHBarCode_KeyDown(HBarCode) {
|
var index = layer.load();
|
$.ajax({
|
url: GetWEBURL() + "/Cj_StationEntrustInBill/txtHBarCode_KeyDown",
|
type: "GET",
|
data: { "HBarCode": HBarCode },
|
success: function (result) {
|
if (result.count == 1) {
|
var data = result.data[0];
|
form.val("formData", { //formTest 即 class="layui-form" 所在元素属性 lay-filter="" 对应的值
|
"HICMOInterID": data.hicmointerid,
|
"lngICMOEntryID": data.lngICMOEntryID,
|
"HICMOBillNo": data.任务单号,
|
"HMaterID": data.HMaterID,
|
"HMaterName": data.产品,
|
"HMaterNumber": data.产品代码,
|
"HMaterModel": data.规格型号,
|
"HPieceQty": data.流转卡数量,
|
"HPlanQty": data.流转卡数量,
|
"HProcExchBillNo": data.单据号,
|
"HProcExchHinteID": data.hmainid,
|
"HICMOQty": data.任务单数量,
|
"lngBillKey": data.hmainid,
|
"HOrderProcNO": data.订单跟踪号,
|
"HPRDOrg": data.组织,
|
"HPRDOrgID": data.组织
|
});
|
$("#HBarCode").attr("readonly", "readonly");//条形码只读
|
$("#HBarCode").css("background-color", "#efefef4d");
|
HProcExchBillNoFlag = true;
|
|
var HProcExchHinteID = $('#HProcExchHinteID').val();
|
|
var HInterID = data.hmainid;
|
//自动匹配流水号
|
$.ajax({
|
url: GetWEBURL() + "/Sc_StationInBill/autoGetProcNo",
|
type: "GET",
|
data: { "HUserName": sessionStorage["HUserName"], "HInterID": HInterID },
|
success: function (data1) {
|
if (data1.count == 1) {
|
var data = data1.data[0];
|
form.val("formData", { //formTest 即 class="layui-form" 所在元素属性 lay-filter="" 对应的值
|
"lngBillSubKey": data.hsubid,
|
"HProcName": data.工序,
|
"HProcID": data.工序ID,
|
"HProcNo": data.流水号,
|
"HCenterName": data.工作中心,
|
"HCenterID": data.HCenterID
|
});
|
$("#HProcNo").attr("readonly", "readonly");
|
$("#HProcNo").css("background-color", "#efefef4d");
|
}
|
}
|
})
|
|
//动态列
|
$.ajax({
|
url: GetWEBURL() + "/Cj_StationEntrustInBill/DisBillEntryList",
|
type: "GET",
|
data: { "HProcExchHinteID": HProcExchHinteID },
|
success: function (data1) {
|
if (data1.count == 1) {
|
var data = [];
|
var col = [];
|
//给空的数组赋值
|
for (var key in data1.list) {
|
data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
|
}
|
//在列表左边添加勾选框
|
col.push({ type: 'checkbox', fixed: 'left' });
|
for (var i = 0; i < data.length; i++) {
|
// if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
|
if ($.inArray(data[i].name, titleData) > -1) {
|
col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列
|
}
|
else {
|
switch (data[i].Type) {
|
//int
|
case 'DateTime':
|
col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 });
|
break;
|
default:
|
col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
|
}
|
}
|
}
|
}
|
option = {
|
elem: '#mainTable',
|
url: GetWEBURL() + "/Cj_StationEntrustInBill/DisBillEntryList",
|
type: "GET",
|
//, cellMinWidth: 80
|
toolbar: '#toolbarDemo'
|
, where: { HProcExchHinteID: HProcExchHinteID }
|
, cols: [col]
|
, height: 500
|
}
|
table.render(option)
|
}
|
})
|
//layer.close(index);
|
//set_InitGrid();
|
//table.render(option);
|
|
//刷新表格数据
|
//DisPlay_HideColumn();
|
|
layer.close(index);
|
}
|
else {
|
layer.close(index);
|
layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
}
|
},
|
error: function (err) {
|
layer.close(index);
|
layer.msg("接口请求失败!" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
}
|
});
|
}
|
|
//流水号(工序号)回车方法
|
$('#HProcNo').on('keydown', function (event) {
|
var sProcNo = $('#HProcNo').val();
|
var sBillNo = $('#HBarCode').val();
|
if (event.keyCode == 13) {
|
if (!HProcExchBillNoFlag) {
|
layer.msg("流转卡没有扫描,或者没有按回车键,请扫描流转卡或者在流转卡文本框中按回车键!");
|
return;
|
}
|
txtHProcNo_KeyDown(sBillNo, sProcNo);
|
}
|
});
|
|
function txtHProcNo_KeyDown(sBillNo, sProcNo) {
|
var index = layer.load();
|
$.ajax({
|
url: GetWEBURL() + "/Cj_StationInBill/txtHProcNo_KeyDown",
|
type: "GET",
|
data: { "sBillNo": sBillNo, "sProcNo": sProcNo },
|
success: function (result) {
|
if (result.count == 1) {
|
var data = result.data[0];
|
form.val("formData", { //formTest 即 class="layui-form" 所在元素属性 lay-filter="" 对应的值
|
"lngBillSubKey": data.hsubid,
|
"HProcName": data.工序,
|
"HProcID": data.HProcID,
|
"HCenterName": data.工作中心,
|
"HCenterID": data.HCenterID
|
});
|
$("#HProcNo").attr("readonly", "readonly");
|
$("#HProcNo").css("background-color", "#efefef4d");
|
layer.close(index);
|
}
|
else {
|
layer.close(index);
|
layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
}
|
},
|
error: function (err) {
|
layer.close(index);
|
layer.msg("接口请求失败!" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
}
|
});
|
}
|
|
//#region 页面快捷键弹窗—工序流转卡关联数量
|
$('body').on('keydown', function (e) {
|
var HinteID = $("#HProcExchHinteID").val();
|
if (e.key == "F7") {
|
if (HinteID == "" || HinteID == null || HinteID == undefined) {
|
layer.alert("请先输入条形码或扫描条形码", { icon: 5 });
|
}
|
else {
|
layer.open({
|
type: 2,
|
skin: 'layui-layer-rim', //加上边框
|
title: '工序流转卡关联数量',
|
closeBtn: 1,
|
shift: 2,
|
area: ['90%', '90%'],
|
maxmin: true,
|
content: ['../工序进站接收单/Cj_StationQty.html?HInterID=' + HinteID, 'yes'],
|
end: function () {
|
}
|
});
|
}
|
}
|
})
|
//#endregion
|
|
//选择生产班组弹窗
|
form.on('submit(ProductionTeam-BT)', function () {//选择生产班组
|
layer.open({
|
type: 2
|
, area: ['80%', '80%']
|
, title: '本站工序'
|
, shade: 0.6 //遮罩透明度
|
, maxmin: true //允许全屏最小化
|
, anim: 0 //0-6的动画形式,-1不开启
|
, content: ['../../Baseset/基础资料/Gy_GetProductionTeamList.html', 'yes']
|
, resize: false
|
, cancel: function (index, layero) {
|
}
|
})
|
});
|
|
//选择生产资源弹窗
|
form.on('submit(ProductionResources-BT)', function () {//生产资源
|
console.log($('#HProcNo').val())
|
layer.open({
|
type: 2
|
, area: ['80%', '80%']
|
, title: '生产资源'
|
, shade: 0.6 //遮罩透明度
|
//, maxmin: true //允许全屏最小化
|
, anim: 0 //0-6的动画形式,-1不开启
|
, content: ['../../Baseset/基础资料/Gy_GetProductionResourcesList.html', 'yes']
|
, resize: false
|
, cancel: function (index, layero) {
|
}
|
})
|
});
|
//选择接收人
|
form.on('submit(HEmployeeID-BT)', function () {
|
layer.open({
|
type: 2
|
, area: ['80%', '80%']
|
, title: '职员列表'
|
, shade: 0.6 //遮罩透明度
|
, maxmin: true //允许全屏最小化
|
, anim: 0 //0-6的动画形式,-1不开启
|
, content: ['../../Baseset/基础资料/Gy_EmployeeList.html?Type=HWorker', 'yes']
|
, resize: false
|
, cancel: function (index, layero) {
|
}
|
})
|
});
|
|
//
|
$('#HEmpNumber').on('keydown', function (event) {
|
var HEmpNumber = $("#HEmpNumber").val();
|
if (event.keyCode == 13) {
|
$.ajax({
|
url: GetWEBURL() + '/Cj_StationInBill/GetMessageByEmpNumber',
|
type: "GET",
|
data: { "HEmpNumber": HEmpNumber },
|
success: function (data1) {
|
if (data1.count == 1) {
|
$("#HEmpNumber").val(data1.data[0].HNumber);
|
$("#HEmpName").val(data1.data[0].HName);
|
$("#HEmpID").val(data1.data[0].HItemID);
|
layer.alert($("#HEmpID").val());
|
}
|
else {
|
layer.alert(data1.code + data1.Message, { icon: 5 });
|
}
|
}, error: function () {
|
layer.alert("接口请求失败!", { icon: 5 });
|
}
|
});
|
}
|
});
|
|
//选择工作中心弹窗
|
form.on('submit(HWorkingProcedure-BT)', function () {//选择工作中心
|
layer.open({
|
type: 2
|
, area: ['80%', '80%']
|
, title: '工作中心'
|
, shade: 0.6 //遮罩透明度
|
//, maxmin: true //允许全屏最小化
|
, anim: 0 //0-6的动画形式,-1不开启
|
, content: ['../../Baseset/基础资料/Gy_WorkCenterList.html', 'yes']
|
, resize: false
|
, cancel: function (index, layero) {
|
}
|
})
|
//layer.msg('禁止选择');
|
});
|
|
//选择当前工序弹窗
|
form.on('submit(CurrPro-BT)', function () {//选择当前工序
|
layer.open({
|
type: 2
|
, area: ['80%', '80%']
|
, title: '当前工序'
|
, shade: 0.6 //遮罩透明度
|
//, maxmin: true //允许全屏最小化
|
, anim: 0 //0-6的动画形式,-1不开启
|
, content: ['../../Baseset/基础资料/Gy_ProcList.html', 'yes']
|
, resize: false
|
, cancel: function (index, layero) {
|
}
|
})
|
//layer.msg('禁止选择');
|
});
|
|
//选择供应商
|
form.on('submit(btnSearchSup)', function () {
|
layer.msg('禁止选择');
|
});
|
//以上为layui模块
|
});
|
|
//返回生产班组
|
function GetProductionTeamValue(obj) {
|
$("#HGroupName").val(obj[0].班组);
|
$("#HGroupID").val(obj[0].HItemID);
|
}
|
|
//返回生产资源
|
function GetProductionResourcesValue(obj) {
|
$("#HSourceName").val(obj[0].生产资源);
|
$("#HSourceID").val(obj[0].HItemID);
|
}
|
//返回操作员
|
function GetHWorkerValue(obj) {
|
$("#HEmpName").val(obj[0].HName);
|
$("#HEmpID").val(obj[0].HItemID);
|
}
|
//返回工作中心
|
function GetWorkCenterValue(obj) { //返回工作中心
|
$("#HCenterName").val(obj[0].工作中心);
|
$("#HCenterID").val(obj[0].HItemID);
|
}
|
//返回当前工序
|
function GetHProcValue(obj) { //返回当前工序
|
$("#HProcName").val(obj[0].工序);
|
$("#HProcID").val(obj[0].HItemID);
|
}
|
</script>
|
</body>
|
</html>
|