| | |
| | | 1、选择对应的【商品类型】,将进入多SKU货品模式。同时如果类别有参数,也将进行显示设置。<br /> |
| | | 2、设置多SKU后,商品本身的价格只做对外展示用,实际以进入商品详情选择不同货品为准。<br /> |
| | | 3、货品SKU组合属性值只支持:中文、英文、数字、大写符号,小写符号三个(-、/、.))<br /> |
| | | 4、货号必须为SN字母开头<br /> |
| | | 4、货品编码必须为SN字母开头<br /> |
| | | 5、如果不设置单货品重量,将默认使用商品重量为1个单位的重量。 |
| | | </blockquote>--> |
| | | |
| | |
| | | <label for="brandId" class="layui-form-label">佣金设置</label> |
| | | <div class="layui-input-inline layui-inline-6" pane> |
| | | {{# layui.each(d.data.productsDistributionType, function(index, item){ }} |
| | | <input type="radio" name="goods[productsDistributionType]" value="{{ item.value }}" title="{{ item.description }}" {{item.value===1?'checked="checked"':''}}> |
| | | <input type="radio" name="goods[productsDistributionType]" value="{{ item.value }}" title="{{ item.description }}" {{item.value===2?'checked="checked"':''}}> |
| | | {{# }); }} |
| | | </div> |
| | | </div> |
| | |
| | | <tr> |
| | | <th>默认货品</th> |
| | | <th>图片</th> |
| | | <th>货号</th> |
| | | <th>货品编码</th> |
| | | <th>SKU</th> |
| | | <th>重量(克)</th> |
| | | <!-- <th>赠送积分</th> |
| | | <th>积分最大<br />可抵金额</th> --> |
| | | <th>库存</th> |
| | | <th>库存数量</th> |
| | | <th style="width: 60px;">建议零售价</th> |
| | | <th><i class="required-color">*</i>销售价</th> |
| | | <th>经销商价格</th> |
| | | <th>成本价</th> |
| | | <th>指导零售价</th> |
| | | <th>普通用户购买返现</th> |
| | | <th>经销商用户购买返现</th> |
| | | <th>经销商价</th> |
| | | <th>成本价</th> |
| | | |
| | | <th style="width: 60px;">推广经销商采购返现</th> |
| | | <th>推广用户购买返现</th> |
| | | <th style="width: 80px;">是否支持定制</th> |
| | | <!-- <th>二级返现</th> |
| | | <th>三级返现</th> --> |
| | | <!-- <th>三级返现</th> --> --> |
| | | <th>操作</th> |
| | | </tr> |
| | | </thead> |
| | |
| | | </div> |
| | | </td> |
| | | <td> |
| | | <input type="text" name="product[sn][]" value="{{item.sn}}" placeholder="货号" class="layui-input layui-inline-3"> |
| | | <input type="text" name="product[sn][]" value="{{item.sn}}" placeholder="货品编码" class="layui-input layui-inline-3"> |
| | | </td> |
| | | <td> |
| | | <input type="hidden" name="product[spesDesc][]" value="{{item.spesDesc}}" placeholder="SKU" class="layui-input"> |
| | |
| | | <input type="number" name="product[stock][]" value="{{item.stock}}" placeholder="库存" class="layui-input layui-inline-1 goods-stock"> |
| | | </td> |
| | | <td> |
| | | <input type="text" name="product[mktprice][]" value="{{item.mktprice}}" placeholder="指导零售价" class="layui-input layui-inline-1"> |
| | | </td> |
| | | <td> |
| | | <input type="text" name="product[price][]" value="{{item.price}}" placeholder="销售价" class="layui-input layui-inline-1"> |
| | | </td> |
| | | <td> |
| | |
| | | <td> |
| | | <input type="text" name="product[costprice][]" value="{{item.costprice}}" placeholder="成本价" class="layui-input layui-inline-1"> |
| | | </td> |
| | | <td> |
| | | <input type="text" name="product[mktprice][]" value="{{item.mktprice}}" placeholder="指导零售价" class="layui-input layui-inline-1"> |
| | | </td> |
| | | |
| | | <td> |
| | | <input type="text" name="product[distributionCutMoney][]" value="{{item.distributionCutMoney||'0'}}" placeholder="经销商购买返现" class="layui-input layui-inline-1"> |
| | | </td> |
| | | <td> |
| | | <input type="text" name="product[cutMoney][]" value="{{item.cutMoney||'0'}}" placeholder="普通用户购买返现" class="layui-input layui-inline-1"> |
| | | </td> |
| | | <td> |
| | | <!-- <input type="checkbox" name="product[isCustomizable][]" value="{{item.isCustomizable||'false'}}" placeholder="普通用户购买返现" class="layui-input layui-inline-1"> --> |
| | | <input type="checkbox" name="product[isCustomizable][]" title="支持|不支持" lay-skin="switch" value="{{item.distributionCutMoney||'false'}}" lay-filter="isCustomizable" class="isCustomizable"> |
| | | </td> |
| | | <!-- <td> |
| | | <input type="text" name="product[levelTwo][]" value="{{item.levelTwo}}" placeholder="二级返现" class="layui-input layui-inline-1"> |
| | |
| | | </select> |
| | | </script> |
| | | <script src="/views/liao.js"></script> |
| | | <!--//一键设置SKU图片时自动生成选中的SKU--> |
| | | <!--一键设置SKU图片时自动生成选中的SKU--> |
| | | <script id="imageSetMoreSku_tpl" type="text/html"> |
| | | {{# layui.each(d, function(index, item){ }} |
| | | <input type="checkbox" name="skuAttrValue" value="{{item}}" title="{{item}}" class="class_onkeySet_checkbox_creat" lay-filter="skuAttrValue-filter"> |
| | |
| | | form.verify({ |
| | | money: [/((^[1-9]\d*)|^0)(\.\d{0,2}){0,1}$/, '请输入金额'], |
| | | verifybn: [/^[\S]{0,30}$/, '商品编码最大只允许输入30位字符,且不能出现空格'], |
| | | verifysn: [/^[\S]{0,30}$/, '货号最大只允许输入30位字符,且不能出现空格'], |
| | | verifysn: [/^[\S]{0,30}$/, '货品编码最大只允许输入30位字符,且不能出现空格'], |
| | | verifyname: [/^.{0,200}$/, '商品名称最大只允许输入200位字符'], |
| | | verifybrief: [/^.{0,255}$/, '商品简介最大只允许输入255位字符'], |
| | | verifyimageIds: [/^[\S]{0,255}$/, '默认图片 图片id最大只允许输入255位字符,且不能出现空格'], |
| | |
| | | } |
| | | form.render(); |
| | | }); |
| | | |
| | | |
| | | // 监听开关切换事件 |
| | | form.on('switch(isCustomizable)', function(data){ |
| | | var elem = data.elem; // 当前开关元素 |
| | | elem.value=true; |
| | | |
| | | }); |
| | | function openSpecBox(is_open) { |
| | | if (is_open == '0') { |
| | | $("input[name=openSpec]").val("1"); |
| | |
| | | }, |
| | | createbn: function () { |
| | | var bn = layui.coreHelper.getSN('BN'); |
| | | |
| | | $("#bn").val(bn); |
| | | } |
| | | , createSn: function () { |
| | |
| | | //多参数产品库生成列表集合 |
| | | var products = []; |
| | | var productsCount = parseInt(field['productsCount']); |
| | | debugger |
| | | |
| | | for (var i = 0; i < productsCount; i++) { |
| | | var productModel = {}; |
| | | productModel.costprice = field['product[costprice][' + i + ']']; |
| | |
| | | productModel.levelThree = field['product[levelThree][' + i + ']']; |
| | | productModel.pointsDeduction = field['product[pointsDeduction][' + i + ']']; |
| | | productModel.points = field['product[points][' + i + ']']; |
| | | debugger |
| | | //百分兵法添加 |
| | | productModel.isCustomizable = field['product[isCustomizable][' + i + ']']; |
| | | productModel.points = field['product[points][' + i + ']']; |
| | | productModel.distributionPrice = field['product[distributionPrice][' + i + ']']; |
| | | productModel.distributionCutMoney = field['product[distributionCutMoney][' + i + ']']; |
| | | productModel.cutMoney = field['product[cutMoney][' + i + ']']; |