|
@@ -25,14 +25,14 @@
|
|
|
<form action="${pageContext.request.contextPath }/admin/product/add" class="form form-horizontal" id="form-addGoods" method="POST" enctype="multipart/form-data">
|
|
|
<div class="row cl">
|
|
|
<label class="form-label col-2"><span class="c-red">*</span>产品名称:</label>
|
|
|
- <div class="formControls col-4">
|
|
|
+ <div class="formControls col-3">
|
|
|
<input id="productName" name="productName" type="text" class="input-text" value="" placeholder="" >
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="row cl">
|
|
|
<label class="form-label col-2"><span class="c-red">*</span>产品类型:</label>
|
|
|
- <div class="formControls col-2">
|
|
|
+ <div class="formControls col-3">
|
|
|
<span class="select-box">
|
|
|
<select id="typeId" name="productType.typeId" class="select">
|
|
|
<c:forEach items="${typeList}" var="type" varStatus="status">
|
|
@@ -57,6 +57,7 @@
|
|
|
<th width="100">销售价(元)</th>
|
|
|
<th width="100">69码</th>
|
|
|
<th width="100">PTS产品</th>
|
|
|
+ <th width="100">操作</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody id="colorTableId">
|
|
@@ -86,17 +87,17 @@
|
|
|
<div class="row cl">
|
|
|
<label class="form-label col-2 colorName"><span class="c-red">*</span>颜色名称:</label>
|
|
|
<div class="formControls col-3">
|
|
|
- <input type="text" name="colorName" id="colorName" placeholder="" value="" class="input-text" style="width:150px;">
|
|
|
+ <input type="text" name="colorName" id="colorName" placeholder="" value="" class="input-text" style="">
|
|
|
</div>
|
|
|
<label class="form-label col-2 colorName"><span class="c-red">*</span>颜色简述:</label>
|
|
|
- <div class="formControls col-1">
|
|
|
- <input type="text" name="colorPresent" id="colorPresent" placeholder="" value="" class="input-text" style="width:150px;">
|
|
|
+ <div class="formControls col-3">
|
|
|
+ <input type="text" name="colorPresent" id="colorPresent" placeholder="" value="" class="input-text" style="">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="row cl">
|
|
|
<label class="form-label col-2 colorName"><span class="c-red">*</span>颜色状态:</label>
|
|
|
<div class="formControls col-3">
|
|
|
- <select id="colorStatus" name="colorStatus" class="select">
|
|
|
+ <select id="colorStatus" name="colorStatus" class="select" style="height: 31px;">
|
|
|
<option value="1">在售</option>
|
|
|
<option value="2">停止销售</option>
|
|
|
<option value="3">删除</option>
|
|
@@ -106,23 +107,23 @@
|
|
|
<div class="row cl">
|
|
|
<label class="form-label col-2 colorName"><span class="c-red">*</span>市场价:</label>
|
|
|
<div class="formControls col-3">
|
|
|
- <input type="text" name="colorPrice" id="colorPrice" placeholder="" value="" class="input-text" style="width:150px;">
|
|
|
+ <input type="text" name="colorPrice" id="colorPrice" placeholder="" value="" class="input-text" style="">
|
|
|
</div>
|
|
|
<label class="form-label col-2 colorName"><span class="c-red">*</span>销售价:</label>
|
|
|
- <div class="formControls col-1">
|
|
|
- <input type="text" name="colorDiscount" id="colorDiscount" placeholder="" value="" class="input-text" style="width:150px;">
|
|
|
+ <div class="formControls col-3">
|
|
|
+ <input type="text" name="colorDiscount" id="colorDiscount" placeholder="" value="" class="input-text" style="">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="row cl">
|
|
|
<label class="form-label col-2 colorName"><span class="c-red">*</span>产品69码:</label>
|
|
|
<div class="formControls col-3">
|
|
|
- <input type="text" name="color69Code" id="color69Code" placeholder="" value="" class="input-text" style="width:150px;">
|
|
|
+ <input type="text" name="color69Code" id="color69Code" placeholder="" value="" class="input-text" style="">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="row cl">
|
|
|
<label class="form-label col-2 colorName"><span class="c-red">*</span>PTS产品:</label>
|
|
|
<div class="formControls col-3">
|
|
|
- <select id="ptsProductid" name="ptsProductid" class="select">
|
|
|
+ <select id="ptsProductid" name="ptsProductid" class="select" style="height: 31px;">
|
|
|
<c:forEach items="${toothInfo}" var="toothInfo">
|
|
|
<option value="${toothInfo.produceId}">${toothInfo.produceName }</option>
|
|
|
</c:forEach>
|
|
@@ -162,6 +163,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
+
|
|
|
+
|
|
|
<div class="row cl">
|
|
|
<div class="col-10 col-offset-2">
|
|
|
<!-- <button onClick="return admin_addGoods();" class="btn btn-primary radius" type="submit"><i class="Hui-iconfont"></i> 保存</button> -->
|
|
@@ -404,16 +407,30 @@ function checkProduct(){
|
|
|
var productName = $("#productName").val();
|
|
|
if(productName == '' || productName == null){
|
|
|
layer.msg("产品名称不能为空",{icon: 2,time:2000});
|
|
|
- return;
|
|
|
+ return false;
|
|
|
}
|
|
|
|
|
|
+ /*至少一种颜色*/
|
|
|
+ var colorHtml = $("#colorTableId").find("tr").html();
|
|
|
+ if(colorHtml == null || colorHtml == ""){
|
|
|
+ layer.msg("至少需要添加一种颜色",{icon: 2,time:2000});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
//产品banner图名称验证
|
|
|
var productBannerImg = $("#productBannerImg").val();
|
|
|
if(productBannerImg == null || productBannerImg == ''){
|
|
|
layer.msg("产品banner图不能为空",{icon: 2,time:2000});
|
|
|
- return;
|
|
|
+ return false;
|
|
|
}
|
|
|
+
|
|
|
+ /*产品图文必填*/
|
|
|
+ var desc = $("#productsInfoProductdesc").val();
|
|
|
+ if(desc == null || desc == ""){
|
|
|
+ layer.msg("产品图文不能为空",{icon: 2,time:2000});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
/*//原价乘100 取整
|
|
|
$.each(colorPrice,function(n,index){
|
|
|
$(this).val(Math.round($(this).val() * 100));
|
|
@@ -576,10 +593,15 @@ function addColorTable(){
|
|
|
'<td>'+$("#colorDiscount").val()+'</td>'+
|
|
|
'<td>'+$("#color69Code").val()+'</td>'+
|
|
|
'<td>'+ptsProductid+'</td>'+
|
|
|
+ '<td><a href="javascript:viod(0)" onclick="delColor(this)" style="color: #00d;">删除</a></td>'+
|
|
|
'</tr>';
|
|
|
$("#colorTableId").append(colorTable);
|
|
|
}
|
|
|
|
|
|
+function delColor(node){
|
|
|
+ $(node).parent().parent().remove();
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
</script>
|
|
|
</body>
|