| | |
| | | </div> |
| | | </div> |
| | | |
| | | <blockquote class="layui-elem-quote blue-border">优惠卷设置</blockquote> |
| | | <div class="layui-form-item coupon-rule"> |
| | | <div class="layui-col-lg6"> |
| | | <label class="layui-form-label febs-form-item-require">优惠卷:</label> |
| | | <div class="layui-input-block"> |
| | | <div id="coupon-rule"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <blockquote class="layui-elem-quote blue-border">多规格设置</blockquote> |
| | | <div class="layui-col-lg6"> |
| | | <label class="layui-form-label">开启多规格:</label> |
| | |
| | | iconfont: { |
| | | parent: 'hidden', |
| | | }, |
| | | tips: '请选择', |
| | | filterable: true, |
| | | radio: true, |
| | | clickClose: true, |
| | | tree: { |
| | |
| | | |
| | | febs.get(ctx + 'admin/goods/carriageRuleTree', null, function(res) { |
| | | carriageRule.update({ |
| | | data : res.data, |
| | | autoRow: true, |
| | | }); |
| | | }) |
| | | |
| | | var couponRule = xmSelect.render({ |
| | | el: '#coupon-rule', |
| | | language: 'zn', |
| | | prop : { |
| | | value : 'id', |
| | | children : 'child' |
| | | }, |
| | | iconfont: { |
| | | parent: 'hidden', |
| | | }, |
| | | // radio: true, |
| | | clickClose: true, |
| | | tree: { |
| | | show: true, |
| | | //非严格模式 |
| | | strict: false, |
| | | }, |
| | | data: [] |
| | | }) |
| | | |
| | | febs.get(ctx + 'admin/goods/couponTreeSet', null, function(res) { |
| | | couponRule.update({ |
| | | data : res.data, |
| | | autoRow: true, |
| | | }); |
| | |
| | | |
| | | form.on('submit(goods-add-form-submit)', function (data) { |
| | | data.field.goodsType = 1; |
| | | let couponRuleList = couponRule.getValue(); |
| | | if (couponRuleList.length > 0) { |
| | | var couponIds = []; |
| | | layui.each(couponRuleList, function (key, item) { |
| | | couponIds.push(item.id) |
| | | }); |
| | | data.field.couponIds=couponIds; |
| | | } |
| | | data.field.addMallGoodsSkuDtos = tableSkuData; |
| | | data.field.categoryId = category.getValue('valueStr'); |
| | | data.field.carriageRuleId = carriageRule.getValue('valueStr'); |