|
@@ -149,7 +149,12 @@
|
|
|
<body>
|
|
|
<ul class="nav nav-tabs">
|
|
|
<li><a href="${ctx}/product/new/list">商品信息列表</a></li>
|
|
|
- <li class="active"><a href="${ctx}/product/new/productEdit?id=${product.id}">商品信息编辑</a></li>
|
|
|
+ <c:if test="${not empty product.id}">
|
|
|
+ <li class="active"><a href="${ctx}/product/new/productEdit?id=${product.id}">商品信息编辑</a></li>
|
|
|
+ </c:if>
|
|
|
+ <c:if test="${empty product.id}">
|
|
|
+ <li class="active"><a href="${ctx}/product/new/productEdit?id=${product.id}">发布特殊供应商商品</a></li>
|
|
|
+ </c:if>
|
|
|
</ul>
|
|
|
<form:form id="inputForm" modelAttribute="product"
|
|
|
action="${ctx}/product/new/productSave?searchShopID=${product.searchShopID}&searchShopName=${product.searchShopName}&searchBigTypeID=${product.searchBigTypeID}&searchSmallTypeID=${product.searchSmallTypeID}&searchTinyTypeID=${product.searchTinyTypeID}&searchValidFlag=${product.searchValidFlag}&searchActStatus=${product.searchActStatus}&searchProductType=${product.searchProductType}&searchBrandID=${product.searchBrandID}&searchPreferredFlag=${product.searchPreferredFlag}&searchProductCategory=${product.searchProductCategory}&editFlag=${product.editFlag}&shopType=${product.shopType}"
|
|
@@ -234,11 +239,13 @@
|
|
|
</tr>
|
|
|
<c:if test="${product.shopType == 2}">
|
|
|
<tr>
|
|
|
- <th><span style="color: red">*</span>供应商:</th>
|
|
|
+ <th><span style="color: red">*</span>供应商:</th>
|
|
|
<td colspan="3">
|
|
|
- <form:select path="shopID" class="input-small required">
|
|
|
+ <form:select path="shopID" class="input-small required" onchange="getCodes(this.value)">
|
|
|
<form:option value="" label="请选择"/>
|
|
|
- <form:options items="${shopList}" itemLabel="name" itemValue="shopID" htmlEscape="false"/>
|
|
|
+ <c:forEach items="${shopList}" var="shop" varStatus="index">
|
|
|
+ <form:option value="${shop.shopID}" label="${shop.name}"/>
|
|
|
+ </c:forEach>
|
|
|
</form:select>
|
|
|
</td>
|
|
|
</tr>
|
|
@@ -499,13 +506,19 @@
|
|
|
<tr>
|
|
|
<th>线上分账账号:</th>
|
|
|
<td colspan="3">
|
|
|
- <form:select path="splitCode" class="select-ele input-medium required">
|
|
|
+ <c:if test="${not empty product.productID}">
|
|
|
+ <form:select path="splitCode" class="select-ele input-medium">
|
|
|
<form:option value="" label="请选择"/>
|
|
|
<c:forEach items="${splitCodeList}" var="splitCodeList" varStatus="index">
|
|
|
- <form:option value="${splitCodeList.splitCode}" label="${splitCodeList.splitCode} ${splitCodeList.codeRemark}"/>
|
|
|
+ <form:option value="${splitCodeList.splitCode}" label="${splitCodeList.codeRemark}"/>
|
|
|
</c:forEach>
|
|
|
</form:select>
|
|
|
-<%-- <form:input path="splitCode" type="text" id="splitCode" maxlength="15"/>--%>
|
|
|
+ </c:if>
|
|
|
+ <c:if test="${empty product.productID}">
|
|
|
+ <form:select path="splitCode" class="select-ele input-medium" id="getCode">
|
|
|
+ <form:option value="" label="请选择"/>
|
|
|
+ </form:select>
|
|
|
+ </c:if>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr id="taxPointDiv">
|
|
@@ -894,6 +907,26 @@
|
|
|
<%-- });--%>
|
|
|
<%--});--%>
|
|
|
|
|
|
+ function getCodes(data){
|
|
|
+
|
|
|
+ var opts = "<option value=''>请选择</option>";
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ url: "${ctx}/product/new/getCodes",
|
|
|
+ data: {"shopId": data},
|
|
|
+ success: function (res) {
|
|
|
+ console.log("data------------------->"+res)
|
|
|
+ for (let i = 0; i < res.length; i++) {
|
|
|
+ opts += "<option value='" + res[i].splitCode + "'>" + res[i].codeName + "</option>";
|
|
|
+ }
|
|
|
+ console.log(opts);
|
|
|
+ $("#getCode").html('').append(opts);
|
|
|
+ },
|
|
|
+ error: function (res) {
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
//图片初始化
|
|
|
if(${product.shopType == 2}){
|
|
|
$(function () {
|