Commit d86211499870c2c52bcb2301c9bad0f918b5675a
1 parent
15887b78
新增枚举
Showing
4 changed files
with
146 additions
and
306 deletions
titan-sdk/src/main/java/com/diligrp/titan/sdk/constant/UnitEnum.java
0 → 100644
1 | +package com.diligrp.titan.sdk.constant; | |
2 | + | |
3 | +/** | |
4 | + * Created by yanggang on 2017/1/4. | |
5 | + */ | |
6 | +public enum UnitEnum { | |
7 | + FEN(1483, "份"), GE(1484, "个"), JIN(1485, "斤"); | |
8 | + | |
9 | + private int id; | |
10 | + private String name; | |
11 | + | |
12 | + UnitEnum(int id, String unit) { | |
13 | + this.id = id; | |
14 | + this.name = unit; | |
15 | + } | |
16 | + | |
17 | + public int getId() { | |
18 | + return id; | |
19 | + } | |
20 | + | |
21 | + public void setId(int id) { | |
22 | + this.id = id; | |
23 | + } | |
24 | + | |
25 | + public String getName() { | |
26 | + return name; | |
27 | + } | |
28 | + | |
29 | + public void setName(String name) { | |
30 | + this.name = name; | |
31 | + } | |
32 | + | |
33 | + public static String getNameById(int id) { | |
34 | + for (UnitEnum ue : UnitEnum.values()) { | |
35 | + if (ue.getId() == id) { | |
36 | + return ue.name; | |
37 | + } | |
38 | + } | |
39 | + return null; | |
40 | + } | |
41 | +} | ... | ... |
titan-web/src/main/java/com/dili/titan/web/controller/ProductPopController.java
... | ... | @@ -5,7 +5,6 @@ |
5 | 5 | package com.dili.titan.web.controller; |
6 | 6 | |
7 | 7 | import com.alibaba.fastjson.JSON; |
8 | -import com.alibaba.fastjson.JSONObject; | |
9 | 8 | import com.dili.titan.common.log.LogHelper; |
10 | 9 | import com.dili.titan.common.log.LogTypeEnum; |
11 | 10 | import com.dili.titan.common.utils.SkuUtil; |
... | ... | @@ -38,7 +37,6 @@ import org.springframework.web.context.request.WebRequest; |
38 | 37 | import org.springframework.web.servlet.ModelAndView; |
39 | 38 | |
40 | 39 | import javax.annotation.Resource; |
41 | -import javax.servlet.http.HttpServletRequest; | |
42 | 40 | import java.util.*; |
43 | 41 | |
44 | 42 | /** |
... | ... | @@ -247,101 +245,7 @@ public class ProductPopController extends BaseController { |
247 | 245 | return toVMSkipLayout("product/pop/viewProduct", result.getAllResult()); |
248 | 246 | } |
249 | 247 | |
250 | - /** | |
251 | - * @param productPop | |
252 | - * @param view | |
253 | - * @return | |
254 | - * @throws Exception | |
255 | - */ | |
256 | -// @RequestMapping(value = "/drops", method = { RequestMethod.POST, RequestMethod.GET }, produces = "application/json") | |
257 | -// public @ResponseBody | |
258 | -// Message drops(ProductPop productPop, Model view) throws Exception { | |
259 | -// long start = System.currentTimeMillis(); | |
260 | -// Message msg = null; | |
261 | -// try { | |
262 | -// int res = productPopService.saveOrUpdate(productPop); | |
263 | -// msg = res > 0 ? Message.success() : Message.failure(); | |
264 | -// topicProducer.sendMQProduct(productPop.getPid(), 3 , 3); | |
265 | -// } catch (Exception e) { | |
266 | -// LogHelper.error(LogTypeEnum.PRODUCT_POP,e,"强制下架第三方商品异常!!pid={},操作人账号={},耗时:{}", | |
267 | -// productPop.getPid(),PassportService.getCurrentUserName(),System.currentTimeMillis() - start); | |
268 | -// msg = Message.failure(); | |
269 | -// } finally { | |
270 | -// } | |
271 | -// LogHelper.info(LogTypeEnum.PRODUCT_POP,"强制下架第三方商品成功!!pid={},操作人账号={},耗时:{}", | |
272 | -// productPop.getPid(),PassportService.getCurrentUserName(),System.currentTimeMillis() - start); | |
273 | -// LogUtils.log(LogData.builder(PassportService.getCurrentUserName(), SourceType.Titan_Web.getName(), String.valueOf(productPop.getPid())) | |
274 | -// .operationDesc("在(买卖对接商品库)强制下架了("+productPop.getPid()+")").build()); | |
275 | -// return msg; | |
276 | -// } | |
277 | - | |
278 | - | |
279 | - /** | |
280 | - * 批量审核商品 | |
281 | - * @throws Exception | |
282 | - * @createTime 2014年6月7日 下午2:50:04 | |
283 | - * @author celine | |
284 | - */ | |
285 | - @RequestMapping(value = "/batchAudit") | |
286 | - @ResponseBody | |
287 | - public String batchAudit(Model view, HttpServletRequest req) { | |
288 | - long start = System.currentTimeMillis(); | |
289 | - JSONObject result = new JSONObject(); | |
290 | - boolean success = false; | |
291 | - List<Long> pids ; | |
292 | - String feedback; | |
293 | - int value = 0 ; | |
294 | - try{ | |
295 | - pids = parseParam("pids", Long.class); | |
296 | - feedback = req.getParameter("feedback"); | |
297 | - if(CollectionUtils.isEmpty(pids)){ | |
298 | - return generateResultString(result, "请选择需要下架的商品!", success); | |
299 | - } | |
300 | - List<ProductPop> list = productPopService.selectEntryList(pids.toArray(new Long[pids.size()])); | |
301 | - if(!qxValidate(list.toArray(new ProductPop[list.size()]))){ | |
302 | - return generateResultString(result, "没有权限操作!请联系管理员", success); | |
303 | - } | |
304 | - value = productPopService.productDrops(pids,feedback); | |
305 | - if (value > 0) { | |
306 | 248 | |
307 | - } | |
308 | - }catch (Exception e) { | |
309 | - LogHelper.error(LogTypeEnum.PRODUCT_POP,e,"第三方商品批量下架异常!!操作人账号={},耗时:{}", | |
310 | - PassportService.getCurrentUserName(), | |
311 | - System.currentTimeMillis() - start); | |
312 | - return generateResultString(result, "第三方商品批量下架发生异常!", success); | |
313 | - } | |
314 | - | |
315 | - if(value < pids.size()){ | |
316 | - LogHelper.error(LogTypeEnum.PRODUCT_POP, "第三方商品批量下架部分失败!!第三方商品IDS={},上架失败{}个,失败商品IDs={},操作人账号={},耗时:{}", | |
317 | - PassportService.getCurrentUserName(), | |
318 | - System.currentTimeMillis() - start); | |
319 | - return generateResultString(result, "第三方商品批量下架失败了"+(pids.size() - value)+"等,刷新页面再试", success); | |
320 | - } | |
321 | - success = true; | |
322 | - LogHelper.info(LogTypeEnum.PRODUCT_POP, "第三方商品批量下架成功!!第三方商品IDS={},操作人账号={},耗时:{}", | |
323 | - pids.toArray(),PassportService.getCurrentUserName(), | |
324 | - System.currentTimeMillis() - start); | |
325 | - return generateResultString(result, "第三方商品批量下架成功!", success); | |
326 | - } | |
327 | - | |
328 | - private boolean qxValidate(ProductPop... productPops){ | |
329 | - if(productPops.length<=0){ | |
330 | - return false; | |
331 | - } | |
332 | - List<Integer> cityIds = PassportService.getCityIds(); | |
333 | - List<Integer> shopTypes = PassportService.getShopTypes(); | |
334 | - if(CollectionUtils.isEmpty(cityIds) || CollectionUtils.isEmpty(shopTypes)){ | |
335 | - return false; | |
336 | - } | |
337 | - for(ProductPop productPop : productPops){ | |
338 | - if((!cityIds.contains(-1) && !cityIds.contains(productPop.getShopCityId())) | |
339 | - || (!shopTypes.contains(-1) && !shopTypes.contains(productPop.getShopType()) ) ) { | |
340 | - return false; | |
341 | - } | |
342 | - } | |
343 | - return true; | |
344 | - } | |
345 | 249 | |
346 | 250 | |
347 | 251 | @ResponseBody | ... | ... |
titan-web/src/main/webapp/WEB-INF/views/product/pop/list.vm
... | ... | @@ -8,25 +8,7 @@ |
8 | 8 | <div class="navbar-fixed-top"> |
9 | 9 | <form class="well form-search" action="/titan/productPop" method="POST"> |
10 | 10 | <!-- 查询条件 --> |
11 | - <!-- | |
12 | - #if($markets && $markets.size()>0) | |
13 | - <select id="marketId" name="marketId" class="span2 align-middle" style="height:34px"> | |
14 | - <option value="" #if(-1 == $!{query.status}) selected="selected" #end>所属市场</option> | |
15 | - #foreach(${item} in $!markets) | |
16 | - <option value="$!{item.id}" #if($!{item.id} == $!{query.marketId}) selected="selected" #end>$!{item.pickName}</option> | |
17 | - #end | |
18 | - </select> | |
19 | - #end | |
20 | - --> | |
21 | - <select id="status" name="status" class="span2 align-middle" style="height:34px"> | |
22 | -## <option value="" #if(-1 == $!{query.status}) selected="selected" #end>商品状态</option> | |
23 | - <option value="" #if(-1 == $!{query.status}) selected="selected" #end>审核状态</option> | |
24 | - <option value="1" #if(1 == $!{query.status}) selected="selected" #end>待审核</option> | |
25 | - <option value="2" #if(2 == $!{query.status}) selected="selected" #end>审核失败</option> | |
26 | - <option value="3" #if(3 == $!{query.status}) selected="selected" #end>审核成功</option> | |
27 | -## <option value="3" #if(3 == $!{query.status}) selected="selected" #end>在售商品</option> | |
28 | -## <option value="4" #if(4 == $!{query.status}) selected="selected" #end>仓库中商品</option> | |
29 | - </select> | |
11 | + | |
30 | 12 | <input class="span align-middle input-medium" type="text" name="name" value="$!{query.name}" placeholder="商品名称"/> |
31 | 13 | <input class="span align-middle input-medium numInput" type="text" name="pid" value="$!{query.pid}" maxlength="10" placeholder="商品编号"/> |
32 | 14 | <input class="span align-middle input-medium" type="text" name="shopName" value="$!{query.shopName}" placeholder="店铺名称"/> |
... | ... | @@ -115,9 +97,6 @@ |
115 | 97 | ## <th>有效期(天)</th> |
116 | 98 | <th width="8%">申请时间</th> |
117 | 99 | <th width="4%">状态</th> |
118 | - <th width="8%">申请上架模式</th> | |
119 | - <th width="6%">最近上架时间</th> | |
120 | - <th width="6%">最近下架时间</th> | |
121 | 100 | <th width="18%">操作</th> |
122 | 101 | </tr> |
123 | 102 | </thead> |
... | ... | @@ -132,18 +111,9 @@ |
132 | 111 | </td> |
133 | 112 | <td style="text-align: center">$!{item.pid}</td> |
134 | 113 | <td> |
135 | - #if($item.hasSpecial ==2) | |
136 | - <span style="color: red; font-weight: bold;">特价</span> | |
137 | - #end | |
138 | - #if($item.status==3) | |
139 | - <a onclick="window.open('http://www.1n4j.com/product/${item.pid}.html')">$!{item.name}</a> | |
140 | - #else | |
141 | 114 | $!{item.name} |
142 | - #end | |
143 | 115 | </td> |
144 | 116 | <td style="text-align: center">$!{item.cate}</td> |
145 | - ## <td style="text-align: center">$!{item.marketName}</td> | |
146 | -## <td>$!{item.producingArea}</td> | |
147 | 117 | <td style="text-align: center">$!{item.shopName}</td> |
148 | 118 | <td style="text-align: center">#if(${item.minPrice}) |
149 | 119 | #set($minPrice = ${item.minPrice} / 100.00) |
... | ... | @@ -159,9 +129,6 @@ |
159 | 129 | ## <td>$!{item.indate}</td> |
160 | 130 | <td style="text-align: center">$!dateTool.format('yyyy-MM-dd HH:mm:ss',$!{item.ctime})</td> |
161 | 131 | <td style="text-align: center">#set($status = $!{item.status}) #if(-1 == $status)已删除#elseif(1 == $status)待审核#elseif(2 == $status)审核失败#elseif(3 == $status)在售商品#elseif(4 <= $status and 8>$status)仓库中商品#else 未知 #end</td> |
162 | - <td style="text-align: center">#set($mode = $!{item.publishMode}) #if(1 == $mode)暂存仓库#elseif(2 == $mode)立即上架#elseif(3 == $mode)指定时间上架[$!dateTool.format('yyyy-MM-dd HH:mm',$!{item.publishSettime})]#end</td> | |
163 | - <td style="text-align: center"> $!dateTool.format('yyyy-MM-dd HH:mm',$!{item.publishTime}) </td> | |
164 | - <td style="text-align: center">#if($status!=3) $!dateTool.format('yyyy-MM-dd HH:mm',$!{item.dropsTime}) #end</td> | |
165 | 132 | <td class="textC"> |
166 | 133 | #if($!{viewDetail}) |
167 | 134 | <a class="blue" href="javascript:void(0);"onclick="window.open('/titan/productPop/view/$!{item.pid}')"><i class="icon-eye-open"></i>查看</a> |
... | ... | @@ -169,14 +136,6 @@ |
169 | 136 | #if($!{printDimensions}) |
170 | 137 | <a class="blue" href="javascript:void(0);"onclick="window.open('/titan/productB2b/code/${item.pid}')"><!--<i class="icon-eye-open"></i>二维码</a>--> |
171 | 138 | #end |
172 | - #if($!{auditHistory}) | |
173 | - <a class="blue" onclick="XUI.ProductPop.showAuditHistory($!{item.pid})"><i class="icon-eye-open">审批记录</i></a> | |
174 | - #end | |
175 | - #if( ($!{item.manualAuditType} == 2 && $status == 3) || $status==1) | |
176 | - #if($!{audit}) | |
177 | - <a class="green"onclick="XUI.ProductPop.showAuditDlg($!{item.pid},1)"><i class="icon-pencil"></i>审批</a> | |
178 | - #end | |
179 | - #end | |
180 | 139 | #if( $!{item.manualAuditType} == 1 && $status == 3 && $!{drops}) |
181 | 140 | <a class="red" onclick="XUI.ProductPop.showAuditDlg($!{item.pid},2)"><i class="icon-trash"></i>强制下架</a> |
182 | 141 | #end |
... | ... | @@ -345,7 +304,7 @@ |
345 | 304 | <div class="ewmft tgap"> |
346 | 305 | <a href="javascript:void(0)" target="_blank" class="submitBtn ensureprint">确认打印</a> |
347 | 306 | </div> |
348 | -</div></div></div><a title="关闭" class="fancybox-item fancybox-close" href="javascript:;"></a></div></div></div> </div> | |
307 | +</div></div></div><a title="关闭" class="fancybox-item fancybox-close" href="javascript:"></a></div></div></div> </div> | |
349 | 308 | <!-- 打印二维码 结束 --> |
350 | 309 | <script> |
351 | 310 | $(document).ready(function(){ | ... | ... |
titan-web/src/main/webapp/WEB-INF/views/product/pop/viewProduct.vm
1 | 1 | ##查看供应商商品 |
2 | 2 | <!-- Date: 2014-05-22 --> |
3 | -<link href="/css/style.css" rel="stylesheet" type="text/css" /> | |
3 | +<link href="/css/style.css" rel="stylesheet" type="text/css"/> | |
4 | 4 | |
5 | 5 | <div class="main"> |
6 | 6 | <div class="g-datum"> |
... | ... | @@ -25,123 +25,64 @@ |
25 | 25 | |
26 | 26 | </span> |
27 | 27 | </li> |
28 | - <li><span class="spw">产地:</span> | |
29 | - <span >$!productPop.productionAddr</span> | |
30 | - </li> | |
31 | - <li><span class="spw">所在地:</span> | |
32 | - <span >$!productPop.localityName</span> | |
33 | - </li> | |
34 | - #if($productPop.productAuthList && $productPop.productAuthList.size()>0) | |
35 | - <li class="clear u-heightauto"> | |
36 | - <span class="spw">商品认证:</span> | |
37 | - | |
38 | - <div class="g-datum" id="authBox"> | |
39 | - <ul> | |
40 | - #foreach($pauth in $productPop.productAuthList) | |
41 | - <li class="cleard u-heightauto"> | |
42 | - $!pauth.authName | |
43 | - #if($!pauth.status==2) | |
44 | - 已失效 | |
45 | - #else | |
46 | - 有效期至$!dateTool.format('yyyy-MM-dd',$!pauth.authEndTime) | |
47 | - #end | |
48 | - <a onclick="window.open('$!pauth.authUrl')" | |
49 | - href="javascript:void(0);"><img | |
50 | - src="$!pauth.authUrl" | |
51 | - style="height:30px; width: 30px;"/></a> | |
52 | - </li> | |
53 | - #end | |
54 | - </ul> | |
55 | - </div> | |
56 | - </li> | |
57 | - #end | |
58 | 28 | |
59 | - <li><span class="spw">销售单位:</span> | |
60 | - $!{productPop.saleUnit} | |
61 | - </li> | |
62 | - <li class="clear u-heightauto" id="descAttrLabel" ><span class="spw">描述属性:</span> | |
63 | - <div class="g-datum" id="descAttr" style="width: 100%;"> | |
64 | - <ul > | |
65 | - #foreach($attr in $productPop.descAtt) | |
66 | - <li style="height: auto;"> | |
67 | - <span class="spw" > | |
68 | - #if($!{attr.enforce}) | |
69 | - <span>*</span> | |
70 | - #end | |
71 | - $!{attr.attName}: | |
72 | - </span> | |
73 | - <div style="margin-left: 102px;"> | |
74 | - #foreach($value in $attr.values) | |
75 | - #*<span class="m-r20"> | |
76 | - $!{value.attValueName} | |
77 | - </span>*# | |
78 | - $!{value.attValueName} | |
79 | - #end | |
80 | - </div> | |
81 | - </li> | |
82 | - #end | |
83 | - </ul> | |
84 | - </div> | |
85 | - </li> | |
86 | - <li class="cleard u-heightauto"><span class="spw"><span>*</span>报价方式:</span> | |
87 | - <span>#if($productPop.quotationType==2) 按起批量报价 #else 按规格报价 #end</span> | |
88 | - </li> | |
89 | - <li class="clear u-heightauto" id="saleAttrLabelA" ><span class="spw">销售属性:</span> | |
90 | - <div class="g-datum" id="saleAttr" style="width: 100%;"> | |
91 | - <ul> | |
92 | - #foreach($attr in $productPop.saleAtt) | |
93 | - <li class='cleard u-heightauto'> | |
29 | + <li class="clear u-heightauto" id="saleAttrLabelA"><span class="spw">销售属性:</span> | |
30 | + <div class="g-datum" id="saleAttr" style="width: 100%;"> | |
31 | + <ul> | |
32 | + #foreach($attr in $productPop.saleAtt) | |
33 | + <li class='cleard u-heightauto'> | |
94 | 34 | <span class="spw" alt="0" style="line-height: 43px;"> |
95 | 35 | <span>*</span> |
96 | 36 | $!{attr.attName}: |
97 | 37 | </span> |
98 | 38 | |
99 | - #foreach($value in $attr.values) | |
100 | - <span class="m-r20"> | |
101 | - $!{value.attValueName} | |
39 | + #foreach($value in $attr.values) | |
40 | + <span class="m-r20"> | |
41 | + $!{value.attValueName} | |
102 | 42 | </span> |
103 | - #end | |
104 | - | |
105 | - </li> | |
106 | - #end | |
107 | - #if($productPop.quotationType==2) | |
108 | - <li class="clear u-heightauto " > | |
109 | - <table class="m-assembly" > | |
110 | - <thead> | |
111 | - <tr> | |
112 | - <th>购买数量</th> | |
113 | - <th>产品单价(元/${productPop.saleUnit})</th> | |
114 | - </tr> | |
115 | - </thead> | |
116 | - <tbody class="price-range-json"> | |
117 | - #if($!productPop.productQuotation && $!productPop.productQuotation.size()>0) | |
118 | - #set($prices = ${productPop.productQuotation}) | |
119 | - #foreach($p in $!prices) | |
120 | - <tr attr="$!p.id"> | |
121 | - <td style="text-align: left"> | |
122 | - 购买:<span>$!p.minPurchaseScope</span> $!{productPop.saleUnit}及以上 | |
123 | - </span> | |
124 | - </td> | |
125 | - <td style="text-align: left"> | |
126 | - #set($price = ${p.price} / 100.00) | |
127 | - <span>$numberTool.format("0.00", $!price)</span> | |
128 | - </td> | |
129 | - </tr> | |
130 | - #end | |
43 | + #end | |
131 | 44 | |
45 | + </li> | |
46 | + #end | |
47 | + #if($productPop.quotationType==2) | |
48 | + <li class="clear u-heightauto "> | |
49 | + <table class="m-assembly"> | |
50 | + <thead> | |
51 | + <tr> | |
52 | + <th>购买数量</th> | |
53 | + <th>产品单价(元/${productPop.saleUnit})</th> | |
54 | + </tr> | |
55 | + </thead> | |
56 | + <tbody class="price-range-json"> | |
57 | + #if($!productPop.productQuotation && $!productPop.productQuotation.size()>0) | |
58 | + #set($prices = ${productPop.productQuotation}) | |
59 | + #foreach($p in $!prices) | |
60 | + <tr attr="$!p.id"> | |
61 | + <td style="text-align: left"> | |
62 | + | |
63 | + 购买:<span>$!p.minPurchaseScope</span> $!{productPop.saleUnit}及以上 | |
64 | + </span> | |
65 | + </td> | |
66 | + <td style="text-align: left"> | |
67 | + #set($price = ${p.price} / 100.00) | |
68 | + <span>$numberTool.format("0.00", $!price)</span> | |
69 | + </td> | |
70 | + </tr> | |
132 | 71 | #end |
133 | 72 | |
134 | - </tbody> | |
135 | - </table> | |
136 | - </li> | |
137 | - #if($productPop.saleAtt && $productPop.saleAtt.size()>0) | |
73 | + #end | |
74 | + | |
75 | + </tbody> | |
76 | + </table> | |
77 | + </li> | |
78 | + #if($productPop.saleAtt && $productPop.saleAtt.size()>0) | |
138 | 79 | |
139 | 80 | <li class="clear u-heightauto"> |
140 | 81 | <table class="m-assembly" id="describe"> |
141 | 82 | <thead> |
142 | 83 | <tr> |
143 | 84 | <th>销售属性</th> |
144 | - #*<th>供应价(元/$!{productPop.saleUnit})</th>*# | |
85 | + #*<th>供应价(元/$!{productPop.saleUnit})</th>*# | |
145 | 86 | <th>可供量($!{productPop.saleUnit})</th> |
146 | 87 | |
147 | 88 | </tr> |
... | ... | @@ -156,8 +97,8 @@ |
156 | 97 | $!{a.value}<br> |
157 | 98 | #end |
158 | 99 | </td> |
159 | - #*#set($price = $!sku.price/ 100.00) | |
160 | - <td>$!numberTool.format("0.00", $!price)</td>*# | |
100 | + #*#set($price = $!sku.price/ 100.00) | |
101 | + <td>$!numberTool.format("0.00", $!price)</td>*# | |
161 | 102 | <td>$!sku.stockNum</td> |
162 | 103 | |
163 | 104 | </tr> |
... | ... | @@ -165,70 +106,65 @@ |
165 | 106 | </tbody> |
166 | 107 | </table> |
167 | 108 | </li> |
168 | - #else | |
169 | - #set($count =$productPop.skus.get(0).stockNum) | |
170 | - #end | |
171 | - <li class="clear u-heightauto price-range" > | |
172 | - <span >可售总量:</span> | |
173 | - | |
174 | - <span class="stockNumTotal">$!{count}</span> | |
175 | - | |
176 | - </li> | |
177 | 109 | #else |
178 | - <li class="clear u-heightauto"> | |
179 | - <table class="m-assembly" id="describe"> | |
180 | - <thead> | |
181 | - <tr> | |
182 | - <th>销售属性</th> | |
183 | - <th>销售价(元/$!{productPop.saleUnit})</th> | |
184 | - <th>可供量($!{productPop.saleUnit})</th> | |
185 | - <th>起供量($!{productPop.saleUnit})</th> | |
186 | - </tr> | |
187 | - </thead> | |
188 | - <tbody> | |
189 | - #foreach($sku in $productPop.skus) | |
190 | - <tr> | |
191 | - <td> | |
192 | - #foreach($a in $skuAttrMaps.get($sku.sku)) | |
193 | - $!{a.value}<br> | |
194 | - #end | |
195 | - </td> | |
196 | - #set($price = $!sku.price/ 100.00) | |
197 | - <td>$!numberTool.format("0.00", $!price)</td> | |
198 | - <td>$!sku.stockNum</td> | |
199 | - <td>$!sku.minNum</td> | |
200 | - </tr> | |
201 | - #end | |
202 | - </tbody> | |
203 | - </table> | |
204 | - </li> | |
110 | + #set($count =$productPop.skus.get(0).stockNum) | |
205 | 111 | #end |
206 | - </ul> | |
207 | - </div> | |
208 | - </li> | |
209 | - #*#else | |
210 | - <li class="clear u-heightauto" id="saleAttrLabelB" ><span class="spw">无销售属性:</span> | |
211 | - <div class="g-datum" id="noSaleAttr"> | |
212 | - <ul> | |
112 | + <li class="clear u-heightauto price-range"> | |
113 | + <span>可售总量:</span> | |
114 | + | |
115 | + <span class="stockNumTotal">$!{count}</span> | |
116 | + | |
117 | + </li> | |
118 | + #else | |
213 | 119 | <li class="clear u-heightauto"> |
214 | - <table class="m-assembly"> | |
120 | + <table class="m-assembly" id="describe"> | |
121 | + <thead> | |
215 | 122 | <tr> |
216 | - <th id="noPriceUnit">供应价(元/$!{productPop.unitName})</th> | |
217 | - <th id="maxUnit">可供量($!{productPop.unitName})</th> | |
218 | - <th id="noBeginUnit">起供量($!{productPop.unitName})</th> | |
219 | - </tr> | |
220 | - #set($tpSkus=${productPop.skuTpList}) | |
221 | - #foreach($b in $tpSkus) | |
123 | + <th>销售属性</th> | |
124 | + <th>销售价(元/$!{productPop.saleUnit})</th> | |
125 | + </thead> | |
126 | + <tbody> | |
127 | + #foreach($sku in $productPop.skus) | |
222 | 128 | <tr> |
223 | - <td>$numberTool.format("0.00", ${b.price})</td> <td>$!b.store</td> <td>$!b.miniPurchase</td> | |
129 | + <td> | |
130 | + #foreach($a in $skuAttrMaps.get($sku.sku)) | |
131 | + $!{a.value}<br> | |
132 | + #end | |
133 | + </td> | |
134 | + #set($price = $!sku.price/ 100.00) | |
135 | + <td>$!numberTool.format("0.00", $!price)</td> | |
224 | 136 | </tr> |
225 | - #end | |
137 | + #end | |
138 | + </tbody> | |
226 | 139 | </table> |
227 | 140 | </li> |
228 | - </ul> | |
229 | - </div> | |
230 | - </li> | |
231 | - #end*# | |
141 | + #end | |
142 | + </ul> | |
143 | + </div> | |
144 | + </li> | |
145 | + #*#else | |
146 | + <li class="clear u-heightauto" id="saleAttrLabelB" ><span class="spw">无销售属性:</span> | |
147 | + <div class="g-datum" id="noSaleAttr"> | |
148 | + <ul> | |
149 | + <li class="clear u-heightauto"> | |
150 | + <table class="m-assembly"> | |
151 | + <tr> | |
152 | + <th id="noPriceUnit">供应价(元/$!{productPop.unitName})</th> | |
153 | + <th id="maxUnit">可供量($!{productPop.unitName})</th> | |
154 | + <th id="noBeginUnit">起供量($!{productPop.unitName})</th> | |
155 | + </tr> | |
156 | + #set($tpSkus=${productPop.skuTpList}) | |
157 | + #foreach($b in $tpSkus) | |
158 | + <tr> | |
159 | + <td>$numberTool.format("0.00", ${b.price})</td> <td>$!b.store</td> <td>$!b.miniPurchase</td> | |
160 | + </tr> | |
161 | + #end | |
162 | + </table> | |
163 | + </li> | |
164 | + </ul> | |
165 | + </div> | |
166 | + </li> | |
167 | + #end*# | |
232 | 168 | |
233 | 169 | |
234 | 170 | <li class="clear u-heightauto"><span class="spw">商品图片:</span> |
... | ... | @@ -237,9 +173,9 @@ |
237 | 173 | <ul class="list-images" id="list-images"> |
238 | 174 | #set($imgs = $!productPop.pictures) |
239 | 175 | #foreach($img in $imgs) |
240 | - <li val="0" > | |
176 | + <li val="0"> | |
241 | 177 | <div class="a-img"> |
242 | - <img src="$!{img}" border="0" /> | |
178 | + <img src="$!{img}" border="0"/> | |
243 | 179 | </div> |
244 | 180 | </li> |
245 | 181 | #end |
... | ... | @@ -279,7 +215,7 @@ |
279 | 215 | } else { |
280 | 216 | return this._bkGetActionUrl.call(this, action); |
281 | 217 | } |
282 | - } | |
218 | + };;;;;;;;; | |
283 | 219 | //um.execCommand('insertHtml', $("#hidden-desc").val()); |
284 | 220 | um.ready(function () { |
285 | 221 | um.setContent($("#hidden-desc").val()); |
... | ... | @@ -290,10 +226,10 @@ |
290 | 226 | </div> |
291 | 227 | </li> |
292 | 228 | #if($productPop.video) |
293 | - <li class="clear u-heightauto"> | |
294 | - <span class="spw">商品视频:</span> | |
295 | - <span><a href="$!productPop.video.pageUrl" target="_blank">$!productPop.video.pageUrl</a></span> | |
296 | - </li> | |
229 | + <li class="clear u-heightauto"> | |
230 | + <span class="spw">商品视频:</span> | |
231 | + <span><a href="$!productPop.video.pageUrl" target="_blank">$!productPop.video.pageUrl</a></span> | |
232 | + </li> | |
297 | 233 | #end |
298 | 234 | </ul> |
299 | 235 | </div> | ... | ... |