| | |
| | | {{# } }} |
| | | </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 { |
| | |
| | | {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) { |