| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598 |
- <?php /*a:6:{s:69:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\wechat\wechat_user\index.php";i:1595820902;s:61:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\container.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_head.php";i:1595820902;s:57:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\style.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\inner_page.php";i:1595820902;s:64:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_footer.php";i:1595820902;}*/ ?>
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <?php if(empty($is_layui) || (($is_layui instanceof \think\Collection || $is_layui instanceof \think\Paginator ) && $is_layui->isEmpty())): ?>
- <link href="/system/frame/css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
- <?php endif; ?>
- <link href="/static/plug/layui/css/layui.css" rel="stylesheet">
- <link href="/system/css/layui-admin.css" rel="stylesheet">
- <link href="/system/frame/css/font-awesome.min.css?v=4.3.0" rel="stylesheet">
- <link href="/system/frame/css/animate.min.css" rel="stylesheet">
- <link href="/system/frame/css/style.min.css?v=3.0.0" rel="stylesheet">
- <script src="/system/frame/js/jquery.min.js"></script>
- <script src="/system/frame/js/bootstrap.min.js"></script>
- <script src="/static/plug/layui/layui.all.js"></script>
- <script>
- $eb = parent._mpApi;
- window.controlle="<?php echo strtolower(trim(preg_replace("/[A-Z]/", "_\\0", app('request')->controller()), "_"));?>";
- window.module="<?php echo app('http')->getName();?>";
- </script>
- <title></title>
-
- <link href="/system/frame/css/plugins/iCheck/custom.css" rel="stylesheet">
- <script src="/static/plug/moment.js"></script>
- <link rel="stylesheet" href="/static/plug/daterangepicker/daterangepicker.css">
- <script src="/static/plug/daterangepicker/daterangepicker.js"></script>
- <script src="/system/frame/js/plugins/iCheck/icheck.min.js"></script>
- <link href="/system/frame/css/plugins/footable/footable.core.css" rel="stylesheet">
- <script src="/static/plug/sweetalert2/sweetalert2.all.min.js"></script>
- <script src="/system/frame/js/plugins/footable/footable.all.min.js"></script>
- <style>
- .on-tag{background-color: #eea91e;}
- .height-auto{height: 300px;}
- .tag{border: solid 1px #eee;}
- </style>
- <!--<script type="text/javascript" src="/static/plug/basket.js"></script>-->
- <script type="text/javascript" src="/static/plug/requirejs/require.js"></script>
- <?php /* <script type="text/javascript" src="/static/plug/requirejs/require-basket-load.js"></script> */ ?>
- <script>
- var hostname = location.hostname;
- if(location.port) hostname += ':' + location.port;
- requirejs.config({
- map: {
- '*': {
- 'css': '/static/plug/requirejs/require-css.js'
- }
- },
- shim:{
- 'iview':{
- deps:['css!iviewcss']
- },
- 'layer':{
- deps:['css!layercss']
- }
- },
- baseUrl:'//'+hostname+'/',
- paths: {
- 'static':'static',
- 'system':'system',
- 'vue':'static/plug/vue/dist/vue.min',
- 'axios':'static/plug/axios.min',
- 'iview':'static/plug/iview/dist/iview.min',
- 'iviewcss':'static/plug/iview/dist/styles/iview',
- 'lodash':'static/plug/lodash',
- 'layer':'static/plug/layer/layer',
- 'layercss':'static/plug/layer/theme/default/layer',
- 'jquery':'static/plug/jquery/jquery.min',
- 'moment':'static/plug/moment',
- 'sweetalert':'static/plug/sweetalert2/sweetalert2.all.min',
- 'formCreate':'/static/plug/form-create/form-create.min',
- },
- basket: {
- excludes:['system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
- // excludes:['system/util/mpFormBuilder','system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
- }
- });
- </script>
- <script type="text/javascript" src="/system/util/mpFrame.js"></script>
-
- </head>
- <body class="gray-bg">
- <div class="wrapper wrapper-content">
- <div class="row">
- <div class="col-sm-12">
- <div class="ibox">
- <!--<div class="ibox-title">
- <button type="button" class="btn btn-w-m btn-primary grant">发放优惠券</button>
- <button type="button" class="btn btn-w-m btn-primary" onclick="$eb.createModalFrame(this.innerText,'<?php echo Url('store.storeCoupon/grant_subscribe'); ?>',{'w':800})">给关注的用户发放优惠券</button>
- <button type="button" class="btn btn-w-m btn-primary" onclick="$eb.createModalFrame(this.innerText,'<?php echo Url('store.storeCoupon/grant_all'); ?>',{'w':800})">给所有用户发放优惠券</button>
- <button type="button" class="btn btn-w-m btn-primary" onclick="$eb.createModalFrame(this.innerText,'<?php echo Url('store.storeCoupon/grant_group'); ?>',{'w':800})">给分组用户发放优惠券</button>
- <button type="button" class="btn btn-w-m btn-primary" onclick="$eb.createModalFrame(this.innerText,'<?php echo Url('store.storeCoupon/grant_tag'); ?>',{'w':800})">给标签用户发放优惠券</button>
- </div>-->
- <div class="ibox-content">
- <div class="row">
- <div class="m-b m-l">
- <form action="" class="form-inline" id="form" method="get">
- <div class="search-item" data-name="data">
- <span>选择时间:</span>
- <button type="button" class="btn btn-outline btn-link" data-value="">全部</button>
- <button type="button" class="btn btn-outline btn-link" data-value="<?php echo htmlentities($limitTimeList['today']); ?>">今天</button>
- <button type="button" class="btn btn-outline btn-link" data-value="<?php echo htmlentities($limitTimeList['week']); ?>">本周</button>
- <button type="button" class="btn btn-outline btn-link" data-value="<?php echo htmlentities($limitTimeList['month']); ?>">本月</button>
- <button type="button" class="btn btn-outline btn-link" data-value="<?php echo htmlentities($limitTimeList['quarter']); ?>">本季度</button>
- <button type="button" class="btn btn-outline btn-link" data-value="<?php echo htmlentities($limitTimeList['year']); ?>">本年</button>
- <div class="datepicker" style="display: inline-block;">
- <button type="button" class="btn btn-outline btn-link" data-value="<?php echo !empty($where['data']) ? htmlentities($where['data']) : 'no'; ?>">自定义时间</button>
- </div>
- <input class="search-item-value" type="hidden" name="data" value="<?php echo htmlentities($where['data']); ?>" />
- <input class="search-item-value" type="hidden" name="groupid" value="<?php echo htmlentities($where['groupid']); ?>" />
- <input class="search-item-value" type="hidden" name="tagid_list" value="<?php echo htmlentities($where['tagid_list']); ?>" />
- <input class="search-item-value" type="hidden" name="sex" value="<?php echo htmlentities($where['sex']); ?>" />
- <input class="search-item-value" type="hidden" name="subscribe" value="<?php echo htmlentities($where['subscribe']); ?>" />
- <input class="search-item-value" type="hidden" name="stair" value="" />
- <input class="search-item-value" type="hidden" name="second" value="" />
- <input class="search-item-value" type="hidden" name="order_stair" value="" />
- <input class="search-item-value" type="hidden" name="order_second" value="" />
- <input class="search-item-value" type="hidden" name="now_money" value="" />
- <input class="search-item-value" type="hidden" id="batch" name="batch" value="" />
- </div>
- <hr>
- <div class="tag-item" data-name="tagid_list">
- <span>用户标签:</span>
- <?php if(is_array($tagList) || $tagList instanceof \think\Collection || $tagList instanceof \think\Paginator): $i = 0; $__LIST__ = $tagList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
- <button type="button" class="btn btn-outline btn-link tag" data-value="<?php echo htmlentities($vo['id']); ?>"><?php echo htmlentities($vo['name']); ?></button>
- <?php endforeach; endif; else: echo "" ;endif; ?>
- <input class="tag-item-value" type="hidden" name="tagid_list" value="<?php echo htmlentities($where['tagid_list']); ?>" />
- </div>
- <hr>
- <div class="btn-group">
- <button data-toggle="dropdown" class="btn btn-white btn-xs dropdown-toggle" style="padding: 5px 15px;"
- aria-expanded="false">批量操作
- <span class="caret"></span>
- </button>
- <ul class="dropdown-menu left">
- <li>
- <a class="save_mark grant" href="javascript:void(0);" >
- <i class="fa fa-space-shuttle"></i> 发放优惠券
- </a>
- </li>
- <li>
- <a class="save_mark news" href="javascript:void(0);" >
- <i class="fa fa-space-shuttle"></i> 发送消息
- </a>
- </li>
- </ul>
- </div>
- <div class="input-group" style="float: right">
- <input type="text" name="nickname" value="<?php echo htmlentities($where['nickname']); ?>" placeholder="请输入会员名称" class="input-sm form-control">
- <input type="hidden" name="export" value="<?php echo htmlentities($where['export']); ?>" />
- <span class="input-group-btn">
- <button type="submit" class="btn btn-sm btn-primary"> <i class="fa fa-search"></i>搜索</button>
- <button style="margin: 0 16px" type="submit" id="export" class="btn btn-sm btn-info btn-outline"> <i class="fa fa-exchange" ></i> Excel导出</button>
- <script>
- $('#export').on('click',function(){
- $('input[name=export]').val(1);
- });
- $('#no_export').on('click',function(){
- $('input[name=export]').val(0);
- });
- </script>
- </span>
- </div>
- </form>
- </div>
- </div>
- <div class="table-responsive">
- <table class="table table-striped table-bordered" data-page-size="20">
- <thead>
- <tr>
- <th class="text-cente">
- <div class="btn-group">
- <button data-toggle="dropdown" class="btn btn-white btn-xs dropdown-toggle" style="font-weight: bold;background-color: #f5f5f6;border: solid 0;"
- aria-expanded="false">
- 选择
- <span class="caret"></span>
- </button>
- <ul class="dropdown-menu left">
- <li class="this-page">
- <a class="save_mark" href="javascript:void(0);" >
- <i class="fa fa-check-square-o"></i>本页用户
- </a>
- </li>
- <li class="this-all">
- <a class="save_mark" href="javascript:void(0);">
- <i class="fa fa-check-square"></i>全部用户
- </a>
- </li>
- <li class="this-up">
- <a class="save_mark" href="javascript:void(0);">
- <i class="fa fa-square-o"></i>取消选择
- </a>
- </li>
- </ul>
- </div>
- </th>
- <th class="text-center">编号</th>
- <th class="text-center">微信用户名称</th>
- <th class="text-center">头像</th>
- <th class="text-center">
- <div class="btn-group">
- <button data-toggle="dropdown" class="btn btn-white btn-xs dropdown-toggle" style="font-weight: bold;background-color: #f5f5f6;border: solid 0;"
- aria-expanded="false">性别
- <span class="caret"></span>
- </button>
- <ul class="dropdown-menu search-item" data-name="sex">
- <li data-value="">
- <a class="save_mark" href="javascript:void(0);" >
- <i class="fa fa-venus-mars"></i>全部
- </a>
- </li>
- <li data-value="1">
- <a class="save_mark" href="javascript:void(0);" >
- <i class="fa fa-mars"></i>男
- </a>
- </li>
- <li data-value="2">
- <a class="save_mark" href="javascript:void(0);">
- <i class="fa fa-venus"></i>女
- </a>
- </li>
- <li data-value="0">
- <a class="save_mark" href="javascript:void(0);">
- <i class="fa fa-transgender"></i>保密
- </a>
- </li>
- </ul>
- </div>
- </th>
- <th class="text-center no-sort">地区</th>
- <th class="text-center">
- <div class="btn-group">
- <button data-toggle="dropdown" class="btn btn-white btn-xs dropdown-toggle" style="font-weight: bold;background-color: #f5f5f6;border: solid 0;"
- aria-expanded="false">是否关注公众号
- <span class="caret"></span>
- </button>
- <ul class="dropdown-menu search-item" data-name="subscribe">
- <li data-value="">
- <a class="save_mark" href="javascript:void(0);" >
- 全部
- </a>
- </li>
- <li data-value="1">
- <a class="save_mark" href="javascript:void(0);" >
- 关注
- </a>
- </li>
- <li data-value="0">
- <a class="save_mark" href="javascript:void(0);">
- 未关注
- </a>
- </li>
- </ul>
- </div>
- </th>
- <th class="text-center">
- <div class="btn-group">
- <button data-toggle="dropdown" class="btn btn-white btn-xs dropdown-toggle" style="font-weight: bold;padding: 6px 50px;background-color: #f5f5f6;border: solid 0;"
- aria-expanded="false">用户分组
- <span class="caret"></span>
- </button>
- <ul class="dropdown-menu search-item" data-name="groupid">
- <li data-value="-1">
- <a class="save_mark" href="javascript:void(0);" >
- 全部
- </a>
- </li>
- <?php if(is_array($groupList) || $groupList instanceof \think\Collection || $groupList instanceof \think\Paginator): $i = 0; $__LIST__ = $groupList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
- <li data-value="<?php echo htmlentities($vo['id']); ?>">
- <a class="save_mark" href="javascript:void(0);" >
- <?php echo htmlentities($vo['name']); ?>
- </a>
- </li>
- <?php endforeach; endif; else: echo "" ;endif; ?>
- </ul>
- </div>
- </th>
- <th class="text-center">用户标签</th>
- <!-- <th class="text-center">首次关注时间</th>-->
- <th class="text-center">操作</th>
- </tr>
- </thead>
- <tbody>
- <?php $count = count($list); if($count): if(is_array($list) || $list instanceof \think\Collection || $list instanceof \think\Paginator): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
- <tr>
- <td class="text-center">
- <label class="checkbox-inline i-checks">
- <input type="checkbox" name="coupon[]" value="<?php echo htmlentities($vo['uid']); ?>">
- </label>
- </td>
- <td class="text-center">
- <?php echo htmlentities($vo['uid']); ?>
- </td>
- <td class="text-center">
- <?php echo htmlentities($vo['nickname']); ?>
- </td>
- <td class="text-center">
- <img src="<?php echo htmlentities($vo['headimgurl']); ?>" alt="<?php echo htmlentities($vo['nickname']); ?>" title="<?php echo htmlentities($vo['nickname']); ?>" style="width:50px;height: 50px;cursor: pointer;" class="head_image" data-image="<?php echo htmlentities($vo['headimgurl']); ?>">
- </td>
- <td class="text-center">
- <?php if($vo['sex'] == 1): ?>
- 男
- <?php elseif($vo['sex'] == 2): ?>
- 女
- <?php else: ?>
- 保密
- <?php endif; ?>
- </td>
- <td class="text-center">
- <?php echo htmlentities($vo['country']); ?><?php echo htmlentities($vo['province']); ?><?php echo htmlentities($vo['city']); ?>
- </td>
- <td class="text-center">
- <?php if($vo['subscribe']): ?>
- 关注
- <?php else: ?>
- 未关注
- <?php endif; ?>
- </td>
- <td class="text-center">
- <?php if(!is_array($groupList)){ ?>
- 无
- <?php }else{ if(!$groupList || $vo['groupid'] == 0 || !isset($groupList[$vo['groupid']])){ ?>
- 无
- <?php }else{ ?>
- <span class="badge badge-primary"><?php echo htmlentities($groupList[$vo['groupid']]['name']); ?></span>
- <?php } }?>
- </td>
- <td class="text-center">
- <?php if(!is_array($tagList)){ ?>
- 无
- <?php }else{ $tagId = explode(',',$vo['tagid_list']);
- if(!$tagList || $vo['tagid_list'] == ''|| !$tagId){ ?>
- 无
- <?php }else{ foreach($tagId as $tag){ if(isset($tagList[$tag])){?>
- <span class="badge badge-info"><?php echo htmlentities($tagList[$tag]['name']); ?></span>
- <?php }} } }?>
- </td>
- <!-- <td class="text-center">-->
- <!-- <?php echo htmlentities(date("Y-m-d H:i:s",!is_numeric($vo['add_time'])? strtotime($vo['add_time']) : $vo['add_time'])); ?>-->
- <!-- </td>-->
- <td class="text-center">
- <div class="btn-group">
- <button data-toggle="dropdown" class="btn btn-warning btn-xs dropdown-toggle"
- aria-expanded="false">操作
- <span class="caret"></span>
- </button>
- <ul class="dropdown-menu">
- <?php if($vo['openid'] && $vo['subscribe'] == 1): ?>
- <li>
- <a class="save_mark" href="javascript:void(0);" onclick="$eb.createModalFrame('修改分组','<?php echo Url('edit_user_group',['openid'=>$vo['openid']]); ?>',{w:350,h:500})" >
- 修改分组
- </a>
- </li>
- <li>
- <a class="save_mark" href="javascript:void(0);" onclick="$eb.createModalFrame('修改标签','<?php echo Url('edit_user_tag',['openid'=>$vo['openid']]); ?>',{w:350,h:500})" >
- 修改标签
- </a>
- </li>
- <li>
- <a class="save_mark synchro" href="javascript:void(0);" data-url="<?php echo Url('synchro_tag',['openid'=>$vo['openid']]); ?>" >
- 同步标签
- </a>
- </li>
- <?php else: ?>
- <li>
- <a class="save_mark" href="javascript:void(0);">
- 无法操作
- </a>
- </li>
- <?php endif; ?>
- </ul>
- </div>
- </td>
- </tr>
- <?php endforeach; endif; else: echo "" ;endif; else: ?>
- <tr id="content" style="display:none;height:400px;"></tr>
- <?php endif; ?>
- </tbody>
- </table>
- </div>
- <link href="/system/frame/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
- <div class="row">
- <div class="col-sm-6">
- <div class="dataTables_info" id="DataTables_Table_0_info" role="alert" aria-live="polite" aria-relevant="all">共 <?php echo htmlentities($total); ?> 项</div>
- </div>
- <div class="col-sm-6">
- <div class="dataTables_paginate paging_simple_numbers" id="editable_paginate">
- <?php echo $page;?>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script>
- window.$list = <?php echo json_encode($list);?>;
- window.$uidAll = <?php echo json_encode($uidAll);?>;
- window.$where = <?php echo json_encode($where);?>;
- $('.this-page').on('click',function () {
- $('input[name="coupon[]"]').each(function(){
- $(this).checked = true;
- $(this).parent().addClass('checked');
- $('#batch').val(1);
- });
- })
- $('.this-all').on('click',function () {
- $('input[name="coupon[]"]').each(function(){
- $(this).checked = true;
- $(this).parent().addClass('checked');
- $('#batch').val(2);
- });
- })
- $('.this-up').on('click',function () {
- $('input[name="coupon[]"]').each(function(){
- $(this).checked = false;
- $(this).parent().removeClass('checked');
- $('#batch').val('');
- });
- })
- $(function init() {
- $('.search-item>.btn').on('click', function () {
- var that = $(this), value = that.data('value'), p = that.parent(), name = p.data('name'), form = p.parents();
- form.find('input[name="' + name + '"]').val(value);
- $('input[name=export]').val(0);
- form.submit();
- });
- $('.tag-item>.btn').on('click', function () {
- var that = $(this), value = that.data('value'), p = that.parent(), name = p.data('name'), form = p.parents(),list = $('input[name="' + name + '"]').val().split(',');
- var bool = 0;
- $.each(list,function (index,item) {
- if(item == value){
- bool = 1
- list.splice(index,1);
- }
- })
- if(!bool) list.push(''+value+'');
- form.find('input[name="' + name + '"]').val(list.join(','));
- $('input[name=export]').val(0);
- form.submit();
- });
- $('.search-item>li').on('click', function () {
- var that = $(this), value = that.data('value'), p = that.parent(), name = p.data('name'), form = $('#form');
- form.find('input[name="' + name + '"]').val(value);
- $('input[name=export]').val(0);
- form.submit();
- });
- $('.search-item>li').each(function () {
- var that = $(this), value = that.data('value'), p = that.parent(), name = p.data('name');
- if($where[name]) $('.'+name).css('color','#1ab394');
- });
- $('.search-item-value').each(function () {
- var that = $(this), name = that.attr('name'), value = that.val(), dom = $('.search-item[data-name="' + name + '"] .btn[data-value="' + value + '"]');
- dom.eq(0).removeClass('btn-outline btn-link').addClass('btn-primary btn-sm')
- .siblings().addClass('btn-outline btn-link').removeClass('btn-primary btn-sm')
- });
- $('.tag-item-value').each(function () {
- var that = $(this), name = that.attr('name'), value = that.val().split(',');
- dom = [];
- $.each(value,function (index,item) {
- dom.push($('.tag-item[data-name="' + name + '"] .btn[data-value="' + item + '"]'));
- })
- $.each(dom,function (index,item) {
- item.eq(0).removeClass('btn-outline btn-link tag').addClass('btn-primary btn-sm')
- })
- });
- })
- $('.i-checks').iCheck({
- checkboxClass: 'icheckbox_square-green',
- });
- $('.head_image').on('click',function (e) {
- var image = $(this).data('image');
- $eb.openImage(image);
- })
- var dateInput =$('.datepicker');
- dateInput.daterangepicker({
- autoUpdateInput: false,
- "opens": "center",
- "drops": "down",
- "ranges": {
- '今天': [moment(), moment().add(1, 'days')],
- '昨天': [moment().subtract(1, 'days'), moment()],
- '上周': [moment().subtract(6, 'days'), moment()],
- '前30天': [moment().subtract(29, 'days'), moment()],
- '本月': [moment().startOf('month'), moment().endOf('month')],
- '上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
- },
- "locale" : {
- applyLabel : '确定',
- cancelLabel : '清空',
- fromLabel : '起始时间',
- toLabel : '结束时间',
- format : 'YYYY/MM/DD',
- customRangeLabel : '自定义',
- daysOfWeek : [ '日', '一', '二', '三', '四', '五', '六' ],
- monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月',
- '七月', '八月', '九月', '十月', '十一月', '十二月' ],
- firstDay : 1
- }
- });
- dateInput.on('cancel.daterangepicker', function(ev, picker) {
- $("#data").val('');
- });
- dateInput.on('apply.daterangepicker', function(ev, picker) {
- $("input[name=data]").val(picker.startDate.format('YYYY/MM/DD') + ' - ' + picker.endDate.format('YYYY/MM/DD'));
- $('input[name=export]').val(0);
- $('#form').submit();
- });
- //发优惠券
- $('.grant').on('click',function (e) {
- var chk_value =[];
- var batch = $('#batch').val();
- if(batch == 1){
- $.each($list.data,function (index,item) {
- chk_value.push(item.uid);
- })
- }else if(batch == 2){
- chk_value = $uidAll;
- }else{
- $('input[name="coupon[]"]:checked').each(function(){
- chk_value.push($(this).val());
- str += $(this).val();
- });
- if(chk_value.length < 1){
- $eb.message('请选择要发放优惠券的用户');
- return false;
- }
- }
- var str = chk_value.join(',');
- // var url = "http://"+window.location.host+"/admin/ump.store_coupon/grant/id/"+str;
- var url = "<?php echo Url('ump.store_coupon/grant'); ?>?id="+str;
- $eb.createModalFrame(this.innerText,url,{'w':800});
- })
- $('.news').on('click',function (e) {
- var chk_value =[];
- var batch = $('#batch').val();
- if(batch == 1){
- $.each($list.data,function (index,item) {
- chk_value.push(item.uid);
- })
- }else if(batch == 2){
- chk_value = $uidAll;
- }else{
- $('input[name="coupon[]"]:checked').each(function(){
- chk_value.push($(this).val());
- str += $(this).val();
- });
- if(chk_value.length < 1){
- $eb.message('请选择要发消息的用户');
- return false;
- }
- }
- var str = chk_value.join(',');
- var url = "<?php echo Url('wechat.wechat_news_category/send_news'); ?>?id="+str;
- $eb.createModalFrame(this.innerText,url,{'w':800});
- })
- $('.synchro').on('click',function(){
- window.t = $(this);
- var _this = $(this),url =_this.data('url');
- $eb.$swal('delete',function(){
- $eb.axios.get(url).then(function(res){
- console.log(res);
- if(res.status == 200 && res.data.code == 200) {
- $eb.$swal('success',res.data.msg);
- }else
- return Promise.reject(res.data.msg || '同步失败')
- }).catch(function(err){
- $eb.$swal('error',err);
- });
- },{'title':'您确定要同步该用户的标签吗?','text':'请谨慎操作!','confirm':'是的,我要同步'})
- });
- </script>
- </div>
- </body>
- </html>
|