123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557 |
- <%@ page import="com.thinkgem.jeesite.common.config.Global" %>
- <%@ page contentType="text/html;charset=UTF-8" %>
- <%@ include file="/WEB-INF/views/include/taglib.jsp"%>
- <html>
- <head>
- <title>二手商品列表</title>
- <meta name="decorator" content="default"/>
- <style>
- .customize-class-ct{display:inline-block;width:350px;vertical-align:top}.block-cuz{margin-left:89px}.table th{text-align:center}.table td{text-align:center}.input-mini{margin-right:10px}.modal{width:700px!important;top:0!important}.modal-body{max-height:none!important;height:350px}.main{margin:0 auto}.content{box-sizing:border-box;padding:15px 30px;color:#333}.the-shop{margin-bottom:20px;font-size:12px}#myModal{display:none}.the-shop label{display:inline-block;margin-right:15px;vertical-align:top;width:70px}.shop-img .img{display:inline-block;width:150px;height:100px;background-color:#ccc;border:1px solid #000}.shop-img .img img{width:100%;height:100%}.default-class label{vertical-align:middle}.default-class span{display:inline-block;width:80px;height:20px;line-height:20px;text-align:center;border:1px solid #666;margin-right:15px;border-radius:15px;vertical-align:middle;cursor:pointer}.customize-select-c{display:inline-block;vertical-align:middle}.customize-class-ct label{vertical-align:middle}.customize-class-ct select{width:100px;height:30px;line-height:30px;margin-right:10px;font-size:14px}.add-select{display:inline-block;vertical-align:top;font-size:26px;height:30px;line-height:30px;cursor:pointer}.close-select{display:inline-block;vertical-align:top;font-size:26px;height:30px;line-height:30px;cursor:pointer}.block-cus{display:block;margin:10px 0 0 90px}.active{color:#00bbd3;border-color:#00bbd3!important}
- #auditBox{padding:20px;line-height:30px;}
- #auditBox .preferred label{margin:0 5px 5px 0}
- .todo a{white-space:nowrap;padding: 0 2px;}
- .checkbox input{margin:3px;}
- .red{color: red;}
- .flex-wrap >.item {margin-right: 20px;}
- .jbox span.jbox-icon {top: auto !important;}
- </style>
- </head>
- <body>
- <ul class="nav nav-tabs">
- <li class="active"><a href="${ctx}/product/new/list?searchProductCategory=2">二手商品列表</a></li>
- <li><a href="${ctx}/product/cmSecondHandDetail/form?searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}">添加二手商品</a></li>
- </ul>
- <form:form id="searchForm" modelAttribute="product" action="${ctx}/product/new/list" method="post" class="breadcrumb form-search">
- <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
- <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
- <input id="searchProductCategory" name="searchProductCategory" value="2" type="hidden">
- <div class="ul-form">
- <div class="flex-wrap">
- <div class="item">
- <label>商品ID:</label>
- <form:input path="id" type="number" htmlEscape="false" maxlength="11" class="input-medium"/>
- </div>
- <div class="item">
- <label>商品名称:</label>
- <form:input path="searchName" htmlEscape="false" maxlength="300" class="input-medium"/>
- </div>
- <div class="item">
- <label>一级分类:</label>
- <form:select path="secondHandType" class="input-medium" id="secondHandType" onchange="loadInstrumentType()">
- <form:option value="" label="请选择"/>
- <form:option value="1" label="二手仪器"/>
- <form:option value="3" label="其他"/>
- </form:select>
- </div>
- <div class="item">
- <label>二级分类:</label>
- <form:select path="instrumentType" class="input-medium" id="instrumentType">
- <form:option value="" label="请选择"/>
- <form:option value="1" label="美容仪器"/>
- </form:select>
- </div>
- <div class="item">
- <label>商品状态:</label>
- <form:select path="validFlag" class="input-medium">
- <form:option value="" label="请选择"/>
- <form:option value="1" label="待审核"/>
- <form:option value="2" label="已上架"/>
- <form:option value="3" label="已下架"/>
- <form:option value="8" label="审核未通过"/>
- </form:select>
- </div>
- <div class="item">
- <label>交易状态:</label>
- <form:select path="sold" class="input-medium">
- <form:option value="" label="请选择"/>
- <form:option value="0" label="未售"/>
- <form:option value="1" label="已售"/>
- </form:select>
- </div>
- <div class="item">
- <label>付款状态:</label>
- <form:select path="payStatus" class="input-medium">
- <form:option value="" label="请选择"/>
- <form:option value="1" label="待付款"/>
- <form:option value="2" label="已付款"/>
- <form:option value="3" label="无需付款"/>
- </form:select>
- </div>
- <div class="item">
- <label>商品品牌:</label>
- <form:select path="brandID" class="input-medium">
- <form:option value="0" label="请选择"/>
- <c:forEach items="${brandList}" var="brand">
- <form:option value="${brand.id}">${brand.name}</form:option>
- </c:forEach>
- <form:option value="161">
- 其他
- </form:option>
- </form:select>
- </div>
- <div class="item">
- <label>来源:</label>
- <form:select path="source" class="input-medium">
- <form:option value="" label="请选择"/>
- <form:option value="1" label="网站"/>
- <form:option value="2" label="小程序"/>
- <form:option value="3" label="后台"/>
- <form:option value="4" label="小程序-协销"/>
- </form:select>
- </div>
- <div class="item">
- <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询" style="margin-left:20px;"/>
- </div>
- </div>
- </div>
- </form:form>
- <sys:message content="${message}"/>
- <table id="contentTable" class="table table-striped table-bordered table-condensed">
- <thead>
- <tr>
- <th>商品ID</th>
- <th>商品图片</th>
- <th>商品品牌</th>
- <th>商品名称</th>
- <th>卖家</th>
- <th>采美对接人</th>
- <th>来源</th>
- <th>市场价</th>
- <th>交易价</th>
- <th>采购价</th>
- <th>分类</th>
- <th>商品状态</th>
- <th>交易状态</th>
- <th>付款状态</th>
- <th>提交时间</th>
- <th>审核时间</th>
- <th>到期时间</th>
- <shiro:hasPermission name="product:product:edit"><th>操作</th></shiro:hasPermission>
- </tr>
- </thead>
- <tbody>
- <c:forEach items="${page.list}" var="product">
- <tr>
- <td>
- ${product.id}
- </td>
- <td><a href="${product.mainImage}" target="_blank">
- <img src="${product.mainImage}" width="50" height="50">
- </a></td>
- <td>
- <c:if test="${product.brandID ne 161}">
- ${product.brandName}
- </c:if>
- <c:if test="${product.brandID eq 161}">
- 其他
- <c:if test="${product.otherBrandName ne '' && product.otherBrandName ne null && product.otherBrandName ne '其他'}">
- -${product.otherBrandName}
- </c:if>
- </c:if>
- </td>
- <td>
- <c:if test="${product.productCategory eq 2}">
- <a href="${fns:getConfig('wwwServer')}flea-market-${product.id}.html" target="_blank">
- <div style='max-width:180px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin: 0 auto;' title='${product.name}'>${product.name}</div>
- </a>
- </c:if>
- <c:if test="${product.productCategory ne 2}">
- <a href="${fns:getConfig('wwwServer')}product-${product.id}.html" target="_blank">
- <div style='max-width:180px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin: 0 auto;' title='${product.name}'>${product.name}</div>
- </a>
- </c:if>
- </td>
- <td>
- ${product.contactName}
- </td>
- <td>${product.dockingPeopleName}</td>
- <td>
- <c:if test="${product.source eq 1}">
- 网站
- </c:if>
- <c:if test="${product.source eq 2}">
- 小程序
- </c:if>
- <c:if test="${product.source eq 3}">
- 后台
- </c:if>
- <c:if test="${product.source eq 4}">
- 小程序-协销
- </c:if>
- </td>
- <td>
- <%--市场价为空不显示--%>
- <c:if test="${empty product.normalPrice}">
- ---
- </c:if>
- <c:if test="${not empty product.normalPrice}">
- ${product.normalPrice}
- </c:if>
- </td>
- <td>${product.price1}</td>
- <td>
- <%--采购价为空不显示--%>
- <c:if test="${empty product.originalPrice}">
- ---
- </c:if>
- <c:if test="${not empty product.originalPrice}">
- ${product.originalPrice}
- </c:if>
- </td>
- <td>
- ${product.secondHandType eq 1?'二手仪器':product.secondHandType eq 2?'临期产品':'其他'}
- <c:if test="${product.secondHandType eq 1}">
- -${product.instrumentType}
- </c:if>
- </td>
- <td>
- <font color=${product.validFlag eq '1'?'blue':product.validFlag eq '2'?'green':product.validFlag eq '3'?'orange':'red'}>${product.validFlag eq '1'?'待审核':product.validFlag eq '2'?'已上架':product.validFlag eq '3'?'已下架':product.validFlag eq '8'?'审核未通过':'其他'}</font>
- </td>
- <td>
- ${product.sold eq '1'?'已售':'未售'}
- </td>
- <td>
- ${product.payStatus eq '1'?'待付款':product.payStatus eq '2'?'已付款':product.payStatus eq '3'?'无需付款':'其他'}
- </td>
- <td>
- <c:if test="${empty product.submitDate}">
- ---
- </c:if>
- <c:if test="${not empty product.submitDate}">
- ${product.submitDate}
- </c:if>
- </td>
- <td>
- <c:if test="${empty product.reviewedDate}">
- ---
- </c:if>
- <c:if test="${not empty product.reviewedDate}">
- ${product.reviewedDate}
- </c:if>
- </td>
- <td>
- <c:if test="${empty product.onLineDate}">
- ---
- </c:if>
- <c:if test="${not empty product.onLineDate}">
- ${product.onLineDate}
- </c:if>
- </td>
- <shiro:hasPermission name="product:product:edit">
- <c:if test="${product.validFlag eq 0}">
- <td class="todo">无</td>
- </c:if>
- <c:if test="${product.productCategory eq 2}">
- <c:if test="${product.validFlag ne 0}">
- <td class="todo">
- <a href="${ctx}/product/cmSecondHandDetail/form?id=${product.id}&searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&searchProductCategory=${searchProductCategory}&editFlag=${editFlag}">商品编辑</a>
- <a href="${ctx}/product/cmSecondHandTransaction/toRecommend?id=${product.id}&searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&searchProductCategory=${searchProductCategory}">相关推荐</a><br>
- <%-- <a href="${ctx}/product/new/imageList?id=${product.id}&searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&searchProductCategory=${searchProductCategory}">图片管理</a>--%>
- <%--待审核或审核未通过才需要审核( 1待审核 2已上架 3已下架 8审核未通过 9已冻结)--%>
- <c:if test="${product.validFlag eq 1 or product.validFlag eq 8}">
- <a class="red" href="javascript:void(0);" onclick="auditThisBySencodeProduct(${product.id},'${product.costPrice}')">审核</a>
- </c:if>
- <%--已上架的才可以下架--%>
- <c:if test="${product.validFlag eq 2}">
- <a class="red" href="javascript:void(0);" onclick="line(${product.id}, 3)">下架</a>
- </c:if>
- <%--已下架的才可以上架--%>
- <c:if test="${product.validFlag eq 3}">
- <a class="red" href="javascript:void(0);" onclick="line(${product.id}, 2)">上架</a>
- </c:if>
- <a class="red" href="javascript:void(0);" onclick="validChange(${product.id},0)" >删除</a>
- </td>
- </c:if>
- </c:if>
- <c:if test="${product.productCategory ne 2}">
- <c:if test="${product.validFlag ne 0}">
- <td class="todo">
- <a href="${ctx}/product/new/fastEdit?id=${product.id}&searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&searchProductCategory=${searchProductCategory}">快编</a>
- <a href="${ctx}/product/new/productEdit?id=${product.id}&searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&searchProductCategory=${searchProductCategory}&editFlag=${editFlag}">商品编辑</a>
- <a href="${ctx}/product/new/setCategory?id=${product.id}&searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&searchProductCategory=${searchProductCategory}">设置分类</a>
- <a href="${ctx}/product/new/recommend?id=${product.id}&searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&searchProductCategory=${searchProductCategory}">相关推荐</a><br>
- <a href="javascript:void(0);" onclick="updateIndex('${product.id}')">更新索引</a>
- <a href="${ctx}/product/new/imageList?id=${product.id}&searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&searchProductCategory=${searchProductCategory}">图片管理</a>
- <a href="${ctx}/product/hehe/edit?id=${product.id}&searchName=${searchName}&searchShopID=${searchShopID}&searchShopName=${searchShopName}&searchBigTypeID=${searchBigTypeID}&searchSmallTypeID=${searchSmallTypeID}&searchTinyTypeID=${searchTinyTypeID}&searchValidFlag=${searchValidFlag}&searchActStatus=${searchActStatus}&searchProductType=${searchProductType}&searchBrandID=${searchBrandID}&searchPreferredFlag=${searchPreferredFlag}&searchProductCategory=${searchProductCategory}">参与呵呵商城</a><br>
- <a href="javascript:void(0);" data-productid="${product.id}" data-preferred="${product.preferredFlag}" onclick="settingApplets($(this))">小程序配置</a>
- <c:if test="${product.validFlag eq 1 or product.validFlag eq 8}">
- <a class="red" href="javascript:void(0);" onclick="auditThis(${product.id},'${product.brand.name}',${product.brand.status},'${product.costCheckFlag}','${product.costPrice}','${product.costProportional}')">审核</a>
- </c:if>
- <c:if test="${product.validFlag ne 9}">
- <a class="red" href="javascript:void(0);" onclick="validChange(${product.id}, 9)">冻结</a>
- </c:if>
- <c:if test="${product.validFlag eq 9}">
- <a class="red" href="javascript:void(0);" onclick="validChange(${product.id}, 2)">解除冻结</a>
- </c:if>
- <a class="red" href="javascript:void(0);" onclick="validChange(${product.id}, 0)" >删除</a>
- </td>
- </c:if>
- </c:if>
- </shiro:hasPermission>
- </tr>
- </c:forEach>
- </tbody>
- </table>
- <div class="pagination">${page}</div>
- <% request.setAttribute("caimeiCore", Global.getConfig("caimei.core"));%>
- <script type="text/javascript">
- var num = '';
- function page(n,s){
- $("#pageNo").val(n);
- $("#pageSize").val(s);
- $("#searchForm").submit();
- return false;
- }
- loadInstrumentType();
- // preferredFlag条件搜索
- $(document).ready(function() {
- $("body").on("change", "input[name=preferredBox]", function(){
- var preferredFlag = 0;
- for (var i = 0; i < $("input[name=preferredBox]").length; i++) {
- if ($("input[name=preferredBox]").eq(i).attr('checked')) {
- preferredFlag += $("input[name=preferredBox]").eq(i).val()*1;
- }
- }
- $("#preferredFlag").val(preferredFlag);
- });
- var smallType = $("#smallType option:selected").val();
- var tinyType = $("#tinyType option:selected").val();
- $("#smallType").val(smallType);
- $("#smallType").prev().find(".select2-chosen").text($("#smallType option:selected").text());
- setTimeout(function(){
- $("#tinyType").val(tinyType);
- $("#tinyType").prev().find(".select2-chosen").text($("#tinyType option:selected").text());
- },500)
- });
- // 选择配置
- function settingApplets(that) {
- var productId = that.attr('data-productid');
- var preferred = that.attr('data-preferred');
- var html = '<div id="auditBox"><div>请选择把该商品加入到如下商品列表中(可以多选)</div><div class="preferred">'
- +'<label><input '+(parseInt(preferred%10)>=1?'checked':'')+' name="preferredFlag" type="checkbox" value="1">新品上线</label>'
- +'<label><input '+(parseInt((preferred%100)/10)>=1?'checked':'')+' name="preferredFlag" type="checkbox" value="10">优惠商品</label>'
- +'<label><input '+(parseInt(preferred/100)>=1?'checked':'')+' name="preferredFlag" type="checkbox" value="100">常用商品</label>'
- +'</div></div>';
- var submit = function (v, h, f) {
- // 新品上线(001) 优惠商品(010) 常用商品(100),三者同时存在111
- var preferredFlag = 0;
- if (f.preferredFlag) {
- var temp = f.preferredFlag.toString().split(",");
- temp.forEach(function(item){
- preferredFlag += item*1;
- });
- }
- $.post("${ctx}/product/new/addPreferred", {
- 'productId': productId,
- 'preferredFlag': preferredFlag
- }, function (data) {
- if (true == data.success) {
- $.jBox.tip(data.msg, 'info');
- $("#searchForm").submit();
- } else {
- $.jBox.tip(data.msg, 'error');
- }
- }, "JSON");
- };
- $.jBox(html, {title: "选择配置", submit: submit});
- }
- // 更新索引
- function updateIndex(id) {
- $.post("${caimeiCore}/commodity/search/index/update/product", {productId: id}, function(res){
- $.jBox.tip(res.msg, 'info');
- });
- }
- // 商品下架、下架
- function line(productId,validFlag) {
- var submit = function (v, h, f) {
- $.post("${ctx}/product/new/line", {
- 'productId': productId,
- 'validFlag': validFlag
- }, function (data) {
- if (true == data.success) {
- $.jBox.tip(data.msg, 'info');
- <%--window.location.href="${ctx}/product/new/list";--%>
- $("#searchForm").submit();
- } else {
- $.jBox.tip(data.msg, 'error');
- }
- }, "JSON");
- };
- if(2 == validFlag){
- $.jBox.confirm("确定上架该商品吗?", "提示", submit, { buttons: { '确认': true, '取消': false} });
- }else{
- $.jBox.confirm("确定下架该商品吗?", "提示", submit, { buttons: { '确认': true, '取消': false} });
- }
- }
- // 审核(二手)
- function auditThisBySencodeProduct(id,costPrice){
- var html = "<div id='auditBox'>"
- + "<div class='bd-row'>"
- + " <span><font color='red'>*</font>审核:</span>"
- + " <select name='validFlag' id='validFlag'>"
- + " <option value='2'>审核通过</option>"
- + " <option value='8'>审核未通过</option>"
- + " <select/>"
- + "</div>"
- + "</div>";
- var submit = function (v, h, f) {
- if (f.auditStatus == '') {
- $.jBox.tip("请选择状态", 'error', {focusId: "validFlag"});
- return false;
- }
- $.post("${ctx}/product/new/auditProductBySencondProduct", {
- 'productID': id,
- 'validFlag': f.validFlag
- }, function (data) {
- if (true == data.success) {
- $.jBox.tip(data.msg, 'info');
- $("#searchForm").submit();
- } else {
- $.jBox.tip(data.msg, 'error');
- }
- }, "JSON");
- };
- $.jBox(html, {title: "审核", submit: submit});
- }
- // 审核(正常)
- function auditThis(id,name,status,costCheckFlag,costPrice,costProportional) {
- // 商品成本判断
- if(null == costCheckFlag || "" == costCheckFlag){
- alertx("成本价未填写,请编辑成本价后再审核");
- return;
- }else if(costCheckFlag == 1){
- //固定成本
- if(null == costPrice || "" == costPrice){
- alertx("成本价未填写,请编辑成本价后再审核");
- return;
- }
- }else if(costCheckFlag == 2){
- //比例成
- if(null == costProportional || "" == costProportional){
- alertx("成本价未填写,请编辑成本价后再审核");
- return;
- }
- }
- // 0:待审核,1:审核通过,2:审核失败
- if(status == 0 && name != "" ){
- alertx("该商品的品牌:"+name+",尚未审核。请先审核通过该品牌再审核商品");
- return;
- }
- if(status == 2 && name != "" ){
- alertx("该商品的品牌:"+name+",审核未通过。请通知供应商重新编辑提交品牌再审核商品或者直接修改品牌信息审核通过后再审核商品");
- return;
- }
- var html = "<div id='auditBox'>"
- + "<div class='bd-row'>"
- + " <span><font color='red'>*</font>审核:</span>"
- + " <select name='validFlag' id='validFlag'>"
- + " <option value='2'>审核通过</option>"
- + " <option value='8'>审核未通过</option>"
- + " <select/>"
- + "</div>"
- + "</div>";
- var submit = function (v, h, f) {
- if (f.auditStatus == '') {
- $.jBox.tip("请选择状态", 'error', {focusId: "validFlag"});
- return false;
- }
- $.post("${ctx}/product/new/auditProduct", {
- 'productID': id,
- 'validFlag': f.validFlag
- }, function (data) {
- if (true == data.success) {
- $.jBox.tip(data.msg, 'info');
- $("#searchForm").submit();
- } else {
- $.jBox.tip(data.msg, 'error');
- }
- }, "JSON");
- };
- $.jBox(html, {title: "审核", submit: submit});
- }
- function validChange(id, flag) {
- var msg = "提示信息";
- if(flag == 9){
- msg = "确定冻结该商品吗?冻结后该商品不会出现在采美商城。";
- }else if(flag == 2){
- msg = "确定解除冻结该商品吗?";
- }else if(flag == 0){
- msg = "确定删除该二手商品吗?删除后需要重新发布";
- }
- top.$.jBox.confirm(msg,'系统提示',function(v,h,f){
- if(v=='ok'){
- $.post("${ctx}/product/new/auditProduct",{'productID': id,'validFlag': flag}, function(data) {
- if(true==data.success){
- $.jBox.tip(data.msg, 'info');
- } else {
- $.jBox.tip(data.msg,'error');
- }
- $("#searchForm").submit();
- },"JSON");//这里返回的类型有:json,html,xml,text
- }
- return;
- },{buttonsFocus:1,persistent: true});
- }
- function loadInstrumentType() {
- var secondHandType = $("#secondHandType option:selected").val();
- var instrumentType = $("#instrumentType option:selected").val();
- console.log(secondHandType)
- if (secondHandType == 1) {
- if (instrumentType == ''){
- $("#instrumentType").html();
- $("#instrumentType").find("option").remove();
- $(".select2-chosen").eq(1).html("请选择");
- $("#instrumentType").append("<option value=''>请选择</option>")
- $("#instrumentType").append("<option value='1'>美容仪器</option>")
- }
- }else {
- $("#instrumentType").html();
- $("#instrumentType").find("option").remove();
- $(".select2-chosen").eq(1).html("无");
- $("#instrumentType").append("<option value='' selected>无</option>")
- }
- }
- // 二级分类
- var smalltypeList = [
- <c:forEach items="${classify.smalltypeList}" var="smalltype" varStatus="index">
- <c:if test="${index.index > 0}">,</c:if>
- {
- smallTypeID: ${smalltype.smallTypeID},
- name: "${smalltype.name}",
- bigTypeID: ${smalltype.bigTypeID},
- }
- </c:forEach>
- ];
- // 三级分类
- var tinytypeList = [
- <c:forEach items="${classify.tinytypeList}" var="tinytype" varStatus="index">
- <c:if test="${index.index > 0}">,</c:if>
- {
- tinyTypeID: ${tinytype.tinyTypeID},
- name: "${tinytype.name}",
- smallTypeID: ${tinytype.smallTypeID}
- }
- </c:forEach>
- ];
- </script>
- </body>
- </html>
|