123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310 |
- {extend name="public/container"}
- {block name="head_top"}
- {/block}
- {block name="content"}
- <style>
- .btn-outline{
- border:none;
- }
- .btn-outline:hover{
- background-color: #0e9aef;
- color: #fff;
- }
- .layui-form-item .layui-btn {
- margin-top: 5px;
- margin-right: 10px;
- }
- .layui-btn-primary{
- margin-right: 10px;
- margin-left: 0!important;
- }
- label{
- margin-bottom: 0!important;
- margin-top: 4px;
- }
- </style>
- <div class="layui-fluid">
- <div class="layui-row layui-col-space15" id="app">
- <!--搜索条件-->
- <div class="layui-col-md12">
- <div class="layui-card">
- <div class="layui-card-header">搜索条件</div>
- <div class="layui-card-body">
- <div class="layui-carousel layadmin-carousel layadmin-shortcut" lay-anim="" lay-indicator="inside" lay-arrow="none" style="background:none">
- <form class="layui-form layui-form-pane" action="">
- <div class="layui-form-item">
- <div class="layui-col-lg12">
- <label class="layui-form-label" style="top: -5.5px;">搜索用户</label>
- <div class="layui-input-inline">
- <input type="text" id="name" name="name" class="layui-input" placeholder="输入用户UID,昵称">
- </div>
- <!-- <label class="layui-form-label" style="top: -5.5px;">搜索会员卡</label>-->
- <!-- <div class="layui-input-inline">-->
- <!-- <input type="text" id="title" name="title" class="layui-input" placeholder="输入会员卡名称">-->
- <!-- </div>-->
- <!-- <label class="layui-form-label" style="top: -5.5px;">搜索订单号</label>-->
- <!-- <div class="layui-input-inline">-->
- <!-- <input type="text" id="order_id" name="order_id" class="layui-input" placeholder="输入订单号">-->
- <!-- </div>-->
- </div>
- <div class="layui-col-lg12" id="app1">
- <button @click="excel" type="button"
- class="layui-btn layui-btn-warm layui-btn-sm export" type="button">
- <i class="fa fa-floppy-o" style="margin-right: 3px;"></i>导出
- </button>
- </div>
- <div class="layui-inline">
- <div class="layui-input-inline">
- <button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit="search" lay-filter="search">
- <i class="layui-icon layui-icon-search"></i>搜索</button>
- </div>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- <!-- 中间详细信息-->
- <div :class="item.col!=undefined ? 'layui-col-sm'+item.col+' '+'layui-col-md'+item.col:'layui-col-sm6 layui-col-md3'"
- v-for="item in badge" v-cloak="" v-if="item.count > 0">
- </div>
- <!--enb-->
- </div>
- <!--列表-->
- <div class="layui-row layui-col-space15">
- <div class="layui-col-md12">
- <div class="layui-card">
- <div class="layui-card-header">查询记录</div>
- <div class="layui-card-body">
- <div class="layui-btn-container" id="container-action">
- <!-- <a class="layui-btn layui-btn-sm" onclick="$eb.createModalFrame(this.innerText,'{:Url('create')}',{h:500,w:500})">添加厚度分类</a>-->
- <!-- <button class="layui-btn layui-btn-sm" data-type="del_auction">批量删除</button>-->
- </div>
- <table class="layui-hide" id="List" lay-filter="List"></table>
- <script type="text/html" id="image">
- <img style="cursor: pointer" lay-event="open_image" src="{{d.image}}">
- </script>
- <script type="text/html" id="is_warm">
- {{# if(d.is_warm == 0){ }}
- 不需要
- {{# } else if(d.is_warm > 0) { }}
- 需要
- {{# } }}
- </script>
- <script type="text/html" id="is_channel">
- {{# if(d.is_channel == 0){ }}
- 不需要
- {{# } else if(d.is_channel > 0) { }}
- 需要
- {{# } }}
- </script>
- <script type="text/html" id="is_ladder">
- {{# if(d.is_ladder == 0){ }}
- 不需要
- {{# } else if(d.is_ladder == 1) { }}
- 需要
- {{# } }}
- </script>
- <script type="text/html" id="is_gc">
- {{# if(d.is_gc == 0){ }}
- 正常
- {{# } else if(d.is_gc == 1) { }}
- 大公差
- {{# } }}
- </script>
- <script type="text/html" id="act">
- <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" onclick="$eb.createModalFrame('详情','{:Url('details')}?id={{d.id}}',{h:1100,w:1100})">
- 详情
- </button>
- <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" lay-event='excel' >
- 导出
- </button>
- <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" onclick="$eb.createModalFrame('转为订单','{:Url('create')}?id={{d.id}}',{h:800,w:800})">
- 转为订单
- </button>
- <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-event='delete' id="">
- 删除
- </button>
- </script>
- </div>
- </div>
- </div>
- </div>
- <!--end-->
- </div>
- <script src="{__ADMIN_PATH}js/layuiList.js"></script>
- {/block}
- {block name="script"}
- <script>
- var uid = {$uid};
- layList.tableList('List', "{:Url('list')}?uid="+uid, function () {
- return [
- {type: 'checkbox'},
- {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
- {field: 'nickname', title: '用户昵称', align: 'center'},
- {field: 'long', title: '水箱长', align: 'center'},
- {field: 'wide', title: '水箱宽', align: 'center'},
- {field: 'high', title: '水箱高', align: 'center'},
- {field: 'is_warm', title: '是否保温', align: 'center',templet: '#is_warm'},
- {field: 'is_channel', title: '槽钢', align: 'center',templet: '#is_channel'},
- {field: 'is_ladder', title: '人梯', align: 'center',templet: '#is_ladder'},
- {field: 'is_gc', title: '公差', align: 'center',templet: '#is_gc', width: '8%'},
- {field: 'price', title: '总价', align: 'center', width: '8%'},
- {field: 'weight', title: '重量', align: 'center', width: '8%'},
- {field: 'create_time', title: '查询时间', align: 'center', width: '8%'},
- {field: 'right', title: '操作', align: 'center', toolbar: '#act',width: '15%'},
- ];
- });
- //查询
- layList.search('search',function(where){
- layList.reload(where,true);
- });
- //点击事件绑定
- layList.tool(function (event,data,obj) {
- switch (event) {
- case 'delete':
- var url=layList.U({c:'water.water_query',a:'delete',q:{id:data.id}});
- var code = {title:"操作提示",text:"确定将该商品移入回收站吗?",type:'info',confirm:'是的,移入回收站'};
- $eb.$swal('delete',function(){
- $eb.axios.get(url).then(function(res){
- if(res.status == 200 && res.data.code == 200) {
- $eb.$swal('success',res.data.msg);
- obj.del();
- location.reload();
- }else
- return Promise.reject(res.data.msg || '删除失败')
- }).catch(function(err){
- $eb.$swal('error',err);
- });
- },code)
- break;
- case 'excel':
- location.href = layList.U({c: 'water.water_query', a: 'excel', q: {id:data.id}});
- break;
- case 'open_image':
- $eb.openImage(data.image);
- break;
- case 'edit':
- location.href = layList.U({a:'edit',q:{id:data.id}});
- break;
- }
- })
- //改状态
- layList.switch('status',function (odj,value) {
- if(odj.elem.checked==true){
- layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:1,id:value}}),function (res) {
- layList.msg(res.msg, function () {
- layList.reload();
- });
- });
- }else{
- layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:0,id:value}}),function (res) {
- layList.msg(res.msg, function () {
- layList.reload();
- });
- });
- }
- });
- require(['vue'], function (Vue) {
- new Vue({
- el: "#app1",
- data: {
- badge: [],
- where: {
- nickname: '',
- group: '',
- excel: 0,
- },
- showtime: false,
- },
- watch: {
- 'where.status': function () {
- this.where.excel = 0;
- this.getBadge();
- layList.reload(this.where, true);
- },
- 'where.data': function () {
- this.where.excel = 0;
- this.getBadge();
- layList.reload(this.where, true);
- },
- 'where.type': function () {
- this.where.excel = 0;
- this.getBadge();
- layList.reload(this.where, true);
- },
- 'where.pay_type': function () {
- this.where.excel = 0;
- this.getBadge();
- layList.reload(this.where, true);
- }
- },
- methods: {
- setData: function (item) {
- var that = this;
- if (item.is_zd == true) {
- that.showtime = true;
- this.where.data = this.$refs.date_time.innerText;
- } else {
- this.showtime = false;
- this.where.data = item.value;
- }
- },
- getBadge: function () {
- var that = this;
- layList.basePost(layList.Url({c: 'order.store_order', a: 'getBadge'}), this.where, function (rem) {
- that.badge = rem.data;
- });
- },
- search: function () {
- this.where.excel = 0;
- this.getBadge();
- layList.reload(this.where, true);
- },
- refresh: function () {
- layList.reload();
- this.getBadge();
- },
- excel: function () {
- var name = $('#name').val();
- this.where['name'] = name;
- this.where.excel = 1;
- location.href = layList.U({c: 'water.water_query', a: 'list', q: this.where});
- this.where.excel = 0;
- }
- },
- mounted: function () {
- var that = this;
- that.getBadge();
- window.formReload = this.search;
- layList.laydate.render({
- elem: this.$refs.date_time,
- trigger: 'click',
- eventElem: this.$refs.time,
- range: true,
- change: function (value) {
- that.where.data = value;
- }
- });
- }
- })
- });
- </script>
- {/block}
|