| | |
| | | <title>分销商表</title> |
| | | <title>经销商表</title> |
| | | <!--当前位置开始--> |
| | | <div class="layui-card layadmin-header"> |
| | | <div class="layui-breadcrumb" lay-filter="breadcrumb"> |
| | |
| | | |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input type="number" name="id" placeholder="分销商序列" class="layui-input"> |
| | | <input type="number" name="id" placeholder="经销商序列" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="name" placeholder="请输入分销商名称" class="layui-input"> |
| | | <input type="text" name="name" placeholder="请输入经销商名称" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <input type="text" name="mobile" placeholder="请输入手机号" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <!-- <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="weixin" placeholder="请输入微信号" class="layui-input"> |
| | | </div> |
| | |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="qq" placeholder="请输入qq号" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> --> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="storeName" placeholder="请输入店铺名称" class="layui-input"> |
| | |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <select name="gradeId"> |
| | | <option value="">请选择分销等级</option> |
| | | <option value="">请选择经销等级</option> |
| | | {{# layui.each(indexData.grades, function(index, item){ }} |
| | | <option value="{{ item.id }}">{{ item.name }}</option> |
| | | {{# }); }} |
| | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <!-- <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input type="number" name="userId" placeholder="用户序列" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> --> |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn layui-btn-sm" lay-submit lay-filter="LAY-app-CoreCmsDistribution-search"><i class="layui-icon layui-icon-search"></i>筛选</button> |
| | | </div> |
| | |
| | | |
| | | |
| | | <script type="text/html" id="LAY-app-CoreCmsDistribution-tableBox-bar"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="qrcode">小程序码</a> |
| | | <!-- <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="qrcode">小程序码</a> --> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="achievement">推广费</a> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a> |
| | | <a class="layui-btn layui-btn-xs" lay-event="edit">审核</a> |
| | | <a class="layui-btn layui-btn-xs {{d.verifyStatus!=1?'layui-btn-danger' :''}} " lay-event="edit">{{d.verifyStatus==1?'修改' :'审核'}} </a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs" data-dropdown="#CoreCmsDistributionTbDelDrop{{d.LAY_NUM}}" no-shade="true">删除</a> |
| | | <div class="dropdown-menu-nav dropdown-popconfirm dropdown-top-right layui-hide" id="CoreCmsDistributionTbDelDrop{{d.LAY_NUM}}" |
| | | style="max-width: 200px; white-space: normal; min-width: auto; margin-left: 10px;"> |
| | |
| | | </div> |
| | | |
| | | </script> |
| | | |
| | | <script src="/views/liao.js"></script> |
| | | <script> |
| | | var indexData; |
| | | var debug = layui.setter.debug; |
| | |
| | | } |
| | | } |
| | | }, |
| | | { field: 'name', title: '分销商名称', sort: false, width: 105 }, |
| | | { field: 'name', title: '经销商名称', sort: false, width: 105 }, |
| | | { |
| | | field: 'gradeId', title: '分销等级', sort: false, width: 90, templet: function (data) { |
| | | field: 'gradeId', title: '经销等级', sort: false, width: 90, templet: function (data) { |
| | | for (var i = 0; i < d.data.grades.length; i++) { |
| | | if (d.data.grades[i].id == data.gradeId) { |
| | | return d.data.grades[i].name; |
| | |
| | | } |
| | | } |
| | | }, |
| | | //{ field: 'gradeId', title: '分销等级', sort: false, width: 105 }, |
| | | //{ field: 'gradeId', title: '经销等级', sort: false, width: 105 }, |
| | | { field: 'mobile', title: '手机号', sort: false, width: 100 }, |
| | | { field: 'weixin', title: '微信号', sort: false, width: 100 }, |
| | | { field: 'qq', title: 'qq号', sort: false, width: 90 }, |
| | | { field: 'storeName', title: '店铺名称', sort: false }, |
| | | { |
| | | field: 'storeLogo', title: 'Logo', sort: false, width: 60, templet: function (d) { |
| | | if (d.storeLogo) { |
| | | return '<a href="javascript:void(0);" onclick=layui.coreHelper.viewImage("' + d.storeLogo + '")><image style="max-width:28px;max-height:28px;" src="' + d.storeLogo + '" /></a>'; |
| | | } else { |
| | | return '<a href="javascript:void(0);" onclick=layui.coreHelper.viewImage("' + setter.noImagePicUrl + '")><image style="max-width:30px;max-height:30px;" src="' + setter.noImagePicUrl + '" /></a>'; |
| | | } |
| | | // { field: 'weixin', title: '微信号', sort: false, width: 100 }, |
| | | { field: 'profession', title: '行业', sort: false, width: 100 }, |
| | | // { field: 'qq', title: 'qq号', sort: false, width: 90 }, |
| | | { field: 'sales', title: '年营业额(元)', sort: true, width: 100 }, |
| | | { field: 'storeName', title: '店铺名称', sort: false, width: 133 }, |
| | | { field: 'address', title: '地址', sort: false, width: 270 }, |
| | | |
| | | // { field: 'storeCoordinate', title: '店铺坐标', sort: false }, |
| | | // { |
| | | // field: 'storeLogo', title: 'Logo', sort: false, width: 60, templet: function (d) { |
| | | // if (d.storeLogo) { |
| | | // return '<a href="javascript:void(0);" onclick=layui.coreHelper.viewImage("' + d.storeLogo + '")><image style="max-width:28px;max-height:28px;" src="' + d.storeLogo + '" /></a>'; |
| | | // } else { |
| | | // return '<a href="javascript:void(0);" onclick=layui.coreHelper.viewImage("' + setter.noImagePicUrl + '")><image style="max-width:30px;max-height:30px;" src="' + setter.noImagePicUrl + '" /></a>'; |
| | | // } |
| | | // } |
| | | // }, |
| | | { field: 'schoolName', title: '学校名称', sort: true, width: 133 }, |
| | | |
| | | { |
| | | field: 'idCradNumber', title: '身份证', width: 120, sort: false, |
| | | templet: function (d) { |
| | | if (d.idCradNumber) { |
| | | |
| | | var listimg= d.idCradNumber.split(",") |
| | | var str=""; |
| | | listimg.forEach((value,index)=> |
| | | { |
| | | str+= '<a href="javascript:void(0);" onclick=layui.coreHelper.viewImage("' + value + '")><image style="max-width:30px;max-height:30px; margin-left: 5px;" src="' + value + '" /></a>' |
| | | |
| | | }) |
| | | |
| | | return str; |
| | | } else { |
| | | return '<a href="javascript:void(0);" onclick=layui.coreHelper.viewImage("' + setter.noImagePicUrl + '")><image style="max-width:30px;max-height:30px; margin-left: 5px;" src="' + setter.noImagePicUrl + '" /></a>'; |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | field: 'storeBanner', title: 'Banner', sort: false, width: 60, templet: function (d) { |
| | | field: 'storeBanner', title: '门头图片', sort: false, width: 100, templet: function (d) { |
| | | if (d.storeBanner) { |
| | | return '<a href="javascript:void(0);" onclick=layui.coreHelper.viewImage("' + d.storeBanner + '")><image style="max-width:28px;max-height:28px;" src="' + d.storeBanner + '" /></a>'; |
| | | } else { |
| | |
| | | } |
| | | } |
| | | }, |
| | | { field: 'distributionAchievementTotals', title: '历史推广费总和(元)', sort: false, width: 133 }, |
| | | { field: 'distributionYingLingTotals', title: '应领佣金(元)', sort: false, width: 133 }, |
| | | { field: 'distributionKeLingTotals', title: '可领佣金(元)', sort: false, width: 133 }, |
| | | { field: 'distributionYiJieSuanTotals', title: '已结算佣金(元)', sort: false, width: 133 }, |
| | | |
| | | //{ field: 'storeDesc', title: '店铺简介', sort: false, width: 105 }, |
| | | { |
| | | field: 'verifyStatus', title: '审核状态', sort: false, width: 80, templet: function (data) { |
| | |
| | | } |
| | | } |
| | | }, |
| | | |
| | | { field: 'createTime', title: '创建时间', width: 130, sort: false }, |
| | | { field: 'updateTime', title: '更新时间', width: 130, sort: false }, |
| | | { field: 'verifyTime', title: '审核时间', width: 130, sort: false }, |
| | |
| | | doEdit(obj) |
| | | } else if (obj.event === 'qrcode') { |
| | | doQrCode(obj) |
| | | } else if (obj.event === 'achievement') { |
| | | achievement(obj) |
| | | } |
| | | }); |
| | | //执行创建操作 |
| | |
| | | admin.popup({ |
| | | shadeClose: false, |
| | | title: '创建数据', |
| | | area: ['640px', '300px'], |
| | | area: ['640px', '500px'], |
| | | id: 'LAY-popup-CoreCmsDistribution-create', |
| | | success: function (layero, index) { |
| | | view(this.id).render('distribution/distributor/create', { data: e.data }).done(function () { |
| | |
| | | form.on('submit(LAY-app-CoreCmsDistribution-createForm-submit)', |
| | | function (data) { |
| | | var field = data.field; //获取提交的字段 |
| | | |
| | | field.areaCode = GetAreaCodeFormFileid( |
| | | field, |
| | | "CreatDistrbutorSelAreaCode" |
| | | ); |
| | | if (debug) { console.log(field); } //开启调试返回数据 |
| | | //提交 Ajax 成功后,关闭当前弹层并重载表格 |
| | | coreHelper.Post("Api/CoreCmsDistribution/DoCreate", field, function (e) { |
| | |
| | | admin.popup({ |
| | | shadeClose: false, |
| | | title: '编辑数据', |
| | | area: ['640px', '300px'], |
| | | area: ['640px', '350px'], |
| | | id: 'LAY-popup-CoreCmsDistribution-edit', |
| | | success: function (layero, index) { |
| | | view(this.id).render('distribution/distributor/edit', { data: e.data }).done(function () { |
| | |
| | | function doDetails(obj) { |
| | | coreHelper.Post("Api/CoreCmsDistribution/GetDetails", { id: obj.data.id }, function (e) { |
| | | if (e.code === 0) { |
| | | debugger |
| | | if(e.data.model.idCradNumber) |
| | | { |
| | | |
| | | lisimg=e.data.model.idCradNumber.split(','); |
| | | e.data.lisimg1=lisimg[0]; |
| | | |
| | | e.data.lisimg2=lisimg[1]; |
| | | } |
| | | admin.popup({ |
| | | shadeClose: false, |
| | | title: '查看详情', |
| | | area: ['700px', '600px'], |
| | | id: 'LAY-popup-CoreCmsDistribution-details', |
| | | success: function (layero, index) { |
| | | view(this.id).render('distribution/distributor/details', { data: e.data }).done(function () { |
| | | form.render(); |
| | | }); |
| | | // 禁止弹窗出现滚动条 |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | } |
| | | }); |
| | | } else { |
| | | layer.msg(e.msg); |
| | | } |
| | | }); |
| | | } |
| | | //执行预览操作 |
| | | function achievement(obj) { |
| | | coreHelper.Post("Api/CoreCmsDistribution/GetDetailsAchievement", { id: obj.data.id }, function (e) { |
| | | if (e.code === 0) { |
| | | admin.popup({ |
| | | shadeClose: false, |
| | | title: '查看详情', |
| | | area: ['700px', '550px'], |
| | | id: 'LAY-popup-CoreCmsDistribution-details', |
| | | id: 'LAY-popup-CoreCmsDistribution-detailsAchievement', |
| | | success: function (layero, index) { |
| | | view(this.id).render('distribution/distributor/details', { data: e.data }).done(function () { |
| | | view(this.id).render('distribution/distributor/achievementdetails', { data: e.data }).done(function () { |
| | | form.render(); |
| | | }); |
| | | // 禁止弹窗出现滚动条 |