|
@@ -298,15 +298,16 @@
|
|
<body>
|
|
<body>
|
|
<ul class="nav nav-tabs">
|
|
<ul class="nav nav-tabs">
|
|
<li><a href="${ctx}/product/new/list?searchProductCategory=2">二手商品列表</a></li>
|
|
<li><a href="${ctx}/product/new/list?searchProductCategory=2">二手商品列表</a></li>
|
|
- <li class="active"><a href="${ctx}/product/cmSecondHandDetail/cmSecondDetailForm?searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&fileTypes=999">二手估价商品添加 / 编辑</a></li>
|
|
|
|
|
|
+ <li class="active"><a href="${ctx}/product/cmSecondHandDetail/cmSecondDetailForm?searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&fileTypes=999">二手估价商品添加</a></li>
|
|
</ul>
|
|
</ul>
|
|
<br/>
|
|
<br/>
|
|
<form:form id="inputForm" modelAttribute="cmSecondHandDetail"
|
|
<form:form id="inputForm" modelAttribute="cmSecondHandDetail"
|
|
- action="${ctx}/product/cmSecondHandDetail/save?searchName=${cmSecondHandDetail.searchName}&searchShopID=${cmSecondHandDetail.searchShopID}&searchShopName=${cmSecondHandDetail.searchShopName}&searchBigTypeID=${cmSecondHandDetail.searchBigTypeID}&searchSmallTypeID=${cmSecondHandDetail.searchSmallTypeID}&searchTinyTypeID=${cmSecondHandDetail.searchTinyTypeID}&searchValidFlag=${cmSecondHandDetail.searchValidFlag}&searchActStatus=${cmSecondHandDetail.searchActStatus}&searchProductType=${cmSecondHandDetail.searchProductType}&searchBrandID=${cmSecondHandDetail.searchBrandID}&searchPreferredFlag=${cmSecondHandDetail.searchPreferredFlag}&searchProductCategory=${cmSecondHandDetail.searchProductCategory}&editFlag=${cmSecondHandDetail.editFlag}"
|
|
|
|
|
|
+ action="${ctx}/product/cmSecondHandDetail/save?searchName=${cmSecondHandDetail.searchName}&announType=2&searchShopID=${cmSecondHandDetail.searchShopID}&searchShopName=${cmSecondHandDetail.searchShopName}&searchBigTypeID=${cmSecondHandDetail.searchBigTypeID}&searchSmallTypeID=${cmSecondHandDetail.searchSmallTypeID}&searchTinyTypeID=${cmSecondHandDetail.searchTinyTypeID}&searchValidFlag=${cmSecondHandDetail.searchValidFlag}&searchActStatus=${cmSecondHandDetail.searchActStatus}&searchProductType=${cmSecondHandDetail.searchProductType}&searchBrandID=${cmSecondHandDetail.searchBrandID}&searchPreferredFlag=${cmSecondHandDetail.searchPreferredFlag}&searchProductCategory=${cmSecondHandDetail.searchProductCategory}&editFlag=${cmSecondHandDetail.editFlag}"
|
|
method="post" class="form-horizontal">
|
|
method="post" class="form-horizontal">
|
|
<form:hidden path="id"/>
|
|
<form:hidden path="id"/>
|
|
<form:hidden path="validFlag"/>
|
|
<form:hidden path="validFlag"/>
|
|
<form:hidden path="payType"/>
|
|
<form:hidden path="payType"/>
|
|
|
|
+ <input value="2" type="hidden" id="announType">
|
|
<sys:message content="${message}"/>
|
|
<sys:message content="${message}"/>
|
|
<%-- 新增加不需要显示--%>
|
|
<%-- 新增加不需要显示--%>
|
|
<c:if test="${ not empty cmSecondHandDetail.id}">
|
|
<c:if test="${ not empty cmSecondHandDetail.id}">
|
|
@@ -338,7 +339,7 @@
|
|
<div class="control-group">
|
|
<div class="control-group">
|
|
<label class="control-label"><font color="red">*</font>发布者:</label>
|
|
<label class="control-label"><font color="red">*</font>发布者:</label>
|
|
<div class="controls" style="margin-top: 5px">
|
|
<div class="controls" style="margin-top: 5px">
|
|
- <form:input path="publisher" htmlEscape="false" maxlength="45" class="input-xlarge required"/>
|
|
|
|
|
|
+ <form:input path="publisher" htmlEscape="false" maxlength="45" class="input-xlarge required"/> <span style="color: red">(请填写真实的二手卖家姓名)</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<div class="control-group">
|
|
@@ -366,8 +367,8 @@
|
|
<div class="control-group">
|
|
<div class="control-group">
|
|
<label class="control-label"><font color="red">*</font>分类:</label>
|
|
<label class="control-label"><font color="red">*</font>分类:</label>
|
|
<div class="controls c-s" style="margin-top: 5px">
|
|
<div class="controls c-s" style="margin-top: 5px">
|
|
- <form:radiobutton path="secondHandType" value="1" label="二手仪器"/>
|
|
|
|
- <form:radiobutton path="secondHandType" value="3" label="其他"/>
|
|
|
|
|
|
+ <form:radiobutton path="secondHandType" name="secondHandType" value="1" label="二手仪器"/>
|
|
|
|
+ <form:radiobutton path="secondHandType" name="secondHandType" value="3" label="其他"/>
|
|
</div>
|
|
</div>
|
|
<div class="controls c-s bigTypeList" style="margin-left: 181px">
|
|
<div class="controls c-s bigTypeList" style="margin-left: 181px">
|
|
<form:checkboxes path="bigTypeList" items="${typeList}" itemLabel="name" itemValue="id" htmlEscape="false"
|
|
<form:checkboxes path="bigTypeList" items="${typeList}" itemLabel="name" itemValue="id" htmlEscape="false"
|
|
@@ -402,7 +403,7 @@
|
|
<label class="control-label"><font color="red">*</font>商品品牌:</label>
|
|
<label class="control-label"><font color="red">*</font>商品品牌:</label>
|
|
<div class="controls">
|
|
<div class="controls">
|
|
<form:select path="brandID" class="input-medium required">
|
|
<form:select path="brandID" class="input-medium required">
|
|
- <form:option value="">请选择</form:option>
|
|
|
|
|
|
+ <form:option value=" ">请选择</form:option>
|
|
<c:forEach items="${brandList}" var="brand">
|
|
<c:forEach items="${brandList}" var="brand">
|
|
<form:option value="${brand.id}">${brand.name}</form:option>
|
|
<form:option value="${brand.id}">${brand.name}</form:option>
|
|
</c:forEach>
|
|
</c:forEach>
|
|
@@ -543,15 +544,15 @@
|
|
<form:input path="townId" Id="townId" type="hidden" value="${cmSecondHandDetail.townId}"/>
|
|
<form:input path="townId" Id="townId" type="hidden" value="${cmSecondHandDetail.townId}"/>
|
|
<label class="control-label"><font color="red">*</font>联系地址:</label>
|
|
<label class="control-label"><font color="red">*</font>联系地址:</label>
|
|
<div>
|
|
<div>
|
|
- <form:select path="province" class="input-xlarge " id="province"
|
|
|
|
|
|
+ <form:select path="province" class="input-xlarge required" id="province"
|
|
onchange="loadCity()" style="width:100px;">
|
|
onchange="loadCity()" style="width:100px;">
|
|
<form:option value="" label="省" provinceId=""/>
|
|
<form:option value="" label="省" provinceId=""/>
|
|
</form:select>
|
|
</form:select>
|
|
- <form:select path="city" class="input-xlarge " id="city" onchange="loadTown()"
|
|
|
|
|
|
+ <form:select path="city" class="input-xlarge required" id="city" onchange="loadTown()"
|
|
style="width:100px;">
|
|
style="width:100px;">
|
|
<form:option value="" label="市" cityId=""/>
|
|
<form:option value="" label="市" cityId=""/>
|
|
</form:select> <%--required--%>
|
|
</form:select> <%--required--%>
|
|
- <form:select path="town" class="input-xlarge " id="town" style="width:100px;">
|
|
|
|
|
|
+ <form:select path="town" class="input-xlarge required" id="town" style="width:100px;">
|
|
<form:option value="" label="区"/>
|
|
<form:option value="" label="区"/>
|
|
</form:select>
|
|
</form:select>
|
|
<form:input path="address" htmlEscape="false" maxlength="100" class="input-xlarge "/>
|
|
<form:input path="address" htmlEscape="false" maxlength="100" class="input-xlarge "/>
|
|
@@ -641,6 +642,106 @@
|
|
</div>
|
|
</div>
|
|
</form:form>
|
|
</form:form>
|
|
<script>
|
|
<script>
|
|
|
|
+ $(function () {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // 加载地址
|
|
|
|
+ loadProvince();
|
|
|
|
+
|
|
|
|
+ // 初始化付款状态
|
|
|
|
+ if ($('#payStatus').val() == '1' || $('#payStatus').val() == '3') {
|
|
|
|
+ //待支付情况下不能填写付款金额
|
|
|
|
+ $('.payAmount').hide();
|
|
|
|
+ $('#payAmount').removeClass('required');
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if ($('#payStatus').val() == '2') {
|
|
|
|
+ //已支付情况下需要填写付款金额, 而且必填
|
|
|
|
+ $('.payAmount').show();
|
|
|
|
+ $('#payAmount').addClass('required');
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 价格控制
|
|
|
|
+ if (val == 1 || val == 3) {
|
|
|
|
+ $('.showClassDiv').hide();
|
|
|
|
+ }
|
|
|
|
+ if (val == 2) {
|
|
|
|
+ $('.showClassDiv').show();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 修改支付状态
|
|
|
|
+ $('#payStatus').change(function () {
|
|
|
|
+ var val = $("#payStatus").val();
|
|
|
|
+ if (val == 1 || val == 3) {
|
|
|
|
+ //待支付情况下不能填写付款金额
|
|
|
|
+ $('.payAmount').hide();
|
|
|
|
+ $('#payAmount').removeClass('required');
|
|
|
|
+ }
|
|
|
|
+ if (val == 2) {
|
|
|
|
+ //待支付情况下不能填写付款金额
|
|
|
|
+ $('.payAmount').show();
|
|
|
|
+ $('#payAmount').addClass('required');
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // 初始化分类
|
|
|
|
+ var val = $("input[name ='secondHandType']:checked").val();
|
|
|
|
+ console.log(val)
|
|
|
|
+ // 分类控制
|
|
|
|
+ if (val == 2 || val == 3 || val == undefined) {
|
|
|
|
+ $('.bigTypeList').hide();
|
|
|
|
+ }
|
|
|
|
+ if (val == 1) {
|
|
|
|
+ $('.bigTypeList').show();
|
|
|
|
+ }
|
|
|
|
+ // 修改分类
|
|
|
|
+ $("input[name='secondHandType']").change(function () {
|
|
|
|
+ var val = $(this).val();
|
|
|
|
+ console.log(val)
|
|
|
|
+ // 分类控制
|
|
|
|
+ if (val == 2 || val == 3) {
|
|
|
|
+ $('.bigTypeList').hide();
|
|
|
|
+ }
|
|
|
|
+ if (val == 1) {
|
|
|
|
+ $('.bigTypeList').show();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 价格控制
|
|
|
|
+ if (val == 1 || val == 3) {
|
|
|
|
+ $('.showClassDiv').hide();
|
|
|
|
+ }
|
|
|
|
+ if (val == 2) {
|
|
|
|
+ $('.showClassDiv').show();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ });
|
|
|
|
+ $('#brandID').change(function () {
|
|
|
|
+ var val = $(this).val();
|
|
|
|
+ console.log(val)
|
|
|
|
+ if (val == '161') {
|
|
|
|
+ //显示输入框
|
|
|
|
+ $("#brandName").show();
|
|
|
|
+ }
|
|
|
|
+ if (val != '161') {
|
|
|
|
+ //隐藏输入框
|
|
|
|
+ $("#brandName").hide();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ //初始化
|
|
|
|
+ var val = $("#brandID option:selected").val();
|
|
|
|
+ if (val == '161') {
|
|
|
|
+ //显示输入框
|
|
|
|
+ $("#brandName").show();
|
|
|
|
+ }
|
|
|
|
+ if (val != '161') {
|
|
|
|
+ //隐藏输入框
|
|
|
|
+ $("#brandName").hide();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
|
|
//图片初始化
|
|
//图片初始化
|
|
$(function () {
|
|
$(function () {
|
|
@@ -712,7 +813,6 @@
|
|
eval(str + '()');
|
|
eval(str + '()');
|
|
});
|
|
});
|
|
$('body').on('click', '.cancel-upload', function () {
|
|
$('body').on('click', '.cancel-upload', function () {
|
|
- debugger
|
|
|
|
var wrapper = $(this).closest('.conList');
|
|
var wrapper = $(this).closest('.conList');
|
|
wrapper.find('li').css('z-index', '-1');
|
|
wrapper.find('li').css('z-index', '-1');
|
|
wrapper.find('input').val('');
|
|
wrapper.find('input').val('');
|
|
@@ -847,103 +947,6 @@
|
|
});
|
|
});
|
|
})
|
|
})
|
|
});
|
|
});
|
|
- $(function () {
|
|
|
|
- // 加载地址
|
|
|
|
- loadProvince();
|
|
|
|
-
|
|
|
|
- // 初始化付款状态
|
|
|
|
- if ($('#payStatus').val() == '1' || $('#payStatus').val() == '3') {
|
|
|
|
- //待支付情况下不能填写付款金额
|
|
|
|
- $('.payAmount').hide();
|
|
|
|
- $('#payAmount').removeClass('required');
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if ($('#payStatus').val() == '2') {
|
|
|
|
- //已支付情况下需要填写付款金额, 而且必填
|
|
|
|
- $('.payAmount').show();
|
|
|
|
- $('#payAmount').addClass('required');
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- // 初始化分类
|
|
|
|
- var val = $("input[name ='secondHandType']:checked").val();
|
|
|
|
- // 分类控制
|
|
|
|
- if (val == 2 || val == 3 || val == undefined) {
|
|
|
|
- $('.bigTypeList').hide();
|
|
|
|
- }
|
|
|
|
- if (val == 1) {
|
|
|
|
- $('.bigTypeList').show();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- // 价格控制
|
|
|
|
- if (val == 1 || val == 3) {
|
|
|
|
- $('.showClassDiv').hide();
|
|
|
|
- }
|
|
|
|
- if (val == 2) {
|
|
|
|
- $('.showClassDiv').show();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- $('#brandID').change(function () {
|
|
|
|
- var val = $(this).val();
|
|
|
|
- if (val == '161') {
|
|
|
|
- //显示输入框
|
|
|
|
- $("#brandName").show();
|
|
|
|
- }
|
|
|
|
- if (val != '161') {
|
|
|
|
- //隐藏输入框
|
|
|
|
- $("#brandName").hide();
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- //初始化
|
|
|
|
- var val = $("#brandID option:selected").val();
|
|
|
|
- if (val == '161') {
|
|
|
|
- //显示输入框
|
|
|
|
- $("#brandName").show();
|
|
|
|
- }
|
|
|
|
- if (val != '161') {
|
|
|
|
- //隐藏输入框
|
|
|
|
- $("#brandName").hide();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- // 修改支付状态
|
|
|
|
- $('#payStatus').change(function () {
|
|
|
|
- var val = $("#payStatus").val();
|
|
|
|
- if (val == 1 || val == 3) {
|
|
|
|
- //待支付情况下不能填写付款金额
|
|
|
|
- $('.payAmount').hide();
|
|
|
|
- $('#payAmount').removeClass('required');
|
|
|
|
- }
|
|
|
|
- if (val == 2) {
|
|
|
|
- //待支付情况下不能填写付款金额
|
|
|
|
- $('.payAmount').show();
|
|
|
|
- $('#payAmount').addClass('required');
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- );
|
|
|
|
- // 修改分类
|
|
|
|
- $("input[name='secondHandType']").change(function () {
|
|
|
|
- var val = $(this).val();
|
|
|
|
- // 分类控制
|
|
|
|
- if (val == 2 || val == 3) {
|
|
|
|
- $('.bigTypeList').hide();
|
|
|
|
- }
|
|
|
|
- if (val == 1) {
|
|
|
|
- $('.bigTypeList').show();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- // 价格控制
|
|
|
|
- if (val == 1 || val == 3) {
|
|
|
|
- $('.showClassDiv').hide();
|
|
|
|
- }
|
|
|
|
- if (val == 2) {
|
|
|
|
- $('.showClassDiv').show();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- });
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* 加载省份
|
|
* 加载省份
|
|
@@ -1106,6 +1109,7 @@
|
|
}
|
|
}
|
|
|
|
|
|
var secondHandType = $("input[name ='secondHandType']:checked").val();
|
|
var secondHandType = $("input[name ='secondHandType']:checked").val();
|
|
|
|
+ console.log(secondHandType)
|
|
if (secondHandType == 2) {
|
|
if (secondHandType == 2) {
|
|
var maturityYears = $("#maturityYears").val();
|
|
var maturityYears = $("#maturityYears").val();
|
|
// (验证到期时期)
|
|
// (验证到期时期)
|