<!DOCTYPE html>
|
<html>
|
<head>
|
<meta 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.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
<link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
|
<link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
|
<script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
|
<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>
|
<style>
|
.main-btn { /*头部主按钮*/
|
padding: 0 2px; /*调整按钮左右空隙大小*/
|
height: 30px;
|
line-height: 30px;
|
}
|
|
.btn-title {
|
font-size: 16px;
|
}
|
/* 防止下拉框的下拉列表被隐藏---必须设置--- */
|
.layui-table-cell {
|
overflow: visible !important;
|
}
|
/* 使得下拉框与单元格刚好合适 */
|
td .layui-form-select {
|
margin-top: -10px;
|
margin-left: -15px;
|
margin-right: -15px;
|
}
|
|
.layui-form-item .layui-inline {
|
margin-top: 0px;
|
margin-bottom: 5px;
|
margin-right: 0px;
|
}
|
|
.layui-form-label {
|
width: 25%;
|
}
|
|
</style>
|
</head>
|
<body>
|
<div class="layui-fluid" style="padding: 0;">
|
<div class="layui-card" style="padding: 5px;">
|
<div class="layui-card-body" style="padding: 1px;">
|
<form class="layui-form" lay-filter="component-form-group" action="">
|
<div class="layui-card-header">
|
<div class="layui-btn-group">
|
<button type="button" id="set_SaveBill" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btnSave">保存</button>
|
<button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Cancel">退出</button>
|
<button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btn_print">打印</button>
|
<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="HideColumn" id="HideColumn">隐藏列设置</button>
|
</div>
|
</div>
|
<div class="layui-tab" lay-filter="tab-POStockInBill">
|
<ul class="layui-tab-title" lay-filter="tab-all">
|
<li lay-id="1" style="padding:1px;" class="layui-this">基本信息</li>
|
<li lay-id="5" style="padding:1px;">羊毛信息</li>
|
<li lay-id="2" style="padding:1px;">其他信息</li>
|
<li lay-id="3" style="padding:1px;">检移票信息</li>
|
<li lay-id="4" style="padding:1px;">制单信息</li>
|
</ul>
|
<div class="layui-tab-content">
|
<!--基本信息-->
|
<div class="layui-tab-item layui-show">
|
<div class="layui-form-item" style="padding-top: 3px;">
|
<div class="layui-row">
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">单据号</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly>
|
<input type="hidden" name="HInterID" id="HInterID" value="0">
|
<input type="hidden" name="HPRDORGID" id="HPRDORGID" lay-verify="HPRDORGID"><!--HSTOCKORGID-->
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">日期</label>
|
<div class="layui-input-inline">
|
<input type="datetime" class="layui-input" name="HDate" id="HDate">
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">染色要求</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HColorRemark" id="HColorRemark" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<!--<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">订单跟踪号</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HOrderProcNO" id="HOrderProcNO" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>-->
|
<!--<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">图号版本</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HPicNumVer" id="HPicNumVer" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>-->
|
</div>
|
<div class="layui-row">
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">产品名称</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HMaterName2" id="HMaterName2" onmouseover="this.title=this.value" style="float: left; background-color: #efefef4d; display: inline-block;" readonly>
|
<input type="hidden" name="HMaterID2" id="HMaterID2" value="0">
|
<!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchMater2" id="btnSearchMater2" style="width: 40px;">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
|
</button>-->
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">产品代码</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HMaterNumber2" id="HMaterNumber2" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">产品规格</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HMaterModel2" id="HMaterModel2" onmouseover="this.title=this.value" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<!--<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">总装图号</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HPicNumAssemble" id="HPicNumAssemble" onmouseover="this.title=this.value" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>-->
|
</div>
|
<div class="layui-row">
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">生产订单号</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HICMOBillNo" id="HICMOBillNo" style="background-color:#efefef4d;" readonly>
|
<input type="hidden" name="HICMOInterID" id="HICMOInterID" value="0">
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">流转卡数量</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HQty" id="HQty">
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">单位</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HUnitName" id="HUnitName" style="background-color:#efefef4d;" readonly>
|
<input type="hidden" name="HUnitID" id="HUnitID" value="0">
|
</div>
|
</div>
|
<!--<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">材质</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HMaterTexture" id="HMaterTexture">
|
</div>
|
</div>-->
|
</div>
|
<div class="layui-row">
|
<!--<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">计划开工日期</label>
|
<div class="layui-input-inline">
|
<input type="date" class="layui-input" name="HPlanBeginDate" id="HPlanBeginDate" style="padding-left: 32px;">
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">计划完工日期</label>
|
<div class="layui-input-inline">
|
<input type="date" class="layui-input" name="HPlanEndDate" id="HPlanEndDate" style="padding-left: 32px;">
|
</div>
|
</div>-->
|
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">选单号</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="textBox2" id="textBox2" style="float: left; background-color: #efefef4d; display: inline-block;" readonly>
|
<!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchICMOBill" id="btnSearchICMOBill" style="width: 40px;">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
|
</button>-->
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">工艺路线</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="RoutingBill" id="RoutingBill" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
|
<input type="hidden" class="layui-input" name="HRoutingBillID" id="HRoutingBillID">
|
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnRoutingBill" id="btnRoutingBill" style="width: 40px;">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
|
</button>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">幅宽</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HWidth" id="HWidth" style="float: left; background-color: #efefef4d; display: inline-block;" readonly>
|
</div>
|
</div>
|
|
<!--<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">成品编号</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HProductNum" id="HProductNum" onmouseover="this.title=this.value">
|
</div>
|
</div>-->
|
</div>
|
|
<div class="layui-row">
|
<!--<div class="layui-col-xs6 layui-inline">
|
<label class="layui-form-label" style="width:12.5%">备注</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HRemark" id="HRemark" placeholder="请输入内容" onmouseover="this.title=this.value" style="width:610px;">
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">日计划工单选单号</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HWorkBillSortNo" id="HWorkBillSortNo" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
|
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchWorkBillSort" id="btnSearchWorkBillSort" style="width: 40px;">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
|
</button>
|
</div>
|
</div>-->
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">辅数量</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HAuxQty" id="HAuxQty" style="float: left;" value="0">
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">拆分号</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HSplitNo" id="HSplitNo" style="float: left;" value="0">
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">辅助单位</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HAuxUnitName" id="HAuxUnitName" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
|
<input type="hidden" class="layui-input" name="HAuxUnit" id="HAuxUnit" value="0">
|
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHAuxUnit" id="btnHAuxUnit" style="width: 40px;">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
|
</button>
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<!--<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">补料原因</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HExplanation" id="HExplanation" placeholder="请输入内容" onmouseover="this.title=this.value">
|
</div>
|
</div>-->
|
<!--<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">补料标记</label>
|
<div class="layui-input-block">
|
<input type="checkbox" name="HBLFlag" id="HBLFlag" lay-skin="primary" title="" checked="">
|
</div>
|
</div>-->
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">克重</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HWeight" id="HWeight" style="float: left; background-color: #efefef4d; display: inline-block;" readonly>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">业务员</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HEmpName" id="HEmpName" style="float: left; background-color: #efefef4d; display: inline-block;" readonly>
|
<input type="hidden" class="layui-input" name="HEmpID" id="HEmpID">
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">客户</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HCusNames" id="HCusNames" style="float: left; background-color: #efefef4d; display: inline-block;" readonly>
|
<input type="hidden" class="layui-input" name="HCusID" id="HCusID">
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-col-xs6 layui-inline">
|
<label class="layui-form-label" style="width:12.5%">备注</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HRemark" id="HRemark" placeholder="请输入内容" onmouseover="this.title=this.value" style="width: 610px;">
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-col-xs6 layui-inline">
|
<label class="layui-form-label" style="width:12.5%">备注2</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HRemark2" id="HRemark2" placeholder="请输入内容" onmouseover="this.title=this.value" style="width: 610px;">
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-col-xs6 layui-inline">
|
<label class="layui-form-label" style="width:12.5%">底部备注</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HRemark3" id="HRemark3" placeholder="请输入内容" onmouseover="this.title=this.value" style="width: 610px;">
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<!--羊毛信息-->
|
<div class="layui-tab-item">
|
<div class="layui-form-item">
|
<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: 120px;">
|
<input type="text" class="layui-input" name="HHeight" id="HHeight">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">寸数组织</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HInches" id="HInches">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">全毛长</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HAl1Long" id="HAl1Long">
|
</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: 120px;">
|
<input type="text" class="layui-input" name="HDensity" id="HDensity">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">毛纱名称及规格</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HTela" id="HTela">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">底丝</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HUnderTela" id="HUnderTela">
|
</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: 120px;">
|
<input type="text" class="layui-input" name="HSizing" id="HSizing">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">交货日期</label>
|
<div class="layui-input-inline">
|
<input type="date" class="layui-input" name="HSellDate" id="HSellDate" style="padding-left: 32px;">
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<!--其他信息-->
|
<div class="layui-tab-item">
|
<div class="layui-form-item">
|
<div class="layui-row">
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">生产车间</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HWorkShopName" id="HWorkShopName" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
|
<input type="hidden" name="HWorkShopID" id="HWorkShopID" value="0">
|
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="HWorkShopList" id="HWorkShopList" style="width: 40px;">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
|
</button>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">项目编号</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HProjectNum" id="HProjectNum" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">委外加工单位</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HSupName" id="HSupName" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
|
<input type="hidden" name="HSupID" id="HSupID" value="0">
|
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchHSup" id="btnSearchHSup" style="width: 40px;">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
|
</button>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">订单跟踪号</label>
|
<div class="layui-input-inline">
|
<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-col-xs3 layui-inline">
|
<label class="layui-form-label">子件名称</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HMaterName" id="HMaterName" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
|
<input type="hidden" name="HMaterID" id="HMaterID" value="0">
|
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchMater" id="btnSearchMater" style="width: 40px;">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
|
</button>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">子件代码</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">子件规格</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HMaterModel1" id="HMaterModel1" onmouseover="this.title=this.value" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">图号版本</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HPicNumVer" id="HPicNumVer" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">单位代码</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HUnitNumber" id="HUnitNumber" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">主要材料</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HMainMaterID" id="HMainMaterID" value="0" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">生产数量</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HPlanQty" id="HPlanQty" value="0" style=" background-color: #efefef4d; width: 90px; float: left; margin-right: 4px;" readonly>
|
<input type="text" class="layui-input" name="HprocExQty" id="HprocExQty" style="background-color:#efefef4d; width: 90px;" readonly>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">总装图号</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HPicNumAssemble" id="HPicNumAssemble" onmouseover="this.title=this.value" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">关键材料</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HKeyMaterID" id="HKeyMaterID" value="0" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">HICMOEntryID</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HICMOEntryID" id="HICMOEntryID" value="0" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">原料批次</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HMateOutBatchNo" id="HMateOutBatchNo" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">材质</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HMaterTexture" id="HMaterTexture">
|
</div>
|
</div>
|
<!--<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">流转卡类型</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HWorkTypeName" id="HWorkTypeName" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
|
<input type="hidden" name="HWorkTypeID" id="HWorkTypeID" value="0">
|
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchHWorkType" id="btnSearchHWorkType" style="width: 40px;">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
|
</button>
|
</div>
|
</div>-->
|
</div>
|
<div class="layui-row">
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">版本</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HVerNum" id="HVerNum" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<!--<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">版本</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HVerNum" id="HVerNum" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">版本</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HVerNum" id="HVerNum" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>-->
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">芯体物料代码</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HXTNumber" id="HXTNumber">
|
</div>
|
</div>
|
|
</div>
|
<div class="layui-row">
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">计划开工日期</label>
|
<div class="layui-input-inline">
|
<input type="date" class="layui-input" name="HPlanBeginDate" id="HPlanBeginDate" style="padding-left: 32px;">
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">计划完工日期</label>
|
<div class="layui-input-inline">
|
<input type="date" class="layui-input" name="HPlanEndDate" id="HPlanEndDate" style="padding-left: 32px;">
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">补料原因</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HExplanation" id="HExplanation" placeholder="请输入内容" onmouseover="this.title=this.value">
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">芯体规格型号</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HXTModel" id="HXTModel">
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">模具设备</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HEquipMentName" id="HEquipMentName" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
|
<input type="hidden" name="HEquipMentID" id="HEquipMentID" value="0">
|
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHEquipMent" id="btnHEquipMent" style="width: 40px;">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
|
</button>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label"> 材料规格</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HMaterModel" id="HMaterModel" style="float: left;">
|
</div>
|
</div>
|
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">日计划工单选单号</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HWorkBillSortNo" id="HWorkBillSortNo" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
|
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchWorkBillSort" id="btnSearchWorkBillSort" style="width: 40px;">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
|
</button>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">补料标记</label>
|
<div class="layui-input-inline">
|
<input type="checkbox" name="isHBLFlag" id="isHBLFlag" value="false" lay-skin="primary" lay-filter="isHBLFlag">
|
<input type="hidden" name="HBLFlag" id="HBLFlag" value="false" lay-skin="primary" lay-filter="HBLFlag">
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-col-xs6 layui-inline">
|
<label class="layui-form-label" style="width:12.5%">源单客户代码</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HCusNumber" id="HCusNumber" placeholder="请输入内容" onmouseover="this.title=this.value" style="width:610px;">
|
</div>
|
</div>
|
<div class="layui-col-xs6 layui-inline">
|
<label class="layui-form-label" style="width:12.5%">包装标识</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HPickLabel" id="HPickLabel" placeholder="请输入内容" onmouseover="this.title=this.value" style="width:610px;">
|
</div>
|
</div>
|
<div class="layui-col-xs6 layui-inline">
|
<label class="layui-form-label" style="width:12.5%">包装标识编码</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HPickLabelNumber" id="HPickLabelNumber" placeholder="请输入内容" onmouseover="this.title=this.value" style="width:610px;">
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<!--检移票信息-->
|
<div class="layui-tab-item">
|
<div class="layui-form-item">
|
<div class="layui-row">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">产品CODE</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HProdMaterCode" id="HProdMaterCode">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">销售订单号</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HSeOrderBillNo" id="HSeOrderBillNo">
|
<!--<input type="hidden" class="layui-input" name="HSeOrderEntryID" id="HSeOrderEntryID">
|
<input type="hidden" class="layui-input" name="HSeOrderInterID" id="HSeOrderInterID">-->
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">客户简称</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HCusShortName" id="HCusShortName">
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 115px;padding: 9px 0px;">客户要求材料成分</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HCusNeedMaterial" id="HCusNeedMaterial">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">预计出货日期</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="date" class="layui-input" name="HPlanSendGoodsDate" id="HPlanSendGoodsDate" style="padding-left: 32px;">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">产品名称</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HProdMaterName" id="HProdMaterName">
|
</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: 120px;">
|
<input type="text" class="layui-input" name="HCusName" id="HCusName">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">生产备注</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HWorkRemark" id="HWorkRemark">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">重要提示</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HImportNote" id="HImportNote">
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">原材料编号A</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HMaterNumber_A" id="HMaterNumber_A">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">原材料编号B</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HMaterNumber_B" id="HMaterNumber_B">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">原材料编号C</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HMaterNumber_C" id="HMaterNumber_C">
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">原材料编号D</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HMaterNumber_D" id="HMaterNumber_D">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">生产类型</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HProdType" id="HProdType">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">原材料简称</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HMaterShortName" id="HMaterShortName">
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">原材料内码A</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HMaterIDA" id="HMaterIDA">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">原材料内码B</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HMaterIDB" id="HMaterIDB">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">原材料内码C</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HMaterIDC" id="HMaterIDC">
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">原材料内码D</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HMaterIDD" id="HMaterIDD">
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<!--制单信息-->
|
<div class="layui-tab-item">
|
<div class="layui-form-item">
|
<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: 120px;">
|
<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: 120px;">
|
<input type="text" class="layui-input" name="HChecker" id="HChecker" 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: 120px;">
|
<input type="text" class="layui-input" name="HCloseMan" id="HCloseMan" 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: 120px;">
|
<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: 120px;">
|
<input type="text" class="layui-input" name="HCheckDate" id="HCheckDate" 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: 120px;">
|
<input type="text" class="layui-input" name="HCloseDate" id="HCloseDate" 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: 120px;">
|
<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: 120px;">
|
<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: 120px;">
|
<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: 120px;">
|
<input type="text" class="layui-input" name="HDeleteDate" id="HDeleteDate" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<!--<table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>-->
|
<div class="layui-tab layui-tab-card">
|
<ul class="layui-tab-title">
|
<li class="layui-this">工艺流程</li>
|
<li>器具清单</li>
|
<li>工艺参数清单</li>
|
</ul>
|
<div class="layui-tab-content">
|
<div class="layui-tab-item layui-show">
|
<!--工艺流程-->
|
<table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
|
</div>
|
<div class="layui-tab-item">
|
<!--器具清单-->
|
<table class="layui-hide" id="mainTable2" lay-filter="mainTable2"></table>
|
</div>
|
<div class="layui-tab-item">
|
<!--工艺参数清单-->
|
<table class="layui-hide" id="mainTable3" lay-filter="mainTable3"></table>
|
</div>
|
</div>
|
</div>
|
|
<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-CopyLine"><i class="layui-icon layui-icon-form"></i>复制一行</button>
|
</div>
|
</script>
|
<input id="HItemID" name="HItemID" type="hidden" />
|
<input id="HEntryID" name="HEntryID" type="hidden" />
|
</form>
|
</div>
|
</div>
|
</div>
|
<script type="text/html" id="barDemo">
|
<!--<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>-->
|
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
|
</script>
|
<!--行下拉选择(是否委外)-->
|
<script type="text/html" id="HSupFlag">
|
<select name="HSupFlag" lay-filter="HSupFlag" id="HSupFlag{{d.LAY_TABLE_INDEX+1}}">
|
<option value="false">否</option>
|
<option value="true">是</option>
|
</select>
|
</script>
|
<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 option;
|
var btnHMaterID = "";
|
var HModName = "Sc_ProcessExchangeBill";
|
var HLZQty = 0;
|
|
titleData2 = ["HEntryID", "HMouldID", "HMaterID", "HUnitID", "hmainid", "hicmointerid"]; //隐藏字段(器具清单)
|
titleData3 = ["HItemID"]; //隐藏字段(工艺参数清单)
|
//判断是否登录 未登录则跳到登录页
|
//if (sessionStorage.login != "login") {
|
// layer.confirm("登录失效,请重新登录!", {
|
// icon: 4, skin: 'layui-layer-lan', title: "温馨提示", closeBtn: 0, btn: ['重新登录']
|
// }, function () { window.location.href = "../../user/login.html"; });
|
//}
|
|
//获取页面跳转参数
|
var params = get_UrlVars();
|
if (typeof (params[params[0]]) == "undefined") {
|
var OperationType = 1;//操作类型
|
} else {
|
var OperationType = params[params[0]];//操作类型
|
var linterid = params[params[1]];//源单id
|
var HEntryID = params[params[2]];//源单子id
|
var HSouceBillType = params[params[3]];//源单类型
|
}
|
|
//#region 进入页面即加载
|
|
$("#HPlanBeginDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
|
$("#HPlanEndDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
|
$("#HPlanSendGoodsDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
|
$("#HSellDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
|
|
//初始化表格
|
set_InitGrid();
|
DisPlay_HideColumn();
|
|
//判断操作类型
|
if (OperationType == 1) {//无源单新增
|
$.ajax({
|
url: GetWEBURL() + "/Web/GetMAXNum",
|
type: "GET",
|
data: { "HBillType": '3772' },
|
success: function (d) {
|
//console.log(d.data);
|
$("#HInterID").val(d.data[0].HInterID);
|
$("#HBillNo").val(d.data[0].HBillNo);
|
$("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
|
$("#HMakeDate").val(Pub_Format(new Date(), "yyyy-MM-dd hh:mm:ss"));
|
$("#HMaker").val(sessionStorage["HUserName"]);
|
}
|
});
|
option.data = [{
|
"HProcNo": "", "HProcID": 0, "HProcNumber": "", "HProcName": "", "HWorkRemark": "",
|
"HCenterID": 0, "HCenterNumber": "", "HCenterName": "",
|
"HDeptID": 0, "HDeptNumber": "", "HDeptName": "",
|
"HSupID": 0, "HSupNumber": "", "HSupName": "", "HSupFlag": "false",
|
"HQty": 0, "HOutPrice": 0, "HRemark": "", "HRelationQty_In": 0, "HRelationQty_Out": 0,
|
"HRelationQty_WWOrder": 0, "HRelationQty_Bad": 0, "HOverRate": 0, "HMaxQty": 0,
|
"HPassRate": 0, "HSumPassRate": 0, "HTechnologyParameter": "", "HPicNum": "", "HProcCheckNote": ""
|
}];
|
table.render(option);
|
}
|
else if (OperationType == 2) {//有源单新增
|
$("#HItemID").val(linterid);//修改时主表ID
|
$("#HEntryID").val(HEntryID);//修改时子表ID
|
|
//判断生产订单是否审核
|
$.ajax({
|
type: "get",
|
url: GetWEBURL() + "/LEMS/ICMOBillCheck",
|
data: { "hmainid": linterid, "HEntryID": HEntryID, "OrganizationID": sessionStorage["OrganizationID"] },
|
async: false,
|
success: function (result) {
|
if (result.count == 0) { // 说明验证成功了,
|
layer.alert(result.Message, { icon: 5 });
|
} else {
|
$.ajax({
|
url: GetWEBURL() + "/Web/GetMAXNum",
|
type: "GET",
|
data: { "HBillType": '3772' },
|
success: function (d) {
|
//console.log(d.data);
|
$("#HInterID").val(d.data[0].HInterID);
|
$("#HBillNo").val(d.data[0].HBillNo);
|
$("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
|
$("#HMakeDate").val(Pub_Format(new Date(), "yyyy-MM-dd hh:mm:ss"));
|
$("#HMaker").val(sessionStorage["HUserName"]);
|
}
|
});
|
|
$.ajax({
|
url: GetWEBURL() + "/Sc_WorkBillSortBill/Sc_WorkBillSortBillList",
|
type: "GET",
|
data: { "sWhere": " and 源单主内码='" + linterid + "' and 源单子内码='" + HEntryID + "' ", "user": sessionStorage["HUserName"] },
|
success: function (d) {
|
if (d.data[0] != null) {
|
$("#HWorkBillSortNo").val(d.data[0].单据号);
|
}
|
}
|
})
|
|
|
|
GetICMOBillValue(linterid, HEntryID);
|
option.data = [{
|
"HProcNo": "", "HProcID": 0, "HProcNumber": "", "HProcName": "", "HWorkRemark": "",
|
"HCenterID": 0, "HCenterNumber": "", "HCenterName": "",
|
"HDeptID": 0, "HDeptNumber": "", "HDeptName": "",
|
"HSupID": 0, "HSupNumber": "", "HSupName": "", "HSupFlag": "false",
|
"HQty": 0, "HOutPrice": 0, "HRemark": "", "HRelationQty_In": 0, "HRelationQty_Out": 0,
|
"HRelationQty_WWOrder": 0, "HRelationQty_Bad": 0, "HOverRate": 0, "HMaxQty": 0,
|
"HPassRate": 0, "HSumPassRate": 0, "HTechnologyParameter": "", "HPicNum": "", "HProcCheckNote": ""
|
}];
|
table.render(option);
|
}
|
layer.closeAll("loading");
|
}
|
})
|
}
|
else if (OperationType == 3) {//编辑
|
$("#HItemID").val(linterid);//修改时主表ID
|
set_EditFromGrid();
|
|
}
|
else {
|
layer.alert("未知操作类型!", { icon: 5 });
|
}
|
//#endregion
|
|
|
//初始化表格
|
function set_InitGrid() {
|
//表头
|
columns = [ //表头
|
{ type: 'checkbox', totalRowText: '合计行' }
|
, { type: 'numbers', title: '序号', totalRow: true }
|
, { field: 'HProcNo', title: '流水号', edit: 'text' }
|
, { field: 'HProcID', title: '工序ID', hide: true }
|
, { field: 'HProcNumber', title: '工序代码', edit: 'text', event: "HProcCheck" }
|
, { field: 'HProcName', title: '工序名称' }
|
, { field: 'HCenterID', title: '工作中心ID', hide: true }
|
, { field: 'HCenterNumber', title: '工作中心代码', edit: 'text', event: "HWorkCenterCheck" }
|
, { field: 'HCenterName', title: '工作中心名称' }
|
, { field: 'HTechnologyParameter', title: '工艺参数', width: 500, edit: 'text' }
|
, { field: 'HRemark', title: '备注', edit: 'text' }
|
, { field: 'HSupID', title: '供应商ID', hide: true }
|
, { field: 'HSupNumber', title: '供应商代码', edit: 'text', event: "HSupCheck" }
|
, { field: 'HSupName', title: '供应商' }
|
, { field: 'HSupFlag', title: '是否委外', templet: '#HSupFlag' }
|
, { field: 'HQty', title: '流转卡数量', edit: 'text' }
|
|
//, { field: 'HWorkRemark', title: '加工说明', edit: 'text' }
|
//, { field: 'HDeptID', title: '部门ID', hide: true }
|
//, { field: 'HDeptNumber', title: '部门代码', edit: 'text', event: "HDeptCheck" }
|
//, { field: 'HDeptName', title: '部门' }
|
//, { field: 'HOutPrice', title: '加工单价', edit: 'text' }
|
//, { field: 'HRelationQty_In', title: '进站数量', style:"background-color: #e6e6e6" }
|
//, { field: 'HRelationQty_Out', title: '出站数量', style: "background-color: #e6e6e6"}
|
//, { field: 'HRelationQty_WWOrder', title: '委外工单数量', style: "background-color: #e6e6e6" }
|
//, { field: 'HRelationQty_Bad', title: '不合格数量', style: "background-color: #e6e6e6" }
|
//, { field: 'HOverRate', title: '超额比例', event: "HOverRate", style: "background-color: #e6e6e6"}
|
//, { field: 'HMaxQty', title: '最高上限', style: "background-color: #e6e6e6" }
|
//, { field: 'HPassRate', title: '良率', style: "background-color: #e6e6e6" }
|
//, { field: 'HSumPassRate', title: '累计良率', style: "background-color: #e6e6e6" }
|
//, { field: 'HPicNum', title: '图纸编号', style: "background-color: #e6e6e6"}
|
//, { field: 'HProcCheckNote', title: '本工序确认记录', width: 500, style: "background-color: #e6e6e6"}
|
, { fixed: 'right', title: '操作', toolbar: '#barDemo' }
|
];
|
option = {
|
id: 'mainTable'
|
, elem: '#mainTable'
|
, toolbar: '#toolbarDemo'
|
, page: false
|
, cellMinWidth: 120
|
, height: 400
|
, cols: [columns]
|
, limit: Number.MAX_VALUE//默认显示全部
|
, done: function (res, curr, count) {
|
option.data = res.data;
|
//去掉下拉框失焦事件否则在下拉框里输入值
|
$('.layui-form-select').find('input').unbind("blur");
|
//表格重载回显下拉框里的数据
|
$('tr').each(function (e) {
|
var $cr = $(this);
|
var dataIndex = $cr.attr("data-index");
|
$.each(option.data, function (index, value) {
|
if (value.LAY_TNDEX == dataIndex) {
|
$cr.find('input').val(value.HSupFlag);
|
}
|
});
|
});
|
}
|
, done: function (res, curr, count) {
|
|
}
|
};
|
|
}
|
|
//头工具栏事件
|
table.on('toolbar(mainTable)', function (obj) {
|
var checkStatus = table.checkStatus('mainTable')
|
, data = checkStatus.data;
|
//新增行表格数据
|
var NewRow = {
|
"HProcNo": "", "HProcID": 0, "HProcNumber": "", "HProcName": "", "HWorkRemark": "",
|
"HCenterID": 0, "HCenterNumber": "", "HCenterName": "",
|
"HDeptID": 0, "HDeptNumber": "", "HDeptName": "",
|
"HSupID": 0, "HSupNumber": "", "HSupName": "", "HSupFlag": "false",
|
"HQty": 0, "HOutPrice": 0, "HRemark": "", "HRelationQty_In": 0, "HRelationQty_Out": 0,
|
"HRelationQty_WWOrder": 0, "HRelationQty_Bad": 0, "HOverRate": 0, "HMaxQty": 0,
|
"HPassRate": 0, "HSumPassRate": 0, "HTechnologyParameter": "", "HPicNum": "", "HProcCheckNote": ""
|
};
|
switch (obj.event) {
|
case 'btn-AddLine':
|
table.cache["mainTable"].push(NewRow);
|
option.data = table.cache["mainTable"];
|
table.render(option);
|
for (var i = 1; i <= option.data.length; i++) {
|
$('#HSupFlag' + i + '').find("option[value='" + option.data[i - 1].HSupFlag + "']").attr("selected", true);
|
}
|
form.render('select');
|
break;
|
case 'btn-CopyLine':
|
var copydata = JSON.stringify(data);
|
if (data.length <= 0) {
|
layer.msg("请选择需要复制的一行!");
|
}
|
else if (data.length > 1) {
|
layer.msg("只能选择复制一行!");
|
}
|
else {
|
var copydata2 = copydata.substring(1, copydata.length);//去除首行字符'['
|
var copyrow = copydata2.substring(0, copydata2.length - 1);//去除末尾字符']'
|
table.cache["mainTable"].push(JSON.parse(copyrow));//将复制的行强转成json追加到表格上
|
option.data = table.cache["mainTable"];//将数据绑定到data上
|
table.render(option);//将数据渲染到表格上
|
for (var i = 1; i <= option.data.length; i++) {
|
$('#HSupFlag' + i + '').find("option[value='" + option.data[i - 1].HSupFlag + "']").attr("selected", true);
|
}
|
form.render('select');
|
}
|
break;
|
}
|
});
|
|
//行内事件
|
table.on('tool(mainTable)', function (obj) {
|
var data = obj.data;
|
var rowIndex = $(obj.tr).attr("data-index");
|
if (obj.event === 'del') {
|
layer.confirm('真的删除行吗?', function (index) {
|
if (rowIndex === '0') {
|
layer.msg('首行无法删除!!!');
|
} else {
|
obj.del();
|
option.data = table.cache["mainTable"];//将数据绑定到data上
|
table.reload(option);
|
layer.close(index);
|
}
|
});
|
}
|
|
$(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
|
if (event.key == "F7") {
|
if (obj.event == 'HProcCheck') {
|
layer.open({
|
type: 2,
|
skin: 'layui-layer-rim', //加上边框
|
title: '工序列表',
|
closeBtn: 1,
|
shift: 2,
|
area: ['90%', '90%'],
|
maxmin: true,
|
content: ['../../../views/Baseset/基础资料/Gy_ProcList.html', 'yes'],
|
btn: ['确定', '取消']
|
, btn1: function (index, layero) {
|
//按钮【按钮一】的回调
|
var iframeWindow = window['layui-layer-iframe' + index];
|
var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');
|
if (checkStatus.data.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
obj.update({
|
HProcName: checkStatus.data[0].工序
|
, HProcID: checkStatus.data[0].HItemID
|
, HProcNumber: checkStatus.data[0].工序代码
|
, HCenterID: checkStatus.data[0].工作中心ID
|
, HCenterNumber: checkStatus.data[0].工作中心代码
|
, HCenterName: checkStatus.data[0].工作中心
|
//, HDeptID: checkStatus.data[0].部门ID
|
//, HDeptNumber: checkStatus.data[0].部门代码
|
//, HDeptName: checkStatus.data[0].部门
|
});
|
|
layer.close(layer.index);
|
}
|
, btn2: function (index, layero) {
|
},
|
end: function () {
|
|
}
|
});
|
}
|
if (obj.event === 'HWorkCenterCheck') {//工作中心
|
layer.open({
|
type: 2,
|
skin: 'layui-layer-rim', //加上边框
|
title: '加工中心列表',
|
closeBtn: 1,
|
shift: 2,
|
area: ['90%', '90%'],
|
maxmin: true,
|
content: ['../../../views/Baseset/基础资料/Gy_WorkCenterList.html', 'yes'],
|
btn: ['确定', '取消']
|
, btn1: function (index, layero) {
|
//按钮【按钮一】的回调
|
var iframeWindow = window['layui-layer-iframe' + index];
|
var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');
|
if (checkStatus.data.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
obj.update({
|
HCenterName: checkStatus.data[0].工作中心
|
, HCenterID: checkStatus.data[0].HItemID
|
, HCenterNumber: checkStatus.data[0].工作中心代码
|
});
|
layer.close(layer.index);
|
}
|
, btn2: function (index, layero) {
|
},
|
end: function () {
|
|
}
|
});
|
}
|
if (obj.event === 'HSupCheck') {//供应商
|
layer.open({
|
type: 2,
|
skin: 'layui-layer-rim', //加上边框
|
title: '供应商列表',
|
closeBtn: 1,
|
shift: 2,
|
area: ['90%', '90%'],
|
maxmin: true,
|
content: ['../../../../views/基础资料/采购基础资料/Gy_Supplier.html', 'yes'],
|
btn: ['确定', '取消']
|
, btn1: function (index, layero) {
|
//按钮【按钮一】的回调
|
var iframeWindow = window['layui-layer-iframe' + index];
|
var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');
|
if (checkStatus.data.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
obj.update({
|
HSupName: checkStatus.data[0].供应商名称
|
, HSupID: checkStatus.data[0].HItemID
|
, HSupNumber: checkStatus.data[0].供应商代码
|
});
|
layer.close(layer.index);
|
}
|
, btn2: function (index, layero) {
|
},
|
end: function () {
|
|
}
|
});
|
}
|
if (obj.event === 'HDeptCheck') {//部门
|
layer.open({
|
type: 2,
|
skin: 'layui-layer-rim', //加上边框
|
title: '部门列表',
|
closeBtn: 1,
|
shift: 2,
|
area: ['90%', '90%'],
|
maxmin: true,
|
content: ['../../../views/基础资料/公用基础资料/Gy_DepartmentList.html', 'yes'],
|
btn: ['确定', '取消']
|
, btn1: function (index, layero) {
|
//按钮【按钮一】的回调
|
var iframeWindow = window['layui-layer-iframe' + index];
|
var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');
|
if (checkStatus.data.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
obj.update({
|
HDeptName: checkStatus.data[0].部门名称
|
, HDeptID: checkStatus.data[0].HItemID
|
, HDeptNumber: checkStatus.data[0].部门代码
|
});
|
layer.close(layer.index);
|
}
|
, btn2: function (index, layero) {
|
},
|
end: function () {
|
|
}
|
});
|
}
|
obj.event = "";
|
return false;
|
}
|
})
|
//单击改变不可编辑值
|
if (obj.event === 'isEditCheck') {
|
var flag = obj.data.isEdit;
|
var flagValue = obj.data.isEditValue;
|
if (flagValue === "false") {
|
flagValue = "true";
|
flag = "是";
|
}
|
else if (flagValue === "true") {
|
flagValue = "false";
|
flag = "否";
|
}
|
else {
|
flagValue = "false";
|
flag = "否";
|
}
|
obj.update({
|
isEdit: flag
|
, isEditValue: flagValue
|
});
|
}
|
});
|
|
$("#HQty").on("input", function (e) {
|
//获取input输入的值
|
if (parseInt(e.delegateTarget.value)> parseInt($("#HPlanQty").val())) {
|
return layer.msg("拆分数量不能超过可拆分数量!");
|
}
|
else {
|
for (var i = 0; i < option.data.length; i++) {
|
option.data[i]["HQty"] = e.delegateTarget.value;
|
}
|
}
|
table.render(option);
|
});
|
|
//监听单元格编辑 单元格编辑后 变更
|
table.on('edit(mainTable)', function (obj) {
|
// 单元格编辑之前的值
|
//第一行计划数量=流转卡数量;之后的计划数量=上一行数量*良率/ 100
|
//最高上限=流转卡数量*(100+超额比例)/100
|
|
|
var oldText = $(this).prev().text();
|
var value = obj.value //得到修改后的值
|
, data = obj.data //得到所在行所有键值
|
, field = obj.field; //得到字段
|
|
switch (field) {
|
case "HOverRate":
|
var HQty = parseInt(isNaN(data.HQty) ? 0 : data.HQty);
|
var HOverRate = parseFloat(isNaN(data.HOverRate) ? 0 : data.HOverRate);
|
//同步更新表格和缓存对应的值
|
obj.update({
|
HMaxQty: HQty * (100 + HOverRate) / 100 //最小包装数
|
});
|
break;
|
default:
|
}
|
});
|
|
//隐藏列设置
|
form.on('submit(HideColumn)', function (data) {
|
get_HideColumn();
|
});
|
|
//选择辅助单位按钮
|
form.on('submit(btnHAuxUnit)', function () {
|
get_btnHAuxUnit();
|
});
|
|
//选择产品弹窗
|
form.on('submit(btnSearchMater2)', function () {//产品
|
layer.open({
|
type: 2
|
, area: ['80%', '80%']
|
, title: '物料'
|
, shade: 0.6 //遮罩透明度
|
//, maxmin: true //允许全屏最小化
|
, anim: 0 //0-6的动画形式,-1不开启
|
, content: ['../../Baseset/基础资料/Gy_MaterialList.html', 'yes']
|
, btn: ['确定', '取消']
|
, btn1: function (index, layero) {
|
|
//按钮【按钮一】的回调
|
var iframeWindow = window['layui-layer-iframe' + index] //获取弹框页面
|
var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
|
if (checkStatus.data.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
$("#HMaterName2").val(checkStatus.data[0].HName);
|
$("#HMaterID2").val(checkStatus.data[0].HItemID);
|
layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
|
}
|
, btn2: function (index, layero) {
|
//按钮【按钮二】的回调
|
//return false 开启该代码可禁止点击该按钮关闭
|
},
|
end: function () {
|
|
},
|
success: function (layero, index) {
|
|
}
|
})
|
});
|
|
//打印
|
form.on('submit(btn_print)', function () {//产品
|
|
var sWhere = " and HPRDORGID=" + sessionStorage["OrganizationID"] + " and 单据号='" + $("#HBillNo").val() + "' ";
|
var ajaxLoad = layer.load();
|
$.ajax({
|
url: GetWEBURL() + '/LEMS/MES_Sc_ProcessExchangeBillQuery_Json',
|
type: "GET",
|
data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
|
success: function (data1) {
|
if (data1.count == 1) {
|
var hinterid = "";
|
if (data1.data.length != 0) {
|
hinterid = data1.data[0]["hmainid"];
|
}
|
layer.close(ajaxLoad);
|
|
if (hinterid != "") {
|
$.ajax({
|
url: GetWEBURL() + '/Sc_ProcessExchangeBillList/QJQD',
|
type: "GET",
|
data: { "HProcExchHinteID": hinterid },
|
success: function (res) {
|
if (res.count == 1) {
|
if (res.data.length != 0) {
|
hinterid += ",1";
|
} else {
|
hinterid += ",0";
|
}
|
|
layer.open({
|
type: 2
|
, area: ['50%', '50%']
|
, title: '打印模版选择'
|
, shade: 0.6 //遮罩透明度
|
, maxmin: false //允许全屏最小化
|
, anim: 0 //0-6的动画形式,-1不开启
|
, content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + hinterid + '&MyMsg=' + hinterid + '&Type=HProcessExchange', 'yes']
|
, resize: false
|
})
|
|
} else {
|
layer.close(ajaxLoad);
|
}
|
}, error: function () {
|
layer.close(ajaxLoad);
|
layer.alert("接口请求失败!", { icon: 5 });
|
}
|
})
|
|
} else {
|
layer.msg("请先保存,在进行打印!");
|
}
|
} else {
|
layer.close(ajaxLoad);
|
}
|
}, error: function () {
|
layer.close(ajaxLoad);
|
layer.alert("接口请求失败!", { icon: 5 });
|
}
|
});
|
|
});
|
|
//选择子件弹窗PartInformation.html
|
form.on('submit(btnSearchMater)', function () {
|
//页面层-自定义
|
layer.open({
|
type: 2,
|
skin: 'layui-layer-rim', //加上边框
|
title: '子件列表',
|
closeBtn: 1,
|
shift: 2,
|
area: ['80%', '80%'],
|
maxmin: true,
|
content: ['../../PublicPage/PartInformation.html', 'yes'],
|
btn: ['确定', '取消']
|
, btn1: function (index, layero) {
|
|
//按钮【按钮一】的回调
|
var iframeWindow = window['layui-layer-iframe' + index] //获取弹框页面
|
var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
|
if (checkStatus.data.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
$("#HMaterModel1").val(checkStatus.data[0].HModel);
|
$("#HMaterNumber").val(checkStatus.data[0].HNumber);
|
$("#HMaterName").val(checkStatus.data[0].HName);
|
$("#HMaterID").val(checkStatus.data[0].HItemID);
|
layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
|
}
|
, btn2: function (index, layero) {
|
//按钮【按钮二】的回调
|
//return false 开启该代码可禁止点击该按钮关闭
|
},
|
end: function () {
|
|
},
|
success: function (layero, index) {
|
|
}
|
});
|
});
|
|
//模具设备弹窗
|
form.on('submit(btnHEquipMent)', function () {
|
//页面层-自定义
|
layer.open({
|
type: 2,
|
skin: 'layui-layer-rim', //加上边框
|
title: '设备列表',
|
closeBtn: 1,
|
shift: 2,
|
area: ['80%', '80%'],
|
maxmin: true,
|
content: ['../../PublicPage/EqpInformation.html', 'yes'],
|
btn: ['确定', '取消']
|
, btn1: function (index, layero) {
|
|
//按钮【按钮一】的回调
|
var iframeWindow = window['layui-layer-iframe' + index] //获取弹框页面
|
var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
|
if (checkStatus.data.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
$("#HEquipMentName").val(checkStatus.data[0].HName);
|
$("#HEquipMentID").val(checkStatus.data[0].HInterID);
|
layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
|
}
|
, btn2: function (index, layero) {
|
//按钮【按钮二】的回调
|
//return false 开启该代码可禁止点击该按钮关闭
|
},
|
end: function () {
|
|
},
|
success: function (layero, index) {
|
|
}
|
});
|
});
|
|
//补料标记
|
form.on('checkbox(isHBLFlag)', function (data) {
|
$("#HBLFlag").val(data.elem.checked);
|
});
|
|
//车间弹窗
|
form.on('submit(HWorkShopList)', function () {
|
//页面层-自定义
|
layer.open({
|
type: 2,
|
skin: 'layui-layer-rim', //加上边框
|
title: '车间列表',
|
closeBtn: 1,
|
shift: 2,
|
area: ['80%', '80%'],
|
maxmin: true,
|
content: ['../../PublicPage/DeptInformation.html', 'yes'],
|
btn: ['确定', '取消']
|
, btn1: function (index, layero) {
|
|
//按钮【按钮一】的回调
|
var iframeWindow = window['layui-layer-iframe' + index] //获取弹框页面
|
var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
|
if (checkStatus.data.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
$("#HWorkShopName").val(checkStatus.data[0].HName);
|
$("#HWorkShopID").val(checkStatus.data[0].HItemID);
|
layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
|
}
|
, btn2: function (index, layero) {
|
//按钮【按钮二】的回调
|
//return false 开启该代码可禁止点击该按钮关闭
|
},
|
end: function () {
|
|
},
|
success: function (layero, index) {
|
|
}
|
});
|
});
|
|
//委外加工单位弹窗
|
form.on('submit(btnSearchHSup)', function () {
|
//页面层-自定义
|
layer.open({
|
type: 2,
|
skin: 'layui-layer-rim', //加上边框
|
title: '供应商列表',
|
closeBtn: 1,
|
shift: 2,
|
area: ['80%', '80%'],
|
maxmin: true,
|
content: ['../../PublicPage/SupplierInformation.html', 'yes'],
|
btn: ['确定', '取消']
|
, btn1: function (index, layero) {
|
|
//按钮【按钮一】的回调
|
var iframeWindow = window['layui-layer-iframe' + index] //获取弹框页面
|
var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
|
if (checkStatus.data.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
$("#HSupName").val(checkStatus.data[0].HName);
|
$("#HSupID").val(checkStatus.data[0].HItemID);
|
layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
|
}
|
, btn2: function (index, layero) {
|
//按钮【按钮二】的回调
|
//return false 开启该代码可禁止点击该按钮关闭
|
},
|
end: function () {
|
|
},
|
success: function (layero, index) {
|
|
}
|
});
|
});
|
|
//选择生产任务单
|
form.on('submit(btnSearchICMOBill)', function () {
|
layer.open({
|
type: 2//弹窗类型
|
, skin: 'layui-layer-rim' //加上边框
|
, area: ['90%', '90%']//大小
|
, title: '生产任务单列表'//标题
|
, shift: 2//弹出动画
|
, content: ['../../../views/Baseset/基础资料/Sc_ICMOBillListView.html', 'yes']
|
, btn: ['确定', '取消']
|
, btn1: function (index, layero) {//按钮【按钮一】的回调
|
var iframeWindow = window['layui-layer-iframe' + index] //获取弹框页面
|
var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
|
if (checkStatus.data.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
|
GetICMOBillValue(checkStatus.data[0].hmainid, checkStatus.data[0].HEntryID)
|
layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
|
}
|
, btn2: function (index, layero) { }
|
})
|
});
|
|
//选择日计划工单
|
form.on('submit(btnSearchWorkBillSort)', function () {
|
layer.open({
|
type: 2//弹窗类型
|
, skin: 'layui-layer-rim' //加上边框
|
, area: ['90%', '90%']//大小
|
, title: '日计划工单列表'//标题
|
, shift: 2//弹出动画
|
, content: ['../../../views/生产管理/生产日计划工单/JIT_DayPlanBillList.html', 'yes']
|
, btn: ['确定', '取消']
|
, btn1: function (index, layero) {//按钮【按钮一】的回调
|
var iframeWindow = window['layui-layer-iframe' + index] //获取弹框页面
|
var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
|
if (checkStatus.data.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
$("#HWorkBillSortNo").val(checkStatus.data[0].单据号);
|
GetICMOBillValue(checkStatus.data[0].源单主内码, checkStatus.data[0].源单子内码)
|
layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
|
}
|
, btn2: function (index, layero) { }
|
})
|
});
|
|
//选择工艺路线
|
form.on('submit(btnRoutingBill)', function () {
|
layer.open({
|
type: 2//弹窗类型
|
, skin: 'layui-layer-rim' //加上边框
|
, area: ['90%', '70%']//大小
|
, title: '工艺路线列表'//标题
|
, shift: 2//弹出动画
|
, content: ['../../Baseset/基础资料/Gy_RoutingBillList.html?HMaterID=' + btnHMaterID, 'yes']
|
, btn: ['确定', '取消']
|
, btn1: function (index, layero) {//按钮【按钮一】的回调
|
var iframeWindow = window['layui-layer-iframe' + index] //获取弹框页面
|
var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
|
if (checkStatus.data.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
getRoutingBill(checkStatus.data[0].单据号);
|
|
layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
|
}
|
, btn2: function (index, layero) { }
|
})
|
});
|
|
function getRoutingBill(HBillNo) {
|
$.ajax({
|
type: "get",
|
url: GetWEBURL() + "LEMS/MES_Gy_RoutingBillList_Json",
|
async: true,
|
data: { "sWhere": " and 单据号='" + HBillNo + "'" + " and 工序代码 !='" + 9999 + "'", "user": sessionStorage["HUserName"] },
|
success: function (result) {
|
var data = result.data;
|
var Tablerow = [];
|
|
$("#RoutingBill").val(data[0].单据号)
|
$("#HRoutingBillID").val(data[0].hmainid)
|
|
for (var i = 0; i < data.length; i++) {
|
Tablerow.push({
|
"HProcNo": data[i].工序号, "HProcID": data[i].hprocid, "HProcNumber": data[i].工序代码, "HProcName": data[i].工序, "HWorkRemark": data[i].表体备注,
|
"HCenterID": data[i].HCenterID, "HCenterNumber": data[i].工作中心代码, "HCenterName": data[i].工作中心名称,
|
"HDeptID": 0, "HDeptNumber": "", "HDeptName": "",
|
"HSupID": data[i].HSupID, "HSupNumber": data[i].供应商代码, "HSupName": data[i].供应商, "HSupFlag": data[i].委外标记 == 0 ? "false" : "true",
|
"HQty": HLZQty, "HOutPrice": 0, "HRemark": "", "HRelationQty_In": 0, "HRelationQty_Out": 0,
|
"HRelationQty_WWOrder": 0, "HRelationQty_Bad": 0, "HOverRate": 0, "HMaxQty": 0,
|
"HPassRate": 0, "HSumPassRate": 0, "HTechnologyParameter": data[i].工艺参数, "HPicNum": data[i].图纸编号, "HProcCheckNote": data[i].本工序确认记录
|
});
|
}
|
option.data = Tablerow;
|
table.render(option);
|
for (var i = 1; i <= data.length; i++) {
|
$('#HSupFlag' + i + '').find("option[value='" + (data[i - 1].委外标记 == "0" ? "false" : "true") + "']").attr("selected", true);
|
}
|
form.render('select');
|
},
|
error: function (result) {
|
layer.close(index);
|
console.log(result);
|
//layer.msg('获取采购订单出现异常', { icon: 2, time: 2000 });
|
}
|
})
|
}
|
|
|
//保存提交
|
form.on('submit(btnSave)', function (data) {//提交
|
if ($("#HICMOInterID").val() == 0) {
|
layer.msg("请选择任务单!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
return;
|
}
|
if ($("#HQty").val() == "" || $("#HQty").val() <= 0) {
|
layer.msg("基本信息中流转卡数量不能为空且不能小于等于0!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
return;
|
}
|
if (!$("#HPlanBeginDate").val()) {
|
layer.msg("请选择计划开工日期!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
return;
|
}
|
if (!$("#HPlanEndDate").val()) {
|
layer.msg("请选择计划完工日期!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
return;
|
}
|
|
var HAuxQty = $('#HAuxQty').val();
|
if (HAuxQty.substring(HAuxQty.length - 1, HAuxQty.length) == ".") {
|
layer.msg("辅数量的结尾不能是.!");
|
return;
|
} else {
|
var ref = /^[0-9]+\.?[0-9]*$/;
|
if (!ref.test(HAuxQty)) {
|
layer.msg("辅数量请输正确入数字!");
|
return;
|
}
|
}
|
|
var HSplitNo = $('#HSplitNo').val();
|
if (HSplitNo.substring(HSplitNo.length - 1, HSplitNo.length) == ".") {
|
layer.msg("拆分号的结尾不能是.!");
|
return;
|
} else {
|
var ref = /^[0-9]+\.?[0-9]*$/;
|
if (!ref.test(HSplitNo)) {
|
layer.msg("拆分号请输正确入数字!");
|
return;
|
}
|
}
|
|
|
|
//删除子表数据时 会占用数组的位置,需要重新排一下顺序
|
var sSubTable = [];
|
for (var i = 0; i < table.cache["mainTable"].length; i++) {
|
if (table.cache["mainTable"][i] != "") {
|
table.cache["mainTable"][i].LAY_TABLE_INDEX = i;
|
sSubTable.push(table.cache["mainTable"][i])
|
}
|
}
|
for (var i = 0; i < sSubTable.length; i++) {
|
if (!sSubTable[i].HProcNo) {
|
var indexRow = i + 1;
|
layer.msg("第" + indexRow + "行,流水号不能为空!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
return;
|
}
|
if (sSubTable[i].HProcNo == 0) {
|
var indexRow = i + 1;
|
layer.msg("第" + indexRow + "行,流水号不能为0!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
return;
|
}
|
if (!sSubTable[i].HProcID) {
|
var indexRow = i + 1;
|
layer.msg("第" + indexRow + "行,工序不能为空!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
return;
|
}
|
if (!sSubTable[i].HCenterID) {
|
var indexRow = i + 1;
|
layer.msg("第" + indexRow + "行,工作中心不能为空!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
return;
|
}
|
if (sSubTable[i].HSupFlag == "true") {
|
if (!sSubTable[i].HSupID) {
|
var indexRow = i + 1;
|
layer.msg("第" + indexRow + "行,供应商不能为空!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
return;
|
}
|
}
|
}
|
data.field.HPRDORGID = sessionStorage["OrganizationID"];//组织
|
//var HBLFlag = data.field.HBLFlag;
|
//HBLFlag == "on" ? data.field.HBLFlag = 'true' : data.field.HBLFlag = 'false';//将数组合并成字符串
|
var sMainStr = JSON.stringify(data.field);
|
var sSubStr = JSON.stringify(sSubTable);
|
var flag = "xz";
|
if (OperationType == 3) {
|
flag = "xg";
|
}
|
var sMainSub = sMainStr + ';' + sSubStr + ";" + sessionStorage["HUserName"] + ";" + flag;
|
var index = layer.load();
|
|
$.ajax({
|
type: "POST",
|
url: GetWEBURL() + "/Sc_ProcessExchangeBill/AddBill",
|
async: true,
|
data: { "sMainSub": sMainSub },
|
dataType: "json",
|
success: function (data) {
|
if (data.count == 1) {
|
layer.close(index);
|
layer.msg("提交成功");
|
$('#set_SaveBill').addClass("layui-btn-disabled").attr("disabled", true);//保存按钮禁用
|
}
|
else {
|
layer.close(index);
|
layer.msg(data.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: "温馨提示" });
|
}
|
});
|
});
|
|
//隐藏列设置
|
function get_HideColumn() {
|
var colName = "";
|
for (var i = 1; i < option.cols[0].length - 1; i++) {
|
colName += option.cols[0][i]["title"] + ",";
|
}
|
|
colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI 进行编码
|
layer.open({
|
type: 2
|
, skin: "layui-layer-rim" //加上边框
|
, title: "隐藏列设置" //标题
|
, closeBtn: 1 //窗体右上角关闭 的 样式
|
, shift: 2 //弹出动画
|
, area: ["50%", "90%"] //窗体大小
|
, maxmin: true //设置最大最小按钮是否显示
|
, content: ['../../基础资料/隐藏列设置/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
|
, btn: ["确定", "取消"]
|
, btn1: function (index, laero) {
|
//刷新表格数据
|
DisPlay_HideColumn();
|
//更新表格缓存的数据
|
layer.close(index);//关闭弹窗
|
}
|
})
|
}
|
|
|
//显示列数据
|
function DisPlay_HideColumn() {
|
$.ajax({
|
url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
|
type: "GET",
|
data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
|
success: function (data1) {
|
if (data1.data.length != 0) {
|
|
|
var dataCol = [];//数据库查询出的列数据
|
var titleData = ["工序ID", "工作中心ID","部门ID","供应商ID"];//不需要显示的字段 可扩展
|
|
dataCol = data1.data[0].HGridString.split(',');
|
|
for (var i = 0; i < option.cols[0].length - 2; i++) {
|
var dataCols = dataCol[i].split('|');
|
//隐藏列
|
if (dataCols[1] == 1) {
|
option.cols[0][i + 1]["hide"] = true;
|
}
|
//设置内容字体大小
|
if (data1.data[0].HFontSize != 0) {
|
option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
|
} else {
|
option.cols[0][i + 1]["style"] = "font-size:100%";
|
}
|
//设置列宽
|
if (dataCols[3] > 0) {
|
option.cols[0][i + 1]["width"] = dataCols[3];
|
}
|
//显示列
|
if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
|
option.cols[0][i + 1]["hide"] = false;
|
}
|
//字体所在位置(左 居中 右)
|
switch (dataCols[2]) {
|
case "L":
|
option.cols[0][i + 1]["align"] = "left";
|
break;
|
case "M":
|
option.cols[0][i + 1]["align"] = "center";
|
break;
|
case "R":
|
option.cols[0][i + 1]["align"] = "right";
|
break;
|
}
|
}
|
|
//取消冻结列
|
for (var i = 1; i < option.cols[0].length - 1; i++) {
|
if (option.cols[0][i]["fixed"] != null) {
|
option.cols[0][i]["fixed"] = null;
|
}
|
else {
|
break;
|
}
|
}
|
//冻结列
|
if (data1.data[0].HFixCols != 0) {
|
for (var i = 0; i < data1.data[0].HFixCols; i++) {
|
if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
|
data1.data[0].HFixCols += 1;
|
}
|
option.cols[0][i + 1]["fixed"] = "left";
|
}
|
}
|
table.render(option);
|
} else {
|
table.render(option);
|
}
|
}, error: function () {
|
layer.alert("接口请求失败!", { icon: 5 });
|
}
|
})
|
}
|
|
|
//退出
|
form.on('submit(Cancel)', function () {
|
if (linterid == undefined) {
|
//关闭页签
|
Pub_Close(2);
|
}
|
else {
|
//关闭页签
|
Pub_Close(1);
|
}
|
})
|
|
//编辑方法
|
function set_EditFromGrid() {
|
set_EditForm(linterid); //编辑获取表头
|
set_EditGrid(linterid); //编辑获取表体
|
get_DisplayHMainID(linterid); //编辑获取表体(器具清单)
|
get_Display3(linterid); //编辑获取表体(工艺参数清单)
|
option.data = [{
|
"HProcNo": "", "HProcID": 0, "HProcNumber": "", "HProcName": "", "HWorkRemark": "",
|
"HCenterID": 0, "HCenterNumber": "", "HCenterName": "",
|
"HDeptID": 0, "HDeptNumber": "", "HDeptName": "",
|
"HSupID": 0, "HSupNumber": "", "HSupName": "", "HSupFlag": "false",
|
"HQty": 0, "HOutPrice": 0, "HRemark": "", "HRelationQty_In": 0, "HRelationQty_Out": 0,
|
"HRelationQty_WWOrder": 0, "HRelationQty_Bad": 0, "HOverRate": 0, "HMaxQty": 0,
|
"HPassRate": 0, "HSumPassRate": 0, "HTechnologyParameter": "", "HPicNum": "", "HProcCheckNote": ""
|
}];
|
table.render(option);
|
}
|
//编辑获取表头
|
function set_EditForm(linterid) {
|
//查询检验方案单是否存在
|
$.ajax({
|
url: GetWEBURL() + "Sc_ProcessExchangeBill/GetProcessExchangeBillMain",
|
type: "GET",
|
data: {
|
"HInterID": linterid
|
},
|
success: function (result) {
|
if (result.code == 1) { // 说明验证成功了,
|
var data = result.data.h_v_Sc_ProcessExchangeBillQuery[0];
|
form.val("component-form-group", {
|
"HBillNo": data.单据号
|
, "HInterID": data.hmainid
|
, "HPRDORGID": data.HPRDORGID
|
, "HDate": formatDate(data.日期)
|
, "HOrderProcNO": data.订单跟踪号
|
, "HPicNumVer": data.图号版本
|
, "HMaterName2": data.产品名称
|
, "HMaterID2": data.HMaterID2
|
, "HMaterNumber2": data.产品代码
|
, "HMaterModel2": data.产品规格
|
, "HPicNumAssemble": data.总装图号
|
, "HICMOBillNo": data.任务单号
|
, "HICMOInterID": data.hicmointerid
|
, "HQty": data.流转卡数量
|
, "HUnitName": data.单位
|
, "HUnitID": data.HUnitID
|
, "HMaterTexture": data.材质
|
, "HPlanBeginDate": formatDate(data.计划开工日期)
|
, "HPlanEndDate": formatDate(data.计划完工日期)
|
, "HEquipMentName": data.设备名称
|
, "HEquipMentID": data.HEquipMentID
|
, "HProductNum": data.成品编号
|
, "HExplanation": data.摘要
|
, "HMaterModel": data.材料规格
|
, "HWidth": data.幅宽
|
, "HWeight": data.克重
|
, "HAuxQty": data.辅数量
|
, "HAuxUnit": data.HAuxUnit
|
, "HAuxUnitName": data.辅助单位
|
, "HSplitNo": data.拆分号
|
, "HRemark2": data.备注2
|
, "HRemark3": data.底部备注
|
, "HEmpID": data.HEmpID
|
, "HEmpName": data.业务员
|
, "HCusID": data.HCusID
|
, "HCusNames": data.客户
|
, "HColorRemark": data.染色要求
|
|
, "HProjectNum": data.项目编号
|
, "HVerNum": data.版本
|
, "HRemark": data.表头备注
|
, "HMateOutBatchNo": data.原料批次
|
, "HXTNumber": data.芯体物料代码
|
, "HXTModel": data.芯体规格型号
|
, "HCusNumber": data.源单客户代码
|
, "HRoutingBillID": data.HRoutingBillID
|
, "RoutingBill": data.工艺路线
|
|
|
, "HWorkShopName": data.生产车间
|
, "HWorkShopID": data.HWorkShopID
|
, "textBox2": data.任务单号
|
, "HWorkBillSortNo": data.日计划工单号
|
, "HSupName": data.委外加工单位
|
, "HSupID": data.HSupID
|
, "HMaterName": data.子件名称
|
, "HMaterID": data.HMaterID
|
, "HMaterNumber": data.子件代码
|
, "HMaterModel1": data.子件规格
|
, "HUnitNumber": data.单位代码
|
, "HMainMaterID": data.主要材料
|
, "HPlanQty": data.生产数量
|
, "HprocExQty": data.生产数量
|
, "HKeyMaterID": data.关键材料
|
, "HICMOEntryID": data.HICMOEntryID
|
|
|
, "HProdMaterCode": data.产品CODE
|
, "HSeOrderBillNo": data.销售订单号
|
//, "HSeOrderEntryID": data.HSeOrderEntryID
|
//, "HSeOrderInterID": data.HSeOrderInterID
|
, "HCusShortName": data.客户简称
|
, "HCusNeedMaterial": data.客户要求材料成分
|
, "HPlanSendGoodsDate": formatDate(data.预计出货日期)
|
, "HProdMaterName": data.产品名称2
|
, "HCusName": data.客户名称
|
, "HWorkRemark": data.生产备注
|
, "HImportNote": data.重要提示
|
, "HMaterNumber_A": data.原材料编号A
|
, "HMaterNumber_B": data.原材料编号B
|
, "HMaterNumber_C": data.原材料编号C
|
, "HMaterNumber_D": data.原材料编号D
|
, "HProdType": data.生产类型
|
, "HMaterShortName": data.原材料简称
|
, "HMaterIDA": data.原材料内码A
|
, "HMaterIDB": data.原材料内码B
|
, "HMaterIDC": data.原材料内码C
|
, "HMaterIDD": data.原材料内码D
|
|
|
//羊毛信息
|
, "HHeight": data.毛高
|
, "HInches": data.寸数组织
|
, "HAl1Long": data.全毛长
|
, "HDensity": data.坯布密度
|
, "HTela": data.毛纱名称及规格
|
, "HUnderTela": data.底丝
|
, "HSizing": data.定型浆料
|
, "HSellDate": data.交货日期
|
|
|
, "HMaker": data.制单人
|
, "HChecker": data.审核人
|
, "HCloseMan": data.关闭人
|
, "HMakeDate": formatDate(data.制单日期)
|
, "HCheckDate": data.审核人 == "" ? "" : formatDate(data.审核日期)
|
, "HCloseDate": data.关闭人 == "" ? "" : formatDate(data.关闭日期)
|
, "HUpDater": data.修改人
|
, "HDeleteMan": data.作废人
|
, "HUpDateDate": data.修改人 == "" ? "" : formatDate(data.修改日期)
|
, "HDeleteDate": data.作废人 == "" ? "" : formatDate(data.作废日期)
|
, "HPickLabel": data.包装标识
|
, "HPickLabelNumber": data.包装标识编码
|
});
|
btnHMaterID = data.HMaterID2;
|
HLZQty = data.流转卡数量;
|
$("#HBLFlag").val(data.补料标记 ? "true" : "false");
|
$("input[name='isHBLFlag']").prop("checked", data.补料标记);//true:选中 false:不选中
|
form.render("checkbox");
|
|
} else {
|
layer.alert(result.msg, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
|
}
|
}, error: function () {
|
layer.alert("发生错误!", { icon: 5 });
|
}
|
});
|
}
|
// 编辑获取表头时时间格式矫正方式
|
function formatDate(date) {
|
var d = new Date(date),
|
month = '' + (d.getMonth() + 1),
|
day = '' + d.getDate(),
|
year = d.getFullYear();
|
|
if (month.length < 2) month = '0' + month;
|
if (day.length < 2) day = '0' + day;
|
|
return [year, month, day].join('-');
|
}
|
// 编辑获取表体
|
function set_EditGrid(linterid) {
|
$("#HInterID").val(linterid);//修改时主表ID
|
//编辑加载数据
|
$.ajax({
|
url: GetWEBURL() + 'Sc_ProcessExchangeBill/GetProcessExchangeBillSub',
|
type: "GET",
|
data: { "HInterID": linterid },
|
success: function (result) {
|
if (result.count == 1) {
|
option.data = result.data;
|
table.render(option);
|
for (var i = 0; i < result.data.length; i++) {
|
$('#HSupFlag' + (i + 1)).find("option[value='" + result.data[i].HSupFlag + "']").attr("selected", true);
|
}
|
form.render('select');
|
|
} else {
|
layer.alert(result.code + result.Message, { icon: 5 });
|
}
|
}, error: function () {
|
layer.close(index0);
|
layer.alert("接口请求失败!", { icon: 5 });
|
}
|
});
|
}
|
|
//辅助单位
|
function get_btnHAuxUnit() {
|
layer.open({
|
type: 2//弹窗类型
|
, skin: 'layui-layer-rim' //加上边框
|
, area: ['90%', '90%']//大小
|
, title: "计量单位列表" //标题
|
, shift: 2//弹出动画
|
, content: ['../../Baseset/基础资料/Gy_UnitList.html', 'yes']
|
, btn: ['确定', '取消']
|
, btn1: function (index, layero) {//按钮【按钮一】的回调
|
var iframeWindow = window['layui-layer-iframe' + index] //获取弹框页面
|
var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
|
if (checkStatus.data.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
//获取数据
|
$("#HAuxUnit").val(checkStatus.data[0].HItemID);
|
$("#HAuxUnitName").val(checkStatus.data[0].HName);
|
|
layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
|
}
|
, btn2: function (index, layero) { }
|
})
|
}
|
|
//#region 查询 (器具清单)
|
function get_DisplayHMainID(linterid) {
|
var ajaxLoad = layer.load();
|
$.ajax({
|
url: GetWEBURL() + '/Sc_ProcessExchangeBillList/QJQD',
|
type: "GET",
|
data: { "HProcExchHinteID": linterid },
|
success: function (data1) {
|
if (data1.count == 1) {
|
var data = [];
|
//给空的数组赋值
|
for (var key in data1.list) {
|
data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
|
}
|
var col = [];
|
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, titleData2) > -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 });
|
}
|
}
|
}
|
|
//动态显示列名
|
table.render({
|
elem: '#mainTable2'
|
, toolbar: '#toolbarDemo'
|
, cols: [col]
|
, data: data1.data
|
, height: 550
|
, page: true
|
, cellMinWidth: 90
|
, limit: 50
|
, limits: [50, 500, 5000, 20000]
|
});
|
|
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_Display3(linterid) {
|
var ajaxLoad = layer.load();
|
$.ajax({
|
url: GetWEBURL() + '/Sc_ProcessExchangeBill/GetProcessExchangeBillSubTech',
|
type: "GET",
|
data: { "HInterID": linterid},
|
success: function (data1) {
|
if (data1.count == 1) {
|
var data = [];
|
//给空的数组赋值
|
for (var key in data1.list) {
|
data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
|
}
|
var col = [];
|
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, titleData3) > -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 });
|
}
|
}
|
}
|
//动态显示列名
|
table.render({
|
elem: '#mainTable3'
|
, toolbar: '#toolbarDemo'
|
, cols: [col]
|
, data: data1.data
|
, height: 550
|
, page: true
|
, cellMinWidth: 90
|
, limit: 50
|
, limits: [50, 500, 5000, 20000]
|
});
|
|
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
|
|
//返回生产任务单
|
function GetICMOBillValue(hmainid, HEntryID) {
|
$.ajax({
|
url: GetWEBURL() + "/Sc_ProcessExchangeBill/GetICMOBillDetail",
|
type: "GET",
|
data: { "hmainid": hmainid, "HEntryID": HEntryID, "OrganizationID": sessionStorage["OrganizationID"] },
|
success: function (result) {
|
if (result.count == 1) {
|
var data = result.data[result.data.length - 1];
|
$("#HICMOInterID").val(data.hmainid);
|
$("#HICMOBillNo").val(data.生产订单号);
|
$("#textBox2").val(data.生产订单号);
|
$("#HICMOEntryID").val(data.HEntryID);
|
$("#HOrderProcNO").val(data.订单跟踪号);
|
$("#HMaterID").val(data.hmaterid);
|
$("#HMaterName").val(data.物料名称);
|
$("#HMaterID2").val(data.hmaterid);
|
$("#HMaterName2").val(data.物料名称);
|
$("#HMaterNumber").val(data.物料代码);
|
$("#HMaterNumber2").val(data.物料代码);
|
$("#HMaterModel").val(data.规格型号);
|
$("#HMaterModel2").val(data.规格型号);
|
$("#HBatchNo").val(data.批号);
|
$("#HUnitID").val(data.hunitid);
|
$("#HUnitName").val(data.计量单位名称);
|
$("#HUnitNumber").val(data.计量单位代码);
|
$("#HPlanQty").val(data.计划生产数量);
|
$("#HQty").val(data.流转卡数量);
|
$("#HprocExQty").val(data.流转卡数量);
|
$("#HPlanBeginDate").val(data.计划开工日期);
|
$("#HPlanEndDate").val(data.计划完工日期);
|
$("#HWorkShopID").val(data.hdeptid);
|
$("#HWorkShopName").val(data.生产车间名称);
|
$("#HProdMaterCode").val(data.产品CODE);
|
$("#HSeOrderBillNo").val(data.销售订单号);
|
$("#HCusShortName").val(data.客户简称);
|
$("#HCusNeedMaterial").val(data.客户要求材料成分);
|
$("#HPlanSendGoodsDate").val(data.预计出货日期);
|
$("#HProdMaterName").val(data.产品名称);
|
$("#HCusName").val(data.客户名称);
|
$("#HWorkRemark").val(data.生产备注);
|
$("#HImportNote").val(data.重要提示);
|
$("#HPicNumVer").val(data.图号版本);
|
$("#HPicNumAssemble").val(data.总装图号);
|
$("#HMaterTexture").val(data.材质);
|
$("#HProductNum").val(data.成品编号);
|
$("#HVerNum").val(data.版本);
|
$("#HCusNumber").val(data.源单客户编码);
|
$("#HPickLabel").val(data.包装标识);
|
$("#HPickLabelNumber").val(data.包装标识编码);
|
$("#HXTNumber").val(data.芯体物料代码);
|
$("#HXTModel").val(data.芯体规格型号);
|
$("#HWidth").val(data.HWidth);
|
$("#HWeight").val(data.HWeight);
|
$("#HAuxUnitName").val(data.HAuxUnitName);
|
$("#HAuxUnit").val(data.HAuxUnit);
|
$("#HRemark2").val(data.备注);
|
$("#HEmpID").val(data.HEmpID);
|
$("#HEmpName").val(data.业务员);
|
$("#HCusID").val(data.HCusID);
|
$("#HCusNames").val(data.客户);
|
$("#HColorRemark").val(data.染色要求);
|
$("#HBLFlag").val(result.data[0].HBLFlag == 0 ? false : true);
|
$("input[name='isHBLFlag']").prop("checked", result.data[0].HBLFlag);//true:选中 false:不选中
|
form.render("checkbox");
|
btnHMaterID = data.hmaterid;
|
|
$.ajax({
|
type: "get",
|
url: GetWEBURL() + "LEMS/Gy_RoutingBillList",
|
async: true,
|
data: { "sWhere": "and HMaterID=" + btnHMaterID + " and HOrgID = " + sessionStorage["OrganizationID"], "user": sessionStorage["HUserName"] },
|
success: function (result) {
|
if (result.data.length != 0) {
|
var hbillno = result.data[0].单据号
|
HLZQty = data.流转卡数量;
|
getRoutingBill(hbillno);
|
} else {
|
option.data = [{
|
"HProcNo": "", "HProcID": 0, "HProcNumber": "", "HProcName": "", "HWorkRemark": "",
|
"HCenterID": 0, "HCenterNumber": "", "HCenterName": "",
|
"HDeptID": 0, "HDeptNumber": "", "HDeptName": "",
|
"HSupID": 0, "HSupNumber": "", "HSupName": "", "HSupFlag": "false",
|
"HQty": 0, "HOutPrice": 0, "HRemark": "", "HRelationQty_In": 0, "HRelationQty_Out": 0,
|
"HRelationQty_WWOrder": 0, "HRelationQty_Bad": 0, "HOverRate": 0, "HMaxQty": 0,
|
"HPassRate": 0, "HSumPassRate": 0, "HTechnologyParameter": "", "HPicNum": "", "HProcCheckNote": ""
|
}];
|
table.render(option);
|
}
|
},
|
error: function (result) {
|
layer.close(index);
|
console.log(result);
|
//layer.msg('获取采购订单出现异常', { icon: 2, time: 2000 });
|
}
|
})
|
}
|
else {
|
layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
}
|
}
|
})
|
//txtHBillNo.Text = sBillNo;
|
//GetICMOBillDetail(hmainid, HEntryID);
|
|
}
|
|
function GetICMOBillDetail(hmainid, HEntryID) {
|
$.ajax({
|
url: GetWEBURL() + "/Sc_ProcessExchangeBill/GetICMOBillList",
|
type: "GET",
|
data: { "hmainid": hmainid, "HEntryID": HEntryID, "OrganizationID": sessionStorage["OrganizationID"] },
|
success: function (result) {
|
if (result.count == 1) {
|
option.data = result.data;
|
table.render(option);
|
for (var i = 1; i <= option.data.length; i++) {
|
$('#HSupFlag' + i + '').find("option[value='" + option.data[i - 1].HSupFlag + "']").attr("selected", true);
|
}
|
form.render('select');
|
}
|
else {
|
layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
}
|
}
|
})
|
}
|
|
//行选择处理(是否委外)
|
form.on('select(HSupFlag)', function (data) {
|
//获取下拉框选中的值
|
var elem = data.othis.parents('tr');
|
var dataindex = elem.attr("data-index");
|
$.each(option.data, function (index, value) {
|
if (value.LAY_TABLE_INDEX == dataindex) {
|
value.HSupFlag = data.value;//把选中下拉框id值赋值给表格缓存
|
}
|
});
|
});
|
//以上为layui模块
|
});
|
|
|
//定义全局变量HMainMaterID
|
var subProcName, subProcNumber, subProcID,
|
subWorkCenterName, subWorkCenterNumber, subWorkCenterID,
|
subSupName, subSupNumber, subSupID,
|
HReasonName, ReasonID, EmpName,
|
ZRProcName, QRName;
|
|
|
</script>
|
</body>
|
</html>
|