|
@@ -1,13 +1,13 @@
|
|
<!DOCTYPE HTML>
|
|
<!DOCTYPE HTML>
|
|
<html>
|
|
<html>
|
|
<head>
|
|
<head>
|
|
-<meta charset="utf-8">
|
|
|
|
-<meta name="renderer" content="webkit|ie-comp|ie-stand">
|
|
|
|
-<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
|
|
-<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
|
|
|
|
-<meta http-equiv="Cache-Control" content="no-siteapp" />
|
|
|
|
|
|
+ <meta charset="utf-8">
|
|
|
|
+ <meta name="renderer" content="webkit|ie-comp|ie-stand">
|
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
|
|
+ <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
|
|
|
|
+ <meta http-equiv="Cache-Control" content="no-siteapp" />
|
|
<#include "/base/add_base.ftl">
|
|
<#include "/base/add_base.ftl">
|
|
-<title>添加翻新机</title>
|
|
|
|
|
|
+ <title>添加翻新机</title>
|
|
<style>
|
|
<style>
|
|
.my-title{font-weight: 500;padding-left: 15px;position: relative;}
|
|
.my-title{font-weight: 500;padding-left: 15px;position: relative;}
|
|
.my-title:after{content: '';position: absolute;left: 0;top:12%;width: 3px;height: 80%;background: #32a3d8;}
|
|
.my-title:after{content: '';position: absolute;left: 0;top:12%;width: 3px;height: 80%;background: #32a3d8;}
|
|
@@ -23,65 +23,55 @@
|
|
.my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;width: 80%; height: 34px; -webkit-appearance:none;appearance:none;background: url(http://s.iamberry.com/images/select-1.png) right center no-repeat #fff;background-size:auto 100%;}
|
|
.my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;width: 80%; height: 34px; -webkit-appearance:none;appearance:none;background: url(http://s.iamberry.com/images/select-1.png) right center no-repeat #fff;background-size:auto 100%;}
|
|
input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
|
|
input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
|
|
input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
|
|
input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
|
|
- .spanhidth{width: 70px;text-align: right;}
|
|
|
|
- </style>
|
|
|
|
|
|
+ .spanhidth{width: 70px;text-align: right;}
|
|
|
|
+ </style>
|
|
|
|
|
|
</head>
|
|
</head>
|
|
<body>
|
|
<body>
|
|
<div class="pd-20">
|
|
<div class="pd-20">
|
|
- <form class="form form-horizontal" id="form-admin-add">
|
|
|
|
|
|
+ <form class="form form-horizontal" id="form-admin-add">
|
|
<div class="input-box">
|
|
<div class="input-box">
|
|
- <span class="input-dic spanhidth">产品:</span>
|
|
|
|
- <select class="my-select" name="produceId" id="produceId">
|
|
|
|
- <#if (produceList ?size > 0)>
|
|
|
|
- <#list produceList as list>
|
|
|
|
- <option value ="${list.produceId}">${list.produceName}</option>
|
|
|
|
|
|
+ <span class="input-dic spanhidth">批次:</span>
|
|
|
|
+ <select class="my-select" name="batchId" id="batchId">
|
|
|
|
+ <#if (listptsBatch ?size > 0)>
|
|
|
|
+ <#list listptsBatch as list>
|
|
|
|
+ <option value ="${list.batchId}" softwareVersionNo="${list.softwareVersionNo!''}" bomName="${list.bomName!''}(${list.bomVersion!''})">${list.batchNo}</option>
|
|
</#list>
|
|
</#list>
|
|
<#else >
|
|
<#else >
|
|
- <option value ="">暂无产品,请先添加产品</option>
|
|
|
|
|
|
+ <option value ="">暂无批次,请先添加批次</option>
|
|
</#if>
|
|
</#if>
|
|
</select>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
- <div class="input-box">
|
|
|
|
- <span class="input-dic spanhidth">批次:</span>
|
|
|
|
- <select class="my-select" name="batchId" id="batchId">
|
|
|
|
- <#if (listptsBatch ?size > 0)>
|
|
|
|
- <#list listptsBatch as list>
|
|
|
|
- <option value ="${list.batchId}">${list.batchNo}</option>
|
|
|
|
- </#list>
|
|
|
|
- <#else >
|
|
|
|
- <option value ="">暂无批次,请先添加批次</option>
|
|
|
|
- </#if>
|
|
|
|
- </select><br>
|
|
|
|
- <span style="margin-left: 15.5%">请对照生产计划部给到的纸制生产计划信息。</span>
|
|
|
|
- </div>
|
|
|
|
<div class="input-box">
|
|
<div class="input-box">
|
|
<span class="input-dic spanhidth">软件版本:</span>
|
|
<span class="input-dic spanhidth">软件版本:</span>
|
|
- <select class="my-select" name="versionId" id="versionId">
|
|
|
|
- <#if (listVersion ?size > 0)>
|
|
|
|
- <#list listVersion as list>
|
|
|
|
- <option value ="${list.machineVersionId}">${list.machineVersionName}</option>
|
|
|
|
- </#list>
|
|
|
|
- <#else >
|
|
|
|
- <option value ="">暂无软件版本,请先添加软件版本</option>
|
|
|
|
- </#if>
|
|
|
|
- </select>
|
|
|
|
|
|
+ <span class="input-dic spanhidth" id="softwareVersionNo" style="width: 76%;text-align: left;padding-left: 10px; margin-bottom: 10px;height: 30px;"></span>
|
|
|
|
+ <#-- <input class="my-input" type="text" style="width: 76%;" name="machineLine" id="machineLine" value="A1"/>-->
|
|
|
|
+ <#--<select class="my-select" name="versionId" id="versionId">
|
|
|
|
+ <#if (listVersion ?size > 0)>
|
|
|
|
+ <#list listVersion as list>
|
|
|
|
+ <option value ="${list.machineVersionId}">${list.machineVersionName}</option>
|
|
|
|
+ </#list>
|
|
|
|
+ <#else >
|
|
|
|
+ <option value ="">暂无软件版本,请先添加软件版本</option>
|
|
|
|
+ </#if>
|
|
|
|
+ </select>-->
|
|
</div>
|
|
</div>
|
|
<div class="input-box">
|
|
<div class="input-box">
|
|
<span class="input-dic spanhidth">Bom单:</span>
|
|
<span class="input-dic spanhidth">Bom单:</span>
|
|
- <select class="my-select" name="bomId" id="bomId">
|
|
|
|
- <#if listBom??>
|
|
|
|
- <#if (listBom ?size > 0)>
|
|
|
|
- <#list listBom as list>
|
|
|
|
- <option value ="${list.bomId}">${list.bomName}</option>
|
|
|
|
- </#list>
|
|
|
|
|
|
+ <span class="input-dic spanhidth" id="bomName" style="width: 76%;text-align: left;padding-left: 10px; margin-bottom: 15px;height: 30px;"></span>
|
|
|
|
+ <#--<select class="my-select" name="bomId" id="bomId">
|
|
|
|
+ <#if listBom??>
|
|
|
|
+ <#if (listBom ?size > 0)>
|
|
|
|
+ <#list listBom as list>
|
|
|
|
+ <option value ="${list.bomId}">${list.bomName}</option>
|
|
|
|
+ </#list>
|
|
|
|
+ <#else >
|
|
|
|
+ <option value ="">暂无Bom,请先添加Bom单</option>
|
|
|
|
+ </#if>
|
|
<#else >
|
|
<#else >
|
|
<option value ="">暂无Bom,请先添加Bom单</option>
|
|
<option value ="">暂无Bom,请先添加Bom单</option>
|
|
</#if>
|
|
</#if>
|
|
- <#else >
|
|
|
|
- <option value ="">暂无Bom,请先添加Bom单</option>
|
|
|
|
- </#if>
|
|
|
|
- </select>
|
|
|
|
|
|
+ </select>-->
|
|
</div>
|
|
</div>
|
|
<div class="input-box">
|
|
<div class="input-box">
|
|
<span class="input-dic" style="margin-top: 0">是否翻新机:</span>
|
|
<span class="input-dic" style="margin-top: 0">是否翻新机:</span>
|
|
@@ -93,7 +83,9 @@
|
|
</label>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <div class="input-box"><span class="input-dic spanhidth">拉线:</span><input class="my-input" type="text" style="width: 76%;" name="machineLine" id="machineLine" value="A1"/> </div>
|
|
|
|
|
|
+ <div class="input-box"><span class="input-dic spanhidth">拉线:</span>
|
|
|
|
+ <input class="my-input" type="text" style="width: 76%;" name="machineLine" id="machineLine" value="A1"/>
|
|
|
|
+ </div>
|
|
<div class="input-box"><span class="input-dic spanhidth">机器数量:</span><input class="my-input" type="text" style="width: 76%;" name="number" id="number" value="4" placeholder="每次最少生成一个机器"/> </div>
|
|
<div class="input-box"><span class="input-dic spanhidth">机器数量:</span><input class="my-input" type="text" style="width: 76%;" name="number" id="number" value="4" placeholder="每次最少生成一个机器"/> </div>
|
|
<div class="input-box">如果遇到批次,软件版本,BOM不清晰时,请联系POA(刘经理)</div>
|
|
<div class="input-box">如果遇到批次,软件版本,BOM不清晰时,请联系POA(刘经理)</div>
|
|
|
|
|
|
@@ -102,31 +94,38 @@
|
|
<input id="sumbit" class="btn btn-primary radius" type="button" value=" 提交 " onclick="admin_add()">
|
|
<input id="sumbit" class="btn btn-primary radius" type="button" value=" 提交 " onclick="admin_add()">
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- </form>
|
|
|
|
|
|
+ </form>
|
|
</div>
|
|
</div>
|
|
<#--<script type="text/javascript" src="${path}/common/admin/js/tips.js"></script>-->
|
|
<#--<script type="text/javascript" src="${path}/common/admin/js/tips.js"></script>-->
|
|
<script type="text/javascript">
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
+ $(function(){
|
|
|
|
+ var version = $("#batchId").find("option:selected").attr("softwareVersionNo");
|
|
|
|
+ var bomName = $("#batchId").find("option:selected").attr("bomName");
|
|
|
|
+ $("#softwareVersionNo").html(version);
|
|
|
|
+ $("#bomName").html(bomName);
|
|
|
|
+ })
|
|
|
|
+
|
|
/*监听批次修改Bom bom单*/
|
|
/*监听批次修改Bom bom单*/
|
|
$("#batchId").change(function(){
|
|
$("#batchId").change(function(){
|
|
var batchId = $(this).val();
|
|
var batchId = $(this).val();
|
|
- getBom(batchId);
|
|
|
|
- });
|
|
|
|
- /*监听产品修改批次 bom单*/
|
|
|
|
- $("#produceId").change(function(){
|
|
|
|
- var produceId = $(this).val();
|
|
|
|
- getProduce(produceId);
|
|
|
|
|
|
+ var version = $("#batchId").find("option:selected").attr("softwareVersionNo");
|
|
|
|
+ var bomName = $("#batchId").find("option:selected").attr("bomName");
|
|
|
|
+ $("#softwareVersionNo").html(version);
|
|
|
|
+ $("#bomName").html(bomName);
|
|
|
|
+ //getBom(batchId);
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+
|
|
/*获取bom信息,赋值在页面上*/
|
|
/*获取bom信息,赋值在页面上*/
|
|
- function getBom(batchId){
|
|
|
|
- var bom = new Object();
|
|
|
|
- $.ajax({
|
|
|
|
- type: "POST",
|
|
|
|
- data: {
|
|
|
|
- batchId : batchId
|
|
|
|
- },
|
|
|
|
- url: "${path}/admin/machine/select_bom",
|
|
|
|
|
|
+ /* function getBom(batchId){
|
|
|
|
+ var bom = new Object();
|
|
|
|
+ $.ajax({
|
|
|
|
+ type: "POST",
|
|
|
|
+ data: {
|
|
|
|
+ batchId : batchId
|
|
|
|
+ },
|
|
|
|
+ url: "${path}/admin/machine/select_bom",
|
|
async: false,
|
|
async: false,
|
|
success: function(data){
|
|
success: function(data){
|
|
if (data.returnCode == 200) {
|
|
if (data.returnCode == 200) {
|
|
@@ -145,111 +144,79 @@
|
|
});
|
|
});
|
|
|
|
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
|
|
|
|
- /*获取批次信息,赋值在页面上*/
|
|
|
|
- function getProduce(produceId){
|
|
|
|
- var listptsBatch = new Object();
|
|
|
|
- $.ajax({
|
|
|
|
- type: "POST",
|
|
|
|
- data: {
|
|
|
|
- productId : produceId
|
|
|
|
- },
|
|
|
|
- url: "${path}/admin/machine/select_Batch",
|
|
|
|
- async: false,
|
|
|
|
- success: function(data){
|
|
|
|
- if (data.returnCode == 200) {
|
|
|
|
- listptsBatch = data.returnMsg.listptsBatch;
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ function dataCharm() {
|
|
|
|
|
|
- if(listptsBatch != null){
|
|
|
|
- $("#bomId").empty();
|
|
|
|
- $("#batchId").empty();
|
|
|
|
- $.each(listptsBatch,function(n,value) {
|
|
|
|
- if(n == 0){
|
|
|
|
- getBom(value.batchId);
|
|
|
|
|
|
+ var batchId = $("#batchId").val();
|
|
|
|
+ if(batchId == null || batchId == "" || typeof(batchId)=="undefined"){
|
|
|
|
+ layer.msg("必须选择一个批次,没有批次请到批次列表添加批次",{icon: 5,time:3000});
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+// var versionId = $("#versionId").val();
|
|
|
|
+// if(versionId == null || versionId == "" || typeof(versionId)=="undefined"){
|
|
|
|
+// layer.msg("必须选择一个软件版本,没有软件版本请到产品列表中添加软件版本",{icon: 5,time:3000});
|
|
|
|
+// return false;
|
|
|
|
+// }
|
|
|
|
+
|
|
|
|
+// var bomId = $("#bomId").val();
|
|
|
|
+// if(bomId == null || bomId == "" || typeof(bomId)=="undefined"){
|
|
|
|
+// layer.msg("必须选择一个Bom单,没有Bom单请到Bom单列表添加Bom单",{icon: 5,time:3000});
|
|
|
|
+// return false;
|
|
|
|
+// }
|
|
|
|
+
|
|
|
|
+ var machineLine = $("#machineLine").val();
|
|
|
|
+ if(machineLine == null || machineLine == "" || typeof(machineLine)=="undefined"){
|
|
|
|
+ layer.msg("拉线不能为空",{icon: 5,time:3000});
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ var number = $("#number").val();
|
|
|
|
+ if(number == null || number == "" || typeof(number)=="undefined"){
|
|
|
|
+ layer.msg("数量不能为空",{icon: 5,time:3000});
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ if(number == 0){
|
|
|
|
+ layer.msg("数量不能小于1",{icon: 5,time:3000});
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ if(1 > number.length > 5){
|
|
|
|
+ layer.msg("数量长度为2-10位",{icon: 5,time:3000});
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /*机器-添加*/
|
|
|
|
+ function admin_add(){
|
|
|
|
+ var msg = dataCharm();
|
|
|
|
+ if(msg){
|
|
|
|
+ $("#submit").attr("disabled","disabled");
|
|
|
|
+ layer.msg('加载中', {icon: 16,time:500000});
|
|
|
|
+ $.ajax({
|
|
|
|
+ url: '${path}/admin/machine/add_renovationMachine',
|
|
|
|
+ type: "POST",
|
|
|
|
+ dataType: "json",
|
|
|
|
+ data: $("#form-admin-add").serialize(),
|
|
|
|
+ success: function(data){
|
|
|
|
+ layer.msg('加载中', {icon: 16});
|
|
|
|
+ $("#submit").removeAttr("disabled");
|
|
|
|
+ if(data.returnCode){
|
|
|
|
+ layer.msg("添加成功",{icon: 1,time:3000});
|
|
|
|
+ window.parent.location.reload();
|
|
|
|
+ var index = parent.layer.getFrameIndex(window.name);
|
|
|
|
+ parent.layer.close(index);
|
|
|
|
+
|
|
|
|
+ }else{
|
|
|
|
+ layer.msg("添加失败",{icon: 5,time:3000});
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ error:function(data){
|
|
|
|
+ layer.msg("添加失败",{icon: 5,time:3000});
|
|
}
|
|
}
|
|
- var appoption = "<option value='"+value.batchId+"'>"+value.batchNo+"</option>";
|
|
|
|
- $("#batchId").append(appoption);
|
|
|
|
});
|
|
});
|
|
-
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- function dataCharm() {
|
|
|
|
-
|
|
|
|
- var batchId = $("#batchId").val();
|
|
|
|
- if(batchId == null || batchId == "" || typeof(batchId)=="undefined"){
|
|
|
|
- layer.msg("必须选择一个批次,没有批次请到批次列表添加批次",{icon: 5,time:3000});
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- var versionId = $("#versionId").val();
|
|
|
|
- if(versionId == null || versionId == "" || typeof(versionId)=="undefined"){
|
|
|
|
- layer.msg("必须选择一个软件版本,没有软件版本请到产品列表中添加软件版本",{icon: 5,time:3000});
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- var bomId = $("#bomId").val();
|
|
|
|
- if(bomId == null || bomId == "" || typeof(bomId)=="undefined"){
|
|
|
|
- layer.msg("必须选择一个Bom单,没有Bom单请到Bom单列表添加Bom单",{icon: 5,time:3000});
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- var machineLine = $("#machineLine").val();
|
|
|
|
- if(machineLine == null || machineLine == "" || typeof(machineLine)=="undefined"){
|
|
|
|
- layer.msg("拉线不能为空",{icon: 5,time:3000});
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
- var number = $("#number").val();
|
|
|
|
- if(number == null || number == "" || typeof(number)=="undefined"){
|
|
|
|
- layer.msg("数量不能为空",{icon: 5,time:3000});
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
- if(number == 0){
|
|
|
|
- layer.msg("数量不能小于1",{icon: 5,time:3000});
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
- if(1 > number.length > 5){
|
|
|
|
- layer.msg("数量长度为2-10位",{icon: 5,time:3000});
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
- return true;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-/*机器-添加*/
|
|
|
|
-function admin_add(){
|
|
|
|
- var msg = dataCharm();
|
|
|
|
- if(msg){
|
|
|
|
- $("#submit").attr("disabled","disabled");
|
|
|
|
- layer.msg('加载中', {icon: 16,time:500000});
|
|
|
|
- $.ajax({
|
|
|
|
- url: '${path}/admin/machine/add_renovationMachine',
|
|
|
|
- type: "POST",
|
|
|
|
- dataType: "json",
|
|
|
|
- data: $("#form-admin-add").serialize(),
|
|
|
|
- success: function(data){
|
|
|
|
- layer.msg('加载中', {icon: 16});
|
|
|
|
- $("#submit").removeAttr("disabled");
|
|
|
|
- if(data.returnCode){
|
|
|
|
- layer.msg("添加成功",{icon: 1,time:3000});
|
|
|
|
- window.parent.location.reload();
|
|
|
|
- var index = parent.layer.getFrameIndex(window.name);
|
|
|
|
- parent.layer.close(index);
|
|
|
|
-
|
|
|
|
- }else{
|
|
|
|
- layer.msg("添加失败",{icon: 5,time:3000});
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- error:function(data){
|
|
|
|
- layer.msg("添加失败",{icon: 5,time:3000});
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
</script>
|
|
</script>
|
|
</body>
|
|
</body>
|
|
</html>
|
|
</html>
|