| | |
| | | </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> |
| | |
| | | // initValue(); |
| | | }) |
| | | |
| | | 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, |
| | | }); |
| | | |
| | | initValue(); |
| | | }) |
| | | |
| | | var carriageRule = xmSelect.render({ |
| | | el: '#carriage-rule', |
| | | language: 'zn', |
| | |
| | | data : res.data, |
| | | autoRow: true, |
| | | }); |
| | | |
| | | initValue(); |
| | | }) |
| | | |
| | | |
| | | var tableSkuData = []; |
| | | var tableIns = table.render({ |
| | |
| | | arrCarriageRule.push(goodsInfo.carriageRuleId) |
| | | carriageRule.setValue(arrCarriageRule); |
| | | |
| | | couponRule.setValue(goodsInfo.couponIds); |
| | | |
| | | if (goodsInfo.isNormal == 2) { |
| | | $(".tc-set").show(); |
| | | } |
| | |
| | | } |
| | | |
| | | form.on('submit(goods-update-form-submit)', function (data) { |
| | | 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.goodsType=1; |
| | | data.field.mailGoodsSkuDto = tableSkuData; |
| | | data.field.delSkuId=delSku; |