src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallGoodsService.java
@@ -181,8 +181,8 @@ sku.setPresentPrice(new BigDecimal(mallGoods.getPresentPrice())); sku.setOriginalPrice(new BigDecimal(mallGoods.getOriginalPrice())); sku.setLevelOnePrice(mallGoods.getLevelOnePrice()); // sku.setLevelTwoPrice(mallGoods.getLevelTwoPrice()); // sku.setLevelThreePrice(mallGoods.getLevelThreePrice()); sku.setLevelTwoPrice(mallGoods.getLevelTwoPrice()); sku.setLevelThreePrice(mallGoods.getLevelThreePrice()); sku.setSkuVolume(mallGoods.getVolume()); sku.setStock(mallGoods.getStock()); sku.setStyleId(style.getId()); @@ -459,8 +459,8 @@ // sku.setPresentPrice(new BigDecimal(mallGoods.getOriginalPrice())); sku.setOriginalPrice(new BigDecimal(mallGoods.getOriginalPrice())); sku.setLevelOnePrice(mallGoods.getLevelOnePrice()); // sku.setLevelTwoPrice(mallGoods.getLevelTwoPrice()); // sku.setLevelThreePrice(mallGoods.getLevelThreePrice()); sku.setLevelTwoPrice(mallGoods.getLevelTwoPrice()); sku.setLevelThreePrice(mallGoods.getLevelThreePrice()); sku.setSkuVolume(mallGoods.getVolume()); sku.setStock(mallGoods.getStock()); sku.setStyleId(style.getId()); @@ -527,8 +527,8 @@ mallGoodsSku.setPresentPrice(addMallGoodsSkuDto.getPresentPrice()); // mallGoodsSku.setPresentPrice(addMallGoodsSkuDto.getOriginalPrice()); mallGoodsSku.setLevelOnePrice(addMallGoodsSkuDto.getLevelOnePrice()); // mallGoodsSku.setLevelTwoPrice(addMallGoodsSkuDto.getLevelTwoPrice()); // mallGoodsSku.setLevelThreePrice(addMallGoodsSkuDto.getLevelThreePrice()); mallGoodsSku.setLevelTwoPrice(addMallGoodsSkuDto.getLevelTwoPrice()); mallGoodsSku.setLevelThreePrice(addMallGoodsSkuDto.getLevelThreePrice()); mallGoodsSku.setStyleId(addMallGoodsSkuDto.getStyleId()); mallGoodsSku.setGoodsId(mallGoods.getId()); mallGoodsSku.setCostPrice(addMallGoodsSkuDto.getCostPrice()); @@ -547,8 +547,8 @@ mallGoodsSku.setPresentPrice(addMallGoodsSkuDto.getPresentPrice()); // mallGoodsSku.setPresentPrice(addMallGoodsSkuDto.getOriginalPrice()); mallGoodsSku.setLevelOnePrice(addMallGoodsSkuDto.getLevelOnePrice()); // mallGoodsSku.setLevelTwoPrice(addMallGoodsSkuDto.getLevelTwoPrice()); // mallGoodsSku.setLevelThreePrice(addMallGoodsSkuDto.getLevelThreePrice()); mallGoodsSku.setLevelTwoPrice(addMallGoodsSkuDto.getLevelTwoPrice()); mallGoodsSku.setLevelThreePrice(addMallGoodsSkuDto.getLevelThreePrice()); mallGoodsSku.setStyleId(mallGoodsStyleSku.getId()); mallGoodsSku.setCostPrice(addMallGoodsSkuDto.getCostPrice()); mallGoodsSku.setGoodsId(mallGoods.getId()); src/main/resources/templates/febs/views/modules/goods/goodsAddNew.html
@@ -231,6 +231,26 @@ <!-- <input type="text" name="costPrice" lay-verify="required" placeholder="" autocomplete="off" class="layui-input">--> <!-- </div>--> <!-- </div>--> <blockquote class="layui-elem-quote blue-border">购买商品,赠送卷</blockquote> <div class="layui-form-item"> <label class="layui-form-label">是否赠送:</label> <div class="layui-input-block"> <input type="radio" name="levelTwoPrice" value="1" title="是" lay-filter="hasRoll" /> <input type="radio" name="levelTwoPrice" value="2" title="否" lay-filter="hasRoll" checked/> </div> </div> <div class="layui-form-item roll-input febs-hide"> <div class="layui-col-lg6"> <label class="layui-form-label">类型:</label> <div class="layui-input-block"> <select name="levelThreePrice"> <option value="1">课程卷</option> <option value="2">民宿卷</option> </select> </div> </div> </div> <blockquote class="layui-elem-quote blue-border">运费设置</blockquote> <div class="layui-form-item"> <label class="layui-form-label">运费:</label> @@ -259,42 +279,42 @@ </div> </div> <blockquote class="layui-elem-quote blue-border">多规格设置</blockquote> <div class="layui-col-lg6"> <label class="layui-form-label">开启多规格:</label> <div class="layui-input-block"> <input type="radio" name="isSku" value="1" title="是" lay-filter="isSku" /> <input type="radio" name="isSku" value="2" title="否" lay-filter="isSku" checked /> </div> </div> <div class="layui-form-item multi-sku-table febs-hide"> <div class="layui-row layui-col-space10 layui-form-item"> <div class="layui-col-lg6"> <label class="layui-form-label febs-form-item-require">样式:</label> <div class="layui-input-block"> <input type="text" name="addMallGoodsSkuDtos" autocomplete="off" class="layui-input" id="attrName"> </div> </div> <div class="layui-col-lg1"> <button type="button" class="layui-btn layui-btn-normal layui-btn" id="test3"> 添加 </button> </div> <div class="layui-col-lg1"> <button type="button" class="layui-btn layui-btn-normal layui-btn" id="test4"> 新增样品 </button> </div> </div> <!-- <blockquote class="layui-elem-quote blue-border">多规格设置</blockquote>--> <!-- <div class="layui-col-lg6">--> <!-- <label class="layui-form-label">开启多规格:</label>--> <!-- <div class="layui-input-block">--> <!-- <input type="radio" name="isSku" value="1" title="是" lay-filter="isSku" />--> <!-- <input type="radio" name="isSku" value="2" title="否" lay-filter="isSku" checked />--> <!-- </div>--> <!-- </div>--> <!-- <div class="layui-form-item multi-sku-table febs-hide">--> <!-- <div class="layui-row layui-col-space10 layui-form-item">--> <!-- <div class="layui-col-lg6">--> <!-- <label class="layui-form-label febs-form-item-require">样式:</label>--> <!-- <div class="layui-input-block">--> <!-- <input type="text" name="addMallGoodsSkuDtos" autocomplete="off" class="layui-input" id="attrName">--> <!-- </div>--> <!-- </div>--> <!-- <div class="layui-col-lg1">--> <!-- <button type="button"--> <!-- class="layui-btn layui-btn-normal layui-btn" id="test3">--> <!-- 添加--> <!-- </button>--> <!-- </div>--> <!-- <div class="layui-col-lg1">--> <!-- <button type="button"--> <!-- class="layui-btn layui-btn-normal layui-btn" id="test4">--> <!-- 新增样品--> <!-- </button>--> <!-- </div>--> <!-- </div>--> <div class="layui-form-item"> <div class="layui-input-block"> <table id="multiSku" lay-filter="multiSku"></table> </div> </div> </div> <!-- <div class="layui-form-item">--> <!-- <div class="layui-input-block">--> <!-- <table id="multiSku" lay-filter="multiSku"></table>--> <!-- </div>--> <!-- </div>--> <!-- </div>--> </div> </div> </div> @@ -519,6 +539,14 @@ } }); form.on('radio(hasRoll)', function(data){ if (data.value == 2) { $('.roll-input').hide(); } else { $('.roll-input').show(); } }); function addTableDate(data) { var hasData = table.cache['multiSku']; @@ -699,6 +727,7 @@ form.on('submit(goods-add-form-submit)', function (data) { data.field.goodsType = 1; data.field.isSku = 2; data.field.addMallGoodsSkuDtos = tableSkuData; data.field.categoryId = category.getValue('valueStr'); data.field.carriageRuleId = carriageRule.getValue('valueStr'); src/main/resources/templates/febs/views/modules/goods/goodsList.html
@@ -80,19 +80,16 @@ {{# } }} </script> <script type="text/html" id="isNormalFormat"> {{# if(d.isNormal == 1) { }} <span>积分兑换商品</span> {{# else if(d.isNormal == 2) { }} <span>购买积分商品</span> {{# else if(d.isNormal == 3) { }} <span>普通商品</span> {{# else if(d.isNormal == 4) { }} <span>课程卷商品</span> {{# else if(d.isNormal == 5) { }} <span>民宿卷商品</span> {{# } else { }} <span></span> {{# } }} {{# var isNormal = { 1: {title: '积分兑换商品', color: 'orange'}, 2: {title: '购买积分商品', color: 'green'}, 3: {title: '普通商品', color: 'blue'}, 4: {title: '课程卷商品', color: 'orange'}, 5: {title: '民宿卷商品', color: 'green'}, }[d.isNormal]; }} <span class="layui-badge febs-bg-{{isNormal.color}}">{{ isNormal.title }}</span> </script> <style> .layui-form-onswitch { @@ -247,12 +244,12 @@ {field: 'categaryName', title: '分类', minWidth: 140,align:'left'}, {field: 'isSale', title: '是否上架', templet: '#upOrDownSwitch', minWidth: 100,align:'center'}, {field: 'isHot', title: '是否主推', templet: '#isHotSwitch', minWidth: 100,align:'center'}, {templet:"#isNormalFormat", title: '商品类型', minWidth: 140,align:'left'}, {templet:"#isSkuFormat", title: '是否多规格', minWidth: 100,align:'left'}, {field: 'presentPrice', title: '现价', minWidth: 100,align:'left'}, {field: 'originalPrice', title: '原价', minWidth: 100,align:'left'}, {field: 'stock', title: '商品库存', minWidth: 100,align:'left'}, {field: 'skuVolume', title: '商品销量', minWidth: 100,align:'left'}, {title: '商品类型', minWidth: 100,templet: '#isNormalFormat',align:'center'}, {templet:"#isSkuFormat", title: '是否多规格', minWidth: 100,align:'center'}, {field: 'presentPrice', title: '现价', minWidth: 100,align:'center'}, {field: 'originalPrice', title: '原价', minWidth: 100,align:'center'}, {field: 'stock', title: '商品库存', minWidth: 100,align:'center'}, {field: 'skuVolume', title: '商品销量', minWidth: 100,align:'center'}, {title: '操作', templet: function (d) { if (d.isSale === 1) { src/main/resources/templates/febs/views/modules/goods/goodsUpdateNew.html
@@ -258,6 +258,27 @@ <!-- </div>--> <!-- </div>--> <blockquote class="layui-elem-quote blue-border">购买商品,赠送卷</blockquote> <div class="layui-form-item"> <label class="layui-form-label">是否赠送:</label> <div class="layui-input-block"> <input type="radio" name="levelTwoPrice" value="1" title="是" lay-filter="hasRoll" /> <input type="radio" name="levelTwoPrice" value="2" title="否" lay-filter="hasRoll" checked/> </div> </div> <div class="layui-form-item roll-input febs-hide"> <div class="layui-col-lg6"> <label class="layui-form-label">类型:</label> <div class="layui-input-block"> <select name="levelThreePrice"> <option value="1">课程卷</option> <option value="2">民宿卷</option> </select> </div> </div> </div> <blockquote class="layui-elem-quote blue-border">运费设置</blockquote> <div class="layui-form-item"> <label class="layui-form-label">运费:</label> @@ -286,45 +307,45 @@ </div> </div> <blockquote class="layui-elem-quote blue-border">多规格设置</blockquote> <div class="layui-col-lg6"> <label class="layui-form-label">开启多规格:</label> <div class="layui-input-block"> <input type="radio" name="isSku" value="1" title="是" lay-filter="isSku"/> <input type="radio" name="isSku" value="2" title="否" lay-filter="isSku" checked/> </div> </div> <div class="layui-form-item multi-sku-table febs-hide"> <div class="layui-row layui-col-space10 layui-form-item"> <div class="layui-col-lg6"> <label class="layui-form-label febs-form-item-require">样式:</label> <div class="layui-input-block"> <input type="text" name="addMallGoodsSkuDtos" autoComplete="off" class="layui-input" id="attrName"> </div> </div> <div class="layui-col-lg3"> <button type="button" class="layui-btn layui-btn-normal layui-btn" id="test3"> 添加 </button> </div> <div class="layui-col-lg3"> <button type="button" class="layui-btn layui-btn-normal layui-btn" id="test4"> 新增样品 </button> </div> </div> <!-- <blockquote class="layui-elem-quote blue-border">多规格设置</blockquote>--> <!-- <div class="layui-col-lg6">--> <!-- <label class="layui-form-label">开启多规格:</label>--> <!-- <div class="layui-input-block">--> <!-- <input type="radio" name="isSku" value="1" title="是"--> <!-- lay-filter="isSku"/>--> <!-- <input type="radio" name="isSku" value="2" title="否" lay-filter="isSku"--> <!-- checked/>--> <!-- </div>--> <!-- </div>--> <!-- <div class="layui-form-item multi-sku-table febs-hide">--> <!-- <div class="layui-row layui-col-space10 layui-form-item">--> <!-- <div class="layui-col-lg6">--> <!-- <label class="layui-form-label febs-form-item-require">样式:</label>--> <!-- <div class="layui-input-block">--> <!-- <input type="text" name="addMallGoodsSkuDtos" autoComplete="off"--> <!-- class="layui-input" id="attrName">--> <!-- </div>--> <!-- </div>--> <!-- <div class="layui-col-lg3">--> <!-- <button type="button"--> <!-- class="layui-btn layui-btn-normal layui-btn" id="test3">--> <!-- 添加--> <!-- </button>--> <!-- </div>--> <!-- <div class="layui-col-lg3">--> <!-- <button type="button"--> <!-- class="layui-btn layui-btn-normal layui-btn" id="test4">--> <!-- 新增样品--> <!-- </button>--> <!-- </div>--> <!-- </div>--> <div class="layui-form-item"> <div class="layui-input-block"> <table id="multiSku" lay-filter="multiSku"></table> </div> </div> </div> <!-- <div class="layui-form-item">--> <!-- <div class="layui-input-block">--> <!-- <table id="multiSku" lay-filter="multiSku"></table>--> <!-- </div>--> <!-- </div>--> <!-- </div>--> </div> </div> </div> @@ -754,8 +775,8 @@ "originalPrice": goodsInfo.originalPrice, "presentPrice": goodsInfo.presentPrice, "levelOnePrice": goodsInfo.levelOnePrice, // "levelTwoPrice": goodsInfo.levelTwoPrice, // "levelThreePrice": goodsInfo.levelThreePrice, "levelTwoPrice": goodsInfo.levelTwoPrice, "levelThreePrice": goodsInfo.levelThreePrice, "costPrice": goodsInfo.costPrice, "isSku": goodsInfo.isSku, "thumb": goodsInfo.thumb, @@ -776,6 +797,10 @@ if (goodsInfo.isNormal == 2) { $(".tc-set").show(); } if (goodsInfo.levelTwoPrice == 1) { $(".roll-input").show(); } if (goodsInfo.carriageType == 2) { @@ -828,6 +853,7 @@ form.on('submit(goods-update-form-submit)', function (data) { data.field.goodsType=1; data.field.mailGoodsSkuDto = tableSkuData; data.field.isSku = 2; data.field.delSkuId=delSku; data.field.categoryId = category.getValue('valueStr'); data.field.carriageRuleId = carriageRule.getValue('valueStr'); @@ -865,5 +891,13 @@ }) }); form.on('radio(hasRoll)', function(data){ if (data.value == 2) { $('.roll-input').hide(); } else { $('.roll-input').show(); } }); }); </script>