| | |
| | | }); |
| | | }) |
| | | |
| | | 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, |
| | | }); |
| | | }) |
| | | // 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, |
| | | // }); |
| | | // }) |
| | | |
| | | var tableSkuData=[]; |
| | | var tableIns = table.render({ |
| | |
| | | |
| | | 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; |
| | | } |
| | | // 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'); |
| | |
| | | autoRow: true, |
| | | }); |
| | | |
| | | // initValue(); |
| | | initGoodsUpdateValue(); |
| | | }) |
| | | |
| | | 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 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, |
| | | // }); |
| | | // |
| | | // initGoodsUpdateValue(); |
| | | // }) |
| | | |
| | | var carriageRule = xmSelect.render({ |
| | | el: '#carriage-rule', |
| | |
| | | }) |
| | | } |
| | | |
| | | function initValue() { |
| | | function initGoodsUpdateValue() { |
| | | var images = goodsInfo.images; |
| | | var thumbs = images.join(","); |
| | | form.val("goods-update-form", { |
| | |
| | | arrCarriageRule.push(goodsInfo.carriageRuleId) |
| | | carriageRule.setValue(arrCarriageRule); |
| | | |
| | | couponRule.setValue(goodsInfo.couponIds); |
| | | // 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; |
| | | } |
| | | // 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; |
| | |
| | | <div class="layui-col-md10"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label layui-form-label-sm">用户昵称</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" placeholder="用户昵称" name="name" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label layui-form-label-sm">手机号码</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" placeholder="手机号码" name="account" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label layui-form-label-sm">会员类型</label> |
| | | <label class="layui-form-label layui-form-label-sm">用户昵称</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="level"> |
| | | <option value="">请选择</option> |
| | | <option value="ZERO_LEVEL">普通用户</option> |
| | | <option value="FIRST_LEVEL">城市合伙人</option> |
| | | </select> |
| | | <input type="text" placeholder="用户昵称" name="name" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label layui-form-label-sm">会员生日</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="birthday" id="febs-member-benefits-list-birthday-start" lay-verify="date" |
| | | placeholder="MM-dd" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-inline">--> |
| | | <!-- <label class="layui-form-label layui-form-label-sm">会员类型</label>--> |
| | | <!-- <div class="layui-input-inline">--> |
| | | <!-- <select name="level">--> |
| | | <!-- <option value="">请选择</option>--> |
| | | <!-- <option value="ZERO_LEVEL">普通用户</option>--> |
| | | <!-- <option value="FIRST_LEVEL">城市合伙人</option>--> |
| | | <!-- </select>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="layui-inline">--> |
| | | <!-- <label class="layui-form-label layui-form-label-sm">会员生日</label>--> |
| | | <!-- <div class="layui-input-inline">--> |
| | | <!-- <input type="text" name="birthday" id="febs-member-benefits-list-birthday-start" lay-verify="date"--> |
| | | <!-- placeholder="MM-dd" autocomplete="off" class="layui-input">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-md2 layui-col-sm12 layui-col-xs12 table-action-area"> |
| | |
| | | </style> |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" lay-event="updateReferer">修改推荐人</button> |
| | | <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" lay-event="updateVipLevel">修改会员等级</button> |
| | | <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" lay-event="addCoupon">优惠券派送</button> |
| | | <!-- <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" lay-event="updateReferer">修改推荐人</button>--> |
| | | <!-- <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" lay-event="updateVipLevel">修改会员等级</button>--> |
| | | <!-- <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" lay-event="addCoupon">优惠券派送</button>--> |
| | | </div> |
| | | </script> |
| | | <!-- 表格操作栏 end --> |
| | |
| | | {type: 'checkbox'}, |
| | | {field: 'phone', title: '手机号码', minWidth: 150,align:'left'}, |
| | | {field: 'name', title: '用户昵称', minWidth: 100,align:'left'}, |
| | | {field: 'birthday', title: '会员生日', minWidth: 100,align:'left'}, |
| | | // {field: 'birthday', title: '会员生日', minWidth: 100,align:'left'}, |
| | | {field: 'inviteId', title: '邀请码', minWidth: 100,align:'left'}, |
| | | {field: 'balance', title: '余额', minWidth: 100,align:'left'}, |
| | | // {field: 'balance', title: '余额', minWidth: 100,align:'left'}, |
| | | // {field: 'score', title: '赠送积分', minWidth: 100,align:'left'}, |
| | | {field: 'prizeScore', title: '积分', minWidth: 100,align:'left'}, |
| | | // {field: 'prizeScore', title: '积分', minWidth: 100,align:'left'}, |
| | | // {field: 'commission', title: '佣金', minWidth: 100,align:'left'}, |
| | | {field: 'referrerName', title: '推荐人', minWidth: 100,align:'left'}, |
| | | {field: 'levelName', title: '会员等级', minWidth: 100,align:'left'}, |
| | | // {field: 'referrerName', title: '推荐人', minWidth: 100,align:'left'}, |
| | | {field: 'isSalesman', title: '推销员设置', templet: '#isSalesmanSwitch', minWidth: 100,align:'center'}, |
| | | // {field: 'levelName', title: '会员等级', minWidth: 100,align:'left'}, |
| | | // {field: 'referrerName', title: '推荐人', minWidth: 100,align:'left'}, |
| | | // {field: 'isSalesman', title: '推销员设置', templet: '#isSalesmanSwitch', minWidth: 100,align:'center'}, |
| | | // {field: 'director', title: '总监', templet:'#switchDirector', minWidth: 100}, |
| | | // {field: 'accountType', title: '账号类型', |
| | | // templet: function (d) { |
| | |
| | | <div class="layui-form-item"> |
| | | <div class="layui-col-md10"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">购买人:</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" placeholder="购买人" name="name" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">订单编号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" placeholder="订单编号" name="orderNo" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">购买人:</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" placeholder="购买人" name="name" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | |
| | | {field: 'orderNo', title: '订单编号', minWidth: 200,align:'left' ,totalRowText:"合计"}, |
| | | {field: 'memberName', title: '购买人', minWidth: 100,align:'left'}, |
| | | {field: 'memberPhone', title: '联系方式', minWidth: 120,align:'left'}, |
| | | {field: 'refererName', title: '推荐人', minWidth: 100,align:'left'}, |
| | | // {field: 'refererName', title: '推荐人', minWidth: 100,align:'left'}, |
| | | {field: 'goodsName', title: '商品', minWidth: 160,align:'left'}, |
| | | {field: 'remark', title: '备注', minWidth: 160,align:'left'}, |
| | | {field: 'goodsAmount', title: '价格', minWidth: 80,align:'left', totalRow:true}, |