| | |
| | | 1、选择对应的【商品类型】,将进入多SKU货品模式。同时如果类别有参数,也将进行显示设置。<br/> |
| | | 2、设置多SKU后,商品本身的价格只做对外展示用,实际以进入商品详情选择不同货品为准。<br/> |
| | | 3、货品SKU组合属性值只支持:中文、英文、数字、大写符号,小写符号三个(-、/、.))<br/> |
| | | 4、货号必须为SN字母开头<br/> |
| | | 4、货品编码必须为SN字母开头<br/> |
| | | 5、如果不设置单货品重量,将默认使用商品重量为1个单位的重量。 |
| | | </blockquote>--> |
| | | |
| | |
| | | <tr> |
| | | <th>默认货品</th> |
| | | <th>图片</th> |
| | | <th>货号</th> |
| | | <th>货品编码</th> |
| | | <th>SKU</th> |
| | | <th>重量(克)</th> |
| | | <!-- <th>赠送积分</th> |
| | | <th>积分最大<br />可抵金额</th> --> |
| | | <th>库存</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><i class="required-color">*</i>销售价</th> |
| | | <th>经销商价</th> |
| | | <th>成本价</th> |
| | | |
| | | <th style="width: 60px;">推广经销商采购返现</th> |
| | | <th>推广用户购买返现</th> |
| | | <th style="width: 80px;">是否支持定制</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> |
| | | {{item.freezeStock}} |
| | | </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> |
| | | |
| | | <input type="text" name="product[distributionPrice][]" value="{{item.distributionPrice||'0'}}" placeholder="经销商价" class="layui-input layui-inline-1"> |
| | | </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"> |
| | | <input type="text" name="product[distributionCutMoney][]" value="{{item.distributionCutMoney||'0'}}" placeholder="推广经销商采购返现" class="layui-input layui-inline-1"> |
| | | </td> |
| | | <td> |
| | | <input type="text" name="product[levelOne][]" value="{{item.levelOne}}" placeholder="经销商返现" class="layui-input layui-inline-1"> |
| | | <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][]" {{item.isCustomizable==true? 'checked':""}} value="{{item.isCustomizable||'false'}}" title="支持|不支持" lay-skin="switch" lay-filter="isCustomizable" > |
| | | </td> |
| | | <!-- <td> |
| | | <input type="text" name="product[levelTwo][]" value="{{item.levelTwo}}" placeholder="二级返现" class="layui-input layui-inline-1"> |
| | |
| | | <td> |
| | | <input type="text" name="product[levelThree][]" value="{{item.levelThree}}" placeholder="三级返现" class="layui-input layui-inline-1"> |
| | | </td> --> |
| | | <td> |
| | | {{item.freezeStock}} |
| | | </td> |
| | | |
| | | <td> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs del-class" lay-active="delTr">删除</a> |
| | | </td> |
| | |
| | | <div class="layui-input-inline"> |
| | | <button type="button" class="layui-btn layui-btn-warm layui-btn-sm" lay-active="getGenerateSpecBtn"><i class="layui-icon layui-icon-export"></i>生成SKU货品列表</button> |
| | | </div> |
| | | <div class="layui-input-inline"> |
| | | <!-- <div class="layui-input-inline"> |
| | | <button type="button" class="aKeySetBtn layui-btn layui-btn-warm layui-btn-sm"> |
| | | <i class="layui-icon layui-icon-set"></i>一键设置 |
| | | </button> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | </div> |
| | | <div id="more_spec"></div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">市场价</label> |
| | | <label class="layui-form-label">指导零售价</label> |
| | | <div class="layui-input-inline layui-inline-2"> |
| | | <input class="layui-input" id="oneKeySetMktPrice"> |
| | | </div> |
| | |
| | | } else { |
| | | oldSingleData = d.data.products[0]; |
| | | } |
| | | |
| | | |
| | | //初始化商品信息 |
| | | var getTpl = getSpec_tpl.innerHTML, viewBox = document.getElementById('more_spec'); |
| | | var tmpData = oldMultitermData; |
| | |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | // 监听开关切换事件 |
| | | form.on('switch(isCustomizable)', function(data){ |
| | | var elem = data.elem; // 当前开关元素 |
| | | elem.value=true; |
| | | |
| | | }); |
| | | //图集上传 |
| | | $('#upBtnimageIds').click(function () { |
| | | cropperImg.cropImg({ |
| | |
| | | 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位字符,且不能出现空格'], |
| | |
| | | productModel.levelThree = field['product[levelThree][' + i + ']']; |
| | | productModel.pointsDeduction = field['product[pointsDeduction][' + i + ']']; |
| | | productModel.points = field['product[points][' + i + ']']; |
| | | //添加 百分兵法 |
| | | productModel.isCustomizable = field['product[isCustomizable][' + i + ']']; |
| | | productModel.distributionPrice = field['product[distributionPrice][' + i + ']']; |
| | | productModel.distributionCutMoney = field['product[distributionCutMoney][' + i + ']']; |
| | | productModel.cutMoney = field['product[cutMoney][' + i + ']']; |
| | | products.push(productModel); |
| | | |
| | | } |
| | | //会员价格模型 |
| | | var gradePrice = []; |