<!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">
|
</head>
|
<body>
|
|
<div id="layout1" class="layui-fluid">
|
<div class="layui-row layui-col-space15">
|
<div class="layui-col-md12">
|
<div class="layui-card">
|
<form id="form0" class="layui-form" action="">
|
<div class="layui-card-header">
|
<div class="layui-btn-group">
|
|
<button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">保存</button>
|
<button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Cancel">退出</button>
|
|
</div>
|
|
</div>
|
<div class="layui-card-body">
|
<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
|
<!--<ul class="layui-tab-title">
|
<li class="layui-this">基本信息</li>-->
|
<!--<li>其他信息</li>-->
|
<!--</ul>-->
|
<h1 style="text-align:center;"><b>不良评审单</b></h1>
|
<div class="layui-tab-content">
|
<div class="layui-tab-item layui-show">
|
|
<div class="layui-form-item">
|
<div class="layui-row">
|
<div class="layui-col-xs2">
|
<label class="layui-form-label">单 据 号:</label>
|
<div class="layui-input-inline">
|
<input class="layui-input" name="HBillNo" lay-verify="HBillNo" id="HBillNo" readonly="readonly" autocomplete="off">
|
</div>
|
</div>
|
<div class="layui-col-xs2">
|
<label class="layui-form-label">单据日期:</label>
|
<div class="layui-input-inline">
|
<input class="layui-input" name="HDate" id="HDate" readonly="readonly" autocomplete="off" disabled>
|
</div>
|
</div>
|
<div class="layui-col-xs2">
|
<label class="layui-form-label">订单跟踪号:</label>
|
<div class="layui-input-inline">
|
<input class="layui-input" name="" id="" autocomplete="off" disabled>
|
<input id="" name="" type="hidden" />
|
</div>
|
</div>
|
<div class="layui-col-xs2">
|
<label class="layui-form-label">产品:</label>
|
<div class="layui-input-inline">
|
<input type="text" name="HMater" id="HMater" lay-verify="HMater" readonly="readonly" autocomplete="off" class="layui-input">
|
<input id="HMaterID" name="HMaterID" type="hidden" />
|
</div>
|
</div>
|
<div class="layui-col-xs2">
|
<label class="layui-form-label">产品代码:</label>
|
<div class="layui-input-inline">
|
<input type="text" name="HMaterNumber" id="HMaterNumber" lay-verify="HMaterNumber" readonly="readonly" autocomplete="off" class="layui-input">
|
</div>
|
</div>
|
</div>
|
<!--<button class="layui-btn" data-type="reload">选择</button>-->
|
</div>
|
<div class="layui-form-item">
|
<div class="layui-row">
|
<div class="layui-col-xs2">
|
<label class="layui-form-label">工序计划单号:</label>
|
<div class="layui-input-inline">
|
<input type="text" name="HMainSourceBillNo" id="HMainSourceBillNo" lay-verify="" autocomplete="off" class="layui-input">
|
|
<button type="button" lay-submit="" class="layui-btn" lay-filter="HPlanID-BT">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
|
</button>
|
<input id="HMainSourceInterID" name="HMainSourceInterID" type="hidden" />
|
<input id="HMainSourceEntryID" name="HMainSourceEntryID" type="hidden" />
|
</div>
|
</div>
|
|
<div class="layui-col-xs2">
|
<label class="layui-form-label"> 工作中心:</label>
|
<div class="layui-input-inline">
|
<input class="layui-input" name="HWorkCenterName" lay-verify="" id="HWorkCenterName" readonly="readonly" autocomplete="off">
|
<input id="HCenterID" name="HCenterID" type="hidden" />
|
</div>
|
</div>
|
<div class="layui-col-xs2">
|
<label class="layui-form-label"> 计划数量:</label>
|
<div class="layui-input-inline">
|
<input class="layui-input" name="HPlanQty" id="HPlanQty" readonly="readonly" autocomplete="off">
|
|
</div>
|
</div>
|
<div class="layui-col-xs2">
|
<label class="layui-form-label"> 规格型号:</label>
|
<div class="layui-input-inline">
|
<input class="layui-input" name="HModel" lay-verify="" id="HModel" readonly="readonly" autocomplete="off">
|
<!--<button type="button" lay-submit="" class="layui-btn" lay-filter="HMateriaID-BT">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
|
</button>-->
|
</div>
|
</div>
|
<div class="layui-col-xs2">
|
<label class="layui-form-label"> 不良数量:</label>
|
<div class="layui-input-inline">
|
<input class="layui-input" name="HBadQty" id="HBadQty" autocomplete="off">
|
|
</div>
|
</div>
|
|
</div>
|
</div>
|
|
|
<div class="layui-form-item">
|
<div class="layui-row">
|
|
<div class="layui-colorpicker-xs">
|
<label class="layui-form-label"> 评审意见:</label>
|
<div class="layui-input-block">
|
<input class="layui-input" name="HNote" id="HNote" autocomplete="off">
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<table>
|
<tr>
|
|
</tr>
|
</table>
|
|
<table class="layui-table" id="mainTable" lay-filter="mainTable">
|
<thead>
|
<tr>
|
<th>序号</th>
|
<th>不良原因</th>
|
<th>责任人</th>
|
<th>申请工序</th>
|
<th>责任工序</th>
|
<th>不良数量</th>
|
<th>备注</th>
|
<th>不良确认人</th>
|
<th>判定结果</th>
|
</tr>
|
</thead>
|
<tbody>
|
<tr>
|
<td>1</td>
|
<td><input type="text" id="HWasterReasonName" name="HWasterReasonName" style="width:200px;height:20px;" />
|
<button type="button" lay-submit="" class="layui-btn" lay-filter="HBadReasonID-BT">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
|
</button>
|
<input id="HBadReasonID" name="HBadReasonID" type="hidden" />
|
</td>
|
<td><input type="text" id="HEmpName" name="HEmpName" style="width:200px;height:20px;" />
|
<button type="button" lay-submit="" class="layui-btn" lay-filter="HEmployeeID-BT">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
|
</button>
|
<input id="HItemID" name="HItemID" type="hidden" />
|
|
|
</td>
|
<td><input type="text" id="HSQProcName" name="HSQProcName" style="width:200px;height:20px;" />
|
<button type="button" lay-submit="" class="layui-btn" lay-filter="HSQProcID-BT">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
|
</button>
|
<input id="HProcID" name="HProcID" type="hidden" />
|
</td>
|
<td><input type="text" id="HZRProcName" name="HZRProcName" style="width:200px;height:20px;" />
|
<button type="button" lay-submit="" class="layui-btn" lay-filter="HZRProcID-BT">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
|
</button>
|
<input id="HItemID" name="HItemID" type="hidden" />
|
|
</td>
|
<td><input type="text" id="HBadQty" name="HBadQty" style="width:200px;height:20px;" /></td>
|
<td><input type="text" id="HRemark" name="HRemark" style="width:200px;height:20px;" /></td>
|
<td><input type="text" id="HPSProcName" name="HPSProcName" style="width:200px;height:20px;" /></td>
|
<td><input type="text" id="HQCResultID" name="HQCResultID" style="width:200px;height:20px;" /></td>
|
|
</tr>
|
|
<tr>
|
<td>2</td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td ><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
|
</tr>
|
<tr>
|
<td>3</td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td ><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
|
</tr>
|
|
<tr>
|
<td>4</td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td ><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
|
</tr>
|
|
<tr>
|
<td>5</td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td ><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
|
</tr>
|
|
<tr>
|
<td>6</td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td ><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
|
</tr>
|
|
<tr>
|
<td>7</td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td ><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
|
</tr>
|
|
<tr>
|
<td>8</td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td ><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
|
</tr>
|
|
<tr>
|
<td>9</td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td ><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
|
</tr>
|
|
<tr>
|
<td>10</td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td ><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
|
</tr>
|
|
<tr>
|
<td>11</td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td ><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
|
</tr>
|
|
<tr>
|
<td>12</td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td ><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
|
</tr>
|
|
<tr>
|
<td>13</td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td ><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
|
</tr>
|
|
<tr>
|
<td>14</td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td ><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
|
</tr>
|
|
<tr>
|
<td>15</td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td ><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
<td><input type="text" id="" style="width:200px;height:20px;"/></td>
|
|
</tr>
|
|
|
</tbody>
|
|
</table>
|
|
</form>
|
</div>
|
</div>
|
</div>
|
</div>
|
<script src="../../../layuiadmin/layui/layui.js"></script>
|
<script src="../../../layuiadmin/Scripts/json2.js"></script>
|
<script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
|
<script src="../../../layuiadmin/Scripts/webConfig.js"></script>
|
<script>
|
|
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
|
, element = layui.element;
|
//清空界面 new
|
|
//表头初始化赋值(根据登录用户获取 默认仓库、部门、验收、保管、金蝶用户) new
|
$("#HWHID").val(sessionStorage["HWHID"]);
|
$("#HWHNAME").val(sessionStorage["HWHName"]);
|
$("#HStockPlaceID").val(sessionStorage["HSPID"]);
|
$("#HStockPlaceName").val(sessionStorage["HSPName"]);
|
//$("#HSupID").val(sessionStorage["HSupID"]);
|
//$("#HSupName").val(sessionStorage["HSupName"]);
|
$("#HDeptID").val(sessionStorage["HDeptID"]);
|
$("#HDeptName").val(sessionStorage["HDept"]);
|
$("#HSecManagerID").val(sessionStorage["HSecManagerID"]);
|
$("#HSecManager").val(sessionStorage["HSecManager"]);
|
$("#HKeeperID").val(sessionStorage["HKeeperID"]);
|
$("#HKeeper").val(sessionStorage["HKeeper"]);
|
$("#HMaker").val(sessionStorage["HUserName"]);
|
$("#HMaker").hide();
|
$("#HMakerID").hide();
|
$("#HBillerID").val(sessionStorage["HBillerID"]);
|
$("#HBillerID").hide();
|
var HSourceFlag = sessionStorage["SourceFlag"];
|
//默认带入的仓库,如果启用仓位则仓位有效,如果没有启用则仓位灰度 new
|
|
$("#HBarCode").focus();
|
|
//获取参数
|
function getUrlVars() {
|
var vars = [], hash;
|
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
|
for (var i = 0; i < hashes.length; i++) {
|
hash = hashes[i].split('=');
|
vars.push(hash[0]);
|
vars[hash[0]] = hash[1];
|
}
|
return vars;
|
}
|
|
//判断是否登录 未登录则跳到登录页
|
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 = getUrlVars();
|
var linterid = params[params[0]]; //从参数中获取 单据内码
|
var lSourceBillType = params[params[2]]; //从单据获取 源单类型
|
|
function RoadBillMain(linterid)//加载表头
|
{
|
$.ajax({
|
url: GetWEBURL() + "/Web/GetPonderationBill",
|
type: "GET",
|
data: { "HInterID": linterid },
|
success: function (d) {
|
// console.log(d.data);
|
$("#HInterID").val(d.data[0].HInterID);
|
$("#HBillNo").val(d.data[0].HBillNo);
|
$("#HSourceBillNo").val(d.data[0].HSourceBillNo);
|
|
}
|
})
|
}
|
|
|
var date = new Date();
|
var day = date.getDate();
|
var month = date.getMonth() + 1;
|
var year = date.getFullYear();
|
var shijian = year + "-" + month + "-" + day;
|
|
//判断是否新增
|
if (linterid == null || linterid == 0) {
|
//获取最大单据号 new
|
$("#HInterID").val("");
|
$("#HBillNo").val("");
|
$.ajax({
|
url: GetWEBURL() + "/Web/GetMAXNum",
|
type: "GET",
|
data: { "HBillType": '7509' },
|
success: function (d) {
|
//console.log(d.data);
|
$("#HInterID").val(d.data[0].HInterID);
|
$("#HBillNo").val(d.data[0].HBillNo);
|
$("#HDate").val(shijian);
|
}
|
});
|
}
|
else {//如果修改则走下面 new
|
RoadBillMain(linterid);
|
RoadBillSub(linterid);
|
}
|
|
|
|
//选择不良原因
|
form.on('submit(HBadReasonID-BT)', function () {//选择仓库
|
layer.open({
|
type: 2
|
, area: ['100%', '100%']
|
, title: '不良原因列表'
|
, shade: 0.6 //遮罩透明度
|
, maxmin: true //允许全屏最小化
|
, anim: 0 //0-6的动画形式,-1不开启
|
, content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
|
, resize: false
|
, cancel: function () {
|
//$(".layui-btn").removeClass("layui-btn-disabled");
|
}
|
})
|
});
|
|
//选择工序计划单
|
form.on('submit(HPlanID-BT)', function () {//选择工序计划单
|
layer.open({
|
type: 2
|
, area: ['80%', '80%']
|
, title: '工序计划单列表'
|
, shade: 0.6 //遮罩透明度
|
, maxmin: true //允许全屏最小化
|
, anim: 0 //0-6的动画形式,-1不开启
|
, content: ['../../../views/Baseset/基础资料/Sc_ProcessPlanViewList.html', 'yes']
|
, resize: false
|
, cancel: function () {
|
//$(".layui-btn").removeClass("layui-btn-disabled");
|
}
|
})
|
});
|
|
//选择责任人
|
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: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
|
, resize: false
|
, cancel: function () {
|
//$(".layui-btn").removeClass("layui-btn-disabled");
|
}
|
})
|
});
|
|
//选择申请工序
|
form.on('submit(HSQProcID-BT)', function (data) {//选择申请工序
|
var sMainStr = JSON.stringify(data.field);
|
layer.open({
|
type: 2
|
, area: ['80%', '80%']
|
, title: '申请工序列表'
|
, shade: 0.6 //遮罩透明度
|
, maxmin: true //允许全屏最小化
|
, anim: 0 //0-6的动画形式,-1不开启
|
, content: ['../../../views/Baseset/基础资料/Gy_ProcList.html', 'yes']
|
, resize: false
|
, cancel: function () {
|
//$(".layui-btn").removeClass("layui-btn-disabled");
|
}
|
})
|
});
|
|
//选择责任工序
|
form.on('submit(HZRProcID-BT)', function () {//选择责任工序
|
layer.open({
|
type: 2
|
, area: ['80%', '80%']
|
, title: '责任工序列表'
|
, shade: 0.6 //遮罩透明度
|
, maxmin: true //允许全屏最小化
|
, anim: 0 //0-6的动画形式,-1不开启
|
, content: ['../../../views/Baseset/基础资料/Gy_ProcList.html?Type=HZR', 'yes']
|
, resize: false
|
, cancel: function () {
|
//$(".layui-btn").removeClass("layui-btn-disabled");
|
}
|
})
|
});
|
|
//编辑
|
form.on('submit(cmdModify)', function () {//编辑
|
var sSubStr = table.cache['wl-table'];
|
//if (AllowLoadData(sSubStr) != false) {//非空验证
|
layer.open({
|
type: 2
|
, area: ['100%', '100%']
|
, title: '明细列表'
|
, shade: 0.6 //遮罩透明度
|
, maxmin: true //允许全屏最小化
|
, anim: 0 //0-6的动画形式,-1不开启
|
, content: ['../../../views/公共页面/Kf_BarCodeEditDlg.html?table=' + JSON.stringify(sSubStr), 'yes']
|
, resize: false
|
, cancel: function () {
|
//$(".layui-btn").removeClass("layui-btn-disabled");
|
}
|
})
|
// }
|
});
|
|
form.on('submit(Cancel)', function () {
|
//sessionStorage["SourceFlag"] = false;
|
parent.location.href = "../../../views/index.html"
|
//window.close();//关闭当前页
|
})
|
|
form.on('submit(Saver)', function (data) {//保存
|
//debugger;
|
var sMainStr = JSON.stringify(data.field);
|
var sSubStr = JSON.stringify(table.cache['mainTable']);
|
var sMainSub = sMainStr + ';' + sSubStr;
|
$.ajax(
|
{
|
type: "POST",
|
url: GetWEBURL()+"SaveBadReasonList", //方法所在页面和方法名
|
async: true,
|
data: {"msg": sMainSub},
|
dataType: "json",
|
success: function (data) {
|
if (data.count == 1) { // 说明验证成功了,
|
layer.msg(data.Message, { icon: 1 });
|
}
|
else {
|
|
f_alert(data.Message);
|
console.log("Reason" + sMainStr + "sub:::" + sSubStr);
|
}
|
layer.closeAll("loading");
|
},
|
error: function (err) {
|
|
f_alert("错误:" + err);
|
console.log("Reason"+sMainStr);
|
}
|
});
|
});
|
function f_alert(sMsg) {
|
layer.alert(sMsg, { icon: 5 });
|
|
}
|
|
//监听提交
|
form.verify({
|
numberOrEmpty: function (value, item) {
|
// if (value != '') {
|
if (!/^\d+$/.test(value)) {
|
return '不能为空或数字或者0';
|
}
|
//}
|
}
|
});
|
|
|
//刷新明细页签
|
table.render({
|
elem: '#mx-table'
|
// , url: 'http://61.130.49.162:9090/WMSAPI///Web/GetHBarCodeShowBillSub'
|
//, toolbar: '#toolbarDemo'
|
// , where: { sMsg: linterid, sMsg2: lentryid }
|
, cols: [[
|
, { field: 'HMaterID', title: '物料ID', width: 100, hide: true }
|
]]
|
, page: true
|
, height: 500
|
, done: function () {
|
}
|
});
|
});
|
function GetHReasonValue(obj) //返回不良原因
|
{
|
$("#HWasterReasonName").val(obj[0].HName);
|
//sessionStorage["HWHID"] = obj[0].HItemID;
|
$("#HBadReasonID").val(obj[0].HItemID);
|
}
|
function GetHPlanValue(obj) { //返回工序计划单
|
$("#HMainSourceInterID").val(obj[0].hmainid);
|
$("#HMainSourceEntryID").val(obj[0].hsubid);
|
$("#HMainSourceBillNo").val(obj[0].单据号);
|
$("#HMaterID").val(obj[0].HMaterID);
|
$("#HMaterNumber").val(obj[0].物料代码);
|
$("#HMater").val(obj[0].物料名称);
|
$("#HCenterID").val(obj[0].HCenterID);
|
$("#HWorkCenterName").val(obj[0].工作中心);
|
$("#HModel").val(obj[0].规格型号);
|
$("#HPlanQty").val(obj[0].计划数量);
|
|
|
}
|
function GetHKeeperValue(obj) { //返回职员
|
$("#HEmpName").val(obj[0].HName);
|
//$("#HItemID").val(obj[0].HItemID);
|
}
|
function GetHProcValue(obj) { //返回申请工序
|
$("#HSQProcName").val(obj[0].工序);
|
$("#HProcID").val(obj[0].HItemID);
|
}
|
function GetHZRValue(obj) { //返回责任工序
|
$("#HZRProcName").val(obj[0].工序);
|
//$("#HItemID").val(obj[0].HItemID);
|
}
|
function AllowLoadData(sSubStr) { //非空验证
|
//if ($("#HSourceBillNo").val() == '') {
|
// layer.msg("请先扫源单!", { icon: 5 });
|
// return false;
|
//}
|
if($("#HDeptName").val()=='')
|
{
|
layer.msg("部门没有选择", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
return false;
|
}
|
if ($("#HSecManager").val() == '') {
|
layer.msg("验收人没有选择", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
return false;
|
}
|
if ($("#HKeeper").val() == '') {
|
layer.msg("保管人没有选择", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
return false;
|
}
|
//if ($("#HWHNAME").val() == '') {
|
// layer.msg("仓库没有选择!", { icon: 5 });
|
// return false;
|
//}
|
if ($("#HBillNo").val() == '') {
|
layer.msg("错误的单据号", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
return false;
|
}
|
if ($("#HInterID").val() == '') {
|
layer.msg("错误的内码", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
return false;
|
}
|
if (typeof (sSubStr) == "undefined")
|
{
|
layer.msg("没有物料明细记录", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
return false;
|
}
|
if (!typeof (sSubStr) == "undefined") {
|
//for (var i = 0; i <= sSubStr.length - 1; i++) { //判断扫码数量不能大于应收数量
|
// if (parseFloat(sSubStr[i].HQtyMust) > 0) {
|
// if (parseFloat(sSubStr[i].HQty) > parseFloat(sSubStr[i].HQtyMust))
|
// {
|
// layer.msg("数量不能大于应收数量", { icon: 5, btn: ['确定'], time: 100000, offset: 't' });
|
// return false;
|
// }
|
// }
|
//}
|
for (var i = 0; i <= sSubStr.length - 1; i++) { //判断扫码数量不能为0
|
if (parseFloat(sSubStr[i].HQty) > 0) {
|
s = 1;
|
}
|
}
|
if (s == 0) {
|
layer.msg("产品入库记录未扫码", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
return false;
|
}
|
}
|
else
|
{
|
return true;
|
}
|
}
|
</script>
|
</body>
|
</html>
|