123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211 |
- {include file="common/header"/}
- <style>
- .upload-wrap {
- position: relative;
- display: inline-block;
- overflow: hidden;
- border: 1px solid #2d78f4;
- border-radius: 3px;
- }
- .upload-wrap .file-ele {
- position: absolute;
- top: 0;
- right: 0;
- opacity: 0;
- height: 100%;
- width: 100%;
- cursor: pointer;
- }
- .upload-wrap .file-open {
- width: 90px;
- height: 30px;
- line-height: 30px;
- text-align: center;
- color: #fff;
- background: #3385ff;
- }
- </style>
- <div class="LM-container">
- <div class="LM-main">
- <fieldset class="layui-elem-field layui-field-title">
- <legend>求购订单列表</legend>
- <blockquote class="layui-elem-quote">
- <div class="LM-table">
- <div class="layui-inline">
- <input type="text" id='name' name="name" lay-verify="required" placeholder="搜索关键字" autocomplete="off" class="layui-input">
- </div>
- <a href="javascript:;" class="layui-btn data-add-btn layui-btn-sm" lay-submit="" lay-filter="add"
- id="search">
- {:lang('search')}
- </a>
- </div>
- </blockquote>
- </fieldset>
- <table class="layui-table" id="list" lay-filter="list">
- </table>
- </div>
- </div>
- <script type="text/html" id="barDemo">
- <!-- <input type="button" class="layui-btn layui-btn-xs" lay-event="del" value="删除">-->
- <input type="button" class="layui-btn layui-btn-xs" lay-event="jiaoyi" value="匹配交易">
- <a href="{:url('personl')}?hre=buy&id={{d.buy_user}}" class="layui-btn layui-btn-xs" >购买用户信息</a>
- <!--<a href="addhlep?id={{d.id}}" class="layui-btn layui-btn-xs" >编辑</a>-->
- </script>
- {include file="common/footer"/}
- <div class="layui-form-item lianl" style="display: none" >
- <label class="layui-form-label">后台账号</label>
- <div class="layui-input-block">
- <select name="adminid" id="adminid" lay-verify="required">
- {volist name="$data" id="vs"}
- <option value="{$vs.id}">{$vs.name}</option>
- {/volist}
- </select>
- </div>
- <div class="layui-form-mid layui-word-aux">
- </div>
- </div>
- <script src="/static/plugins/jquery-3.4.1/jquery-3.4.1.min.js"></script>
- <script>
- layui.use(['form', 'table',"layer"], function () {
- var $ = layui.jquery,
- form = layui.form,
- layer = layui.layer,
- table = layui.table;
- var tableIn = table.render({
- elem: '#list',
- url: '{:url("buy")}',
- method: 'post',
- title: '反馈意见',
- loading: true,
- toolbar: '#toolbar', //开启头部工具栏,并为其绑定左侧模板
- defaultToolbar: ['filter', 'exports', 'print', "excel", { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可
- title: '提示'
- , layEvent: 'LAYTABLE_TIPS'
- , icon: 'layui-icon-tips'
- }],
- cols: [[
- // {checkbox: true, fixed: true},
- {field: 'id', title: 'ID', width: 80, fixed: true, sort: true},
- {field: 'buy_user', title: '购买用户id', width: 120, sort: true},
- {field: 'user_name', title: '用户', width: 120, sort: true},
- {field: 'number', title: '发布数量', width: 120, sort: true},
- {field: 'enlarge_quota', title: '放大额度', width: 120, sort: true},
- {field: 'order', title: '订单编号', width: 120, sort: true},
- {field: 'add_time', title: '添加时间', width: 120, sort: true},
- {field: 'status', title: '订单状态', width: 120, sort: true},
- {title: '操作', width: 300, align: "center", toolbar: "#barDemo"},
- ]],
- limits: [10, 15, 20, 25, 50, 100],
- limit: 10,
- page: true
- });
- table.on('tool(list)', function (obj) {
- var data = obj.data;
- let event = obj.event;
- switch (event) {
- case "jiaoyi":
- layer.open({
- type: 1,
- shade: false,
- title: "请选择后台账号",
- content: $('.lianl'),
- area:["400px","200px"],
- btn:["确定","取消"],
- yes:function(index,layero){
- layer.close(index);
- let adminid=$("#adminid").val()
- let datas={
- order_id:data.id,
- user_id:adminid
- }
- loading = layer.load(1, {shade: [0.1, '#fff']});
- $.post("{:url('matching')}", datas, function (res) {
- layer.close(loading);
- if (res.code ==200) {
- layer.msg(res.msg, {time: 1000, icon: 1});
- tableIn.reload();
- } else {
- layer.msg(res.msg, {time: 1000, icon: 2});
- }
- }, "json")
- },
- cancel: function(){
- // layer.msg('捕获就是从页面已经存在的元素上,包裹layer的结构', {time: 5000, icon:6});
- }
- });
- // layer.confirm('确定要进行这样的操作码', function (index) {
- // loading = layer.load(1, {shade: [0.1, '#fff']});
- // $.post("{:url('status')}", {id: data.id}, function (res) {
- // layer.close(loading);
- // layer.close(index);
- // if (res.code == 1) {
- // layer.msg(res.msg, {time: 1000, icon: 1});
- // tableIn.reload();
- // } else {
- // layer.msg(res.msg, {time: 1000, icon: 2});
- // }
- // }, "json")
- // })
- break;
- }
- });
- form.on('switch(status)', function (data) {
- });
- $('#search').click(function () {
- // let user_ids=$("#user_ids").val()
- // let user_name=$("#user_name").val()
- // let user_phone=$("#user_phone").val()
- // let user_order=$("#user_order").val()
- // if (!user_ids||!user_name||!user_phone||!user_order){
- // return layer.msg('请输入关键词');
- // }
- let name=$("#name").val()
- if (!name){
- return layer.msg('请输入关键词');
- }
- let data={
- name:name
- // user_ids:user_ids,
- // user_name:user_name,
- // user_phone:user_phone,
- // user_order:user_order,
- }
- tableIn.reload({page: {page: 1}, where:data});
- })
- // setInterval(function () {
- // tableIn.reload();
- // }, 50000)
- });
- </script>
|