123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440 |
- {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">
- <form class="layui-form layui-form-pane" action="">
- <div class="layui-form-item">
- <!-- <div class="layui-inline">-->
- <!-- <label class="layui-form-label" style="top: -4.5px">所有场馆</label>-->
- <!-- <div class="layui-input-block">-->
- <!-- <select name="auction_id">-->
- <!-- <option value=" ">全部</option>-->
- <!-- {volist name='auction' id='vo'}-->
- <!-- <option value="{$vo.id}">{$vo.nickname}</option>-->
- <!-- {/volist}-->
- <!-- </select>-->
- <!-- </div>-->
- <!-- </div>-->
- <div class="layui-inline">
- <label class="layui-form-label" style="top: -4.5px">搜索</label>
- <div class="layui-input-inline">
- <input id="store_name" type="text" name="store_name" class="layui-input" placeholder="订单号,账号,昵称,编号">
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label" style="top: -4.5px">商品名称</label>
- <div class="layui-input-inline">
- <input type="text" id="product_name" name="product_name" class="layui-input" placeholder="商品名称">
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label" style="top: -4.5px">所有场次</label>
- <div class="layui-input-block">
- <select id="auction_id" name="auction_id">
- <option value=" ">全部</option>
- {volist name='auction' id='vo'}
- <option value="{$vo.id}">{$vo.nickname}</option>
- {/volist}
- </select>
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label" style="top: -4.5px">所有场馆</label>
- <div class="layui-input-block">
- <select id="gu_id" name="gu_id">
- <option value=" ">全部</option>
- {volist name='gu' id='vo'}
- <option value="{$vo.id}">{$vo.name}</option>
- {/volist}
- </select>
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label" style="top: -4.5px">是否挂售</label>
- <div class="layui-input-block">
- <select name="is_gs">
- <option value="">全部</option>
- <option value="2">未挂售</option>
- <option value="1">已挂售</option>
- </select>
- </div>
- </div>
- <div class="layui-inline" style="top: -5px">
- <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 class="layui-col-lg12" id="app1">
- <div class="layui-col-lg12">
- <label class="layui-form-label">创建状态:</label>
- <div class="layui-input-block" v-cloak="">
- <button class="layui-btn layui-btn-sm" type="button" v-for="item in statusList"
- @click="where.status = item.value"
- :class="{'layui-btn-primary':where.status!==item.value}">{{item.name}}
- </button>
- </div>
- </div>
- <div class="layui-col-lg12">
- <label class="layui-form-label">创建时间:</label>
- <div class="layui-input-block" data-type="data" v-cloak="">
- <button class="layui-btn layui-btn-sm" type="button" v-for="item in dataList"
- @click="setData(item)"
- :class="{'layui-btn-primary':where.data!=item.value}">{{item.name}}
- </button>
- <button class="layui-btn layui-btn-sm" type="button" ref="time"
- @click="setData({value:'zd',is_zd:true})"
- :class="{'layui-btn-primary':where.data!='zd'}">自定义
- </button>
- <button type="button" class="layui-btn layui-btn-sm layui-btn-primary"
- v-show="showtime==true" ref="date_time">{$year.0} - {$year.1}
- </button>
- </div>
- </div>
- <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>
- </form>
- </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" href="{:Url('create')}">添加商品</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}}" style="cursor: pointer">
- </script>
- <script type="text/html" id="au_name" >
- <div>{{d.gu_name}}</div>
- <div>{{d.au_name}}</div>
- </script>
- <script type="text/html" id="status">
- {{# if(d.status < 1){ }}
- <button type="button" name="status" class="layui-btn-disabled layui-btn-xs" id="">
- 过期订单
- </button>
- {{# } else if(d.status == 1) { }}
- <button type="button" name="status" class="layui-btn-xs layui-btn-disabled" id="">
- 待上传
- </button>
- {{# } else if(d.status == 2) { }}
- <button type="button" name="status" class="layui-btn layui-btn-xs layui-btn-danger" id="">
- 待审核
- </button>
- {{# } else if(d.status == 3) { }}
- <button type="button" name="status" class="layui-btn layui-btn-xs layui-btn-danger" id="">
- 完成
- </button>
- {{# } }}
- </script>
- <script type="text/html" id="upload_image">
- {{# if(d.upload_image === ''){ }}
- <button type="button" name="status" class="layui-btn-disabled layui-btn-xs" id="">
- 未上传
- </button>
- {{# } else { }}
- <img style="cursor: pointer" lay-event="open_upload_image" src="{{d.upload_image}}" style="cursor: pointer">
- {{# } }}
- </script>
- <script type="text/html" id="appeal">
- {{# if(d.appeal < 1){ }}
- <button type="button" name="status" class="layui-btn layui-btn-xs" id="">
- 未申诉
- </button>
- {{# } else { }}
- <button type="button" name="status" class="layui-btn layui-btn-xs" id=""style="background: red;">
- 申诉中
- </button>
- {{# } }}
- </script>
- <script type="text/html" id="is_gs">
- {{# if(d.status < 1){ }}
- <button type="button" name="status" class="layui-btn-disabled layui-btn-xs" id="">
- 过期订单
- </button>
- {{# } else { }}
- {{# if(d.is_gs < 1){ }}
- <button type="button" name="status" class="layui-btn-disabled layui-btn-xs" id="">
- 未挂售
- </button>
- {{# } else { }}
- <button type="button" name="status" class="layui-btn layui-btn-xs" id="">
- 已挂售
- </button>
- {{# } }}
- {{# } }}
- </script>
- <script type="text/html" id="act">
- <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-event='qd' id="">
- 通过
- </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>
- //实例化form
- layList.form.render();
- layList.tableList('List', "{:Url('list')}", function () {
- return [
- {type: 'checkbox'},
- {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
- {field: 'image', title: '图片', templet: '#image', align: 'center', width: '5%'},
- {field: 'order_id', title: '订单号', templet: '#order_id', align: 'center'},
- {field: 'au_name', title: '场次', templet: '#au_name', align: 'center'},
- {field: 'account', title: '用户账号', templet: '#account', align: 'center'},
- {field: 'nickname', title: '用户呢称', templet: '#nickname', align: 'center'},
- {field: 'us_account', title: '卖家账号', templet: '#us_account', align: 'us_account'},
- {field: 'us_nickname', title: '卖家昵称', templet: '#us_nickname', align: 'us_account'},
- {field: 'name', title: '商品', templet: '#name', align: 'center'},
- {field: 'price', title: '购买价格', templet: '#price', align: 'center', style : 'color: #DC143C;'},
- {field: 'upload_image', title: '打款凭证', templet: '#upload_image', align: 'center',width: '5%'},
- {field: 'status', title: '状态', templet: '#status', align: 'center'},
- {field: 'appeal', title: '申诉状态', templet: '#appeal', align: 'center'},
- {field: 'is_gs', title: '挂售状态', templet: '#is_gs', align: 'center'},
- {field: 'create_time', title: '购买时间', templet: '#date', align: 'center'},
- {field: 'right', title: '操作', align: 'center', toolbar: '#act'},
- ];
- });
- //点击事件绑定
- layList.tool(function (event,data,obj) {
- switch (event) {
- case 'delete':
- var url=layList.U({c:'auction.auction_order',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 'qd':
- var url=layList.U({c:'auction.auction_order',a:'qd',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 'open_image':
- $eb.openImage(data.image);
- break;
- case 'open_upload_image':
- $eb.openImage(data.upload_image);
- break;
- case 'edit':
- location.href = layList.U({a:'edit',q:{id:data.id}});
- break;
- }
- })
- //查询
- layList.search('search',function(where){
- layList.reload(where,true);
- });
- //改状态
- layList.switch('is_show',function (odj,value) {
- if(odj.elem.checked==true){
- layList.baseGet(layList.Url({c:'auction.auctionProduct',a:'set_status',p:{status:1,id:value}}),function (res) {
- layList.msg(res.msg, function () {
- layList.reload();
- });
- });
- }else{
- layList.baseGet(layList.Url({c:'auction.auctionProduct',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: [],
- dataList: [
- {name: '全部', value: ''},
- {name: '今天', value: 'today'},
- {name: '昨天', value: 'yesterday'},
- {name: '最近7天', value: 'lately7'},
- {name: '最近30天', value: 'lately30'},
- {name: '本月', value: 'month'},
- {name: '本年', value: 'year'},
- ],
- statusList:[
- {name: '全部', value: ''},
- {name: '过期', value: '0'},
- {name: '待上传', value: '1'},
- {name: '待审核', value: '2'},
- {name: '完成', value: '3'}
- ],
- where: {
- data: '',
- status: status,
- type: '',
- pay_type: '',
- 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 store_name = $('#store_name').val();
- var product_name = $('#product_name').val();
- var auction_id = $('#auction_id').val();
- var gu_id = $('#gu_id').val();
- this.where['store_name'] = store_name;
- this.where['product_name'] = product_name;
- this.where['auction_id'] = auction_id;
- this.where['gu_id'] = gu_id;
- this.where.excel = 1;
- location.href = layList.Url({c: 'auction.auction_order', 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}
|