123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862 |
- {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">
- <div class="layui-card-body">
- <div class="layui-row layui-col-space10 layui-form-item">
- <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"
- :class="{'layui-btn-primary':where.status!==item.value}"
- @click="where.status = item.value" type="button"
- v-for="item in orderStatus">{{item.name}}
- <span v-if="item.count!=undefined"
- :class="item.class!=undefined ? 'layui-badge': 'layui-badge layui-bg-gray' ">{{item.count}}</span>
- </button>
- </div>
- </div>
- <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"
- :class="{'layui-btn-primary':where.type!=item.value}"
- @click="where.type = item.value" type="button"
- v-for="item in orderType">{{item.name}}
- <span v-if="item.count!=undefined" class="layui-badge layui-bg-gray">{{item.count}}</span>
- </button>
- </div>
- </div>
- <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"
- :class="{'layui-btn-primary':where.pay_type!=item.value}"
- @click="where.pay_type = item.value" type="button"
- v-for="item in payType">{{item.name}}
- <span v-if="item.count!=undefined" class="layui-badge layui-bg-gray">{{item.count}}</span>
- </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>
- <div class="layui-col-lg12">
- <label class="layui-form-label">订单号:</label>
- <div class="layui-input-block">
- <input type="text" name="real_name" style="width: 50%" v-model="where.real_name"
- placeholder="请输入姓名、电话、订单编号" class="layui-input">
- </div>
- </div>
- <div class="layui-col-lg12">
- <div class="layui-input-block">
- <button @click="search" type="button"
- class="layui-btn layui-btn-sm layui-btn-normal">
- <i class="layui-icon layui-icon-search"></i>搜索
- </button>
- <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>
- <button @click="refresh" type="reset"
- class="layui-btn layui-btn-primary layui-btn-sm">
- <i class="layui-icon layui-icon-refresh"></i>刷新
- </button>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!--end-->
- <!-- 中间详细信息-->
- <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 class="layui-card">
- <div class="layui-card-header">
- {{item.name}}
- <span class="layui-badge layuiadmin-badge" :class="item.background_color">{{item.field}}</span>
- </div>
- <div class="layui-card-body">
- <p class="layuiadmin-big-font">{{item.count}}</p>
- <p v-show="item.content!=undefined">
- {{item.content}}
- <span class="layuiadmin-span-color">{{item.sum}}<i :class="item.class"></i></span>
- </p>
- </div>
- </div>
- </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">
- <button class="layui-btn layui-btn-sm" data-type="del_order">批量删除订单</button>
- <button class="layui-btn layui-btn-sm layui-btn-warm" data-type="write_order">订单核销</button>
- </div>
- <table class="layui-hide" id="List" lay-filter="List"></table>
- <!--订单-->
- <script type="text/html" id="order_id">
- {{d.order_id}}<br/>
- <span style="color: {{d.color}};">{{d.pink_name}}</span><br/>
- {{# if(d.is_del == 1){ }}<span style="color: {{d.color}};">用户已删除</span>{{# } }}
- </script>
- <!--用户信息-->
- <script type="text/html" id="userinfo">
- {{d.nickname==null ? '暂无信息':d.nickname}}/{{d.uid}}
- </script>
- <!--分销员信息-->
- <script type="text/html" id="spread_uid">
- {{# if(d.spread_uid != 0){ }}
- <button class="btn-xs btn-outline" type="button"
- onclick="$eb.createModalFrame('推荐人信息','{:Url('order_spread_user')}?uid={{d.spread_uid}}',{w:600,h:400})">
- {{d.spread_nickname}}
- </button>
- {{# }else{ }}无{{# } }}
- </script>
- <!--支付状态-->
- <script type="text/html" id="paid">
- {{# if(d.pay_type==1){ }}
- <p>{{d.pay_type_name}}</p>
- {{# }else{ }}
- {{# if(d.pay_type_info!=undefined){ }}
- <p><span>线下支付</span></p>
- {{# }else{ }}
- <p>{{d.pay_type_name}}</p>
- {{# } }}
- {{# }; }}
- </script>
- <!--订单状态-->
- <script type="text/html" id="status">
- {{d.status_name}}
- </script>
- <!--商品信息-->
- <script type="text/html" id="info">
- {{# layui.each(d._info, function(index, item){ }}
- {{# if(item.cart_info.productInfo.attrInfo!=undefined){ }}
- <div>
- <span>
- <img style="width: 30px;height: 30px;margin:0;cursor: pointer;"
- src="{{item.cart_info.productInfo.attrInfo.image}}">
- </span>
- <span>{{item.cart_info.productInfo.store_name}} {{item.cart_info.productInfo.attrInfo.suk}}</span>
- <span> | ¥{{item.cart_info.truePrice}}×{{item.cart_info.cart_num}}</span>
- </div>
- {{# }else{ }}
- <div>
- <span><img style="width: 30px;height: 30px;margin:0;cursor: pointer;"
- src="{{item.cart_info.productInfo.image}}"></span>
- <span>{{item.cart_info.productInfo.store_name}}</span><span> | ¥{{item.cart_info.truePrice}}×{{item.cart_info.cart_num}}</span>
- </div>
- {{# } }}
- {{# }); }}
- </script>
- <script type="text/html" id="act">
- {{# if(d._status==0){ }}
- <button class="layui-btn layui-btn-xs" type="button" lay-event="verify">
- <i class="fa fa-calendar"></i> 立即核销
- </button>
- <button type="button" class="layui-btn layui-btn-xs" onclick="dropdown(this)">操作 <span
- class="caret"></span></button>
- <ul class="layui-nav-child layui-anim layui-anim-upbit">
- <li>
- <a href="javascript:void(0);" lay-event='order_info'>
- <i class="fa fa-file-text"></i> 订单详情
- </a>
- </li>
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('修改订单','{:Url('edit')}?id={{d.id}}')">
- <i class="fa fa-edit"></i> 修改订单
- </a>
- </li>
- {{# if(d.refund_status ==1){ }}
- {{# if(parseFloat(d.pay_price) > parseFloat(d.refund_price)){ }}
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('退款','{:Url('refund_y')}?id={{d.id}}',{w:400,h:300})">
- <i class="fa fa-history"></i>立即退款
- </a>
- </li>
- {{# } ;}}
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('不退款','{:Url('refund_n')}?id={{d.id}}',{w:400,h:300})">
- <i class="fa fa-openid"></i> 不退款
- </a>
- </li>
- {{# } ;}}
- <li>
- <a lay-event='marke' href="javascript:void(0);">
- <i class="fa fa-edit"></i> 订单备注
- </a>
- </li>
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('订单记录','{:Url('order_status')}?oid={{d.id}}')">
- <i class="fa fa-newspaper-o"></i> 订单记录
- </a>
- </li>
- </ul>
- {{# }else if(d._status==1){ }}
- {{# if(d.paid == 0 && d.pay_type == 'offline'){ }}
- <button class="btn btn-danger btn-xs" type="button" lay-event="order_paid">
- <i class="fa fa-calendar"></i> 立即支付
- </button>
- {{# } ;}}
- <button type="button" class="layui-btn layui-btn-xs" onclick="dropdown(this)">操作 <span
- class="caret"></span></button>
- <ul class="layui-nav-child layui-anim layui-anim-upbit">
- <li>
- <a href="javascript:void(0);" lay-event='order_info'>
- <i class="fa fa-file-text"></i> 订单详情
- </a>
- </li>
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('修改订单','{:Url('edit')}?id={{d.id}}')">
- <i class="fa fa-edit"></i> 修改订单
- </a>
- </li>
- <li>
- <a lay-event='marke' href="javascript:void(0);">
- <i class="fa fa-edit"></i> 订单备注
- </a>
- </li>
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('订单记录','{:Url('order_status')}?oid={{d.id}}')">
- <i class="fa fa-newspaper-o"></i> 订单记录
- </a>
- </li>
- </ul>
- {{# }else if(d._status==2){ }}
- {{# if(d.shipping_type==1){ }}
- <button class="btn btn-primary btn-xs" type="button"
- onclick="$eb.createModalFrame('发送货','{:Url('order_goods')}?id={{d.id}}',{w:400,h:250})">
- <i class="fa fa-cart-plus"></i> 发送货
- </button>
- {{# } }}
- <button type="button" class="layui-btn layui-btn-xs" onclick="dropdown(this)">操作 <span
- class="caret"></span></button>
- <ul class="layui-nav-child layui-anim layui-anim-upbit">
- <li>
- <a href="javascript:void(0);" lay-event='order_print'>
- <i class="fa fa-file-text"></i> 打印订单
- </a>
- </li>
- <li>
- <a href="javascript:void(0);" lay-event='order_info'>
- <i class="fa fa-file-text"></i> 订单详情
- </a>
- </li>
- <li>
- <a lay-event='marke' href="javascript:void(0);">
- <i class="fa fa-paste"></i> 订单备注
- </a>
- </li>
- {{# if(d.exchange_id>0){ }}
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('退代币','{:Url('money_back')}?id={{d.id}}')">
- <i class="fa fa-history"></i> 退代币
- </a>
- </li>
- {{# } ;}}
- {{# if(parseFloat(d.pay_price) > parseFloat(d.refund_price)){ }}
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('退款','{:Url('refund_y')}?id={{d.id}}',{w:400,h:300})">
- <i class="fa fa-history"></i> 立即退款
- </a>
- </li>
- {{# }else if(d.use_integral > 0 && d.use_integral >= d.back_integral){ }}
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('退积分','{:Url('integral_back')}?id={{d.id}}')">
- <i class="fa fa-history"></i> 退积分
- </a>
- </li>
- {{# } ;}}
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('订单记录','{:Url('order_status')}?oid={{d.id}}')">
- <i class="fa fa-newspaper-o"></i> 订单记录
- </a>
- </li>
- </ul>
- {{# }else if(d._status==3){ }}
- <button type="button" class="layui-btn layui-btn-xs" onclick="dropdown(this)">操作 <span
- class="caret"></span></button>
- <ul class="layui-nav-child layui-anim layui-anim-upbit">
- <li>
- <a href="javascript:void(0);" lay-event='order_print'>
- <i class="fa fa-file-text"></i> 打印订单
- </a>
- </li>
- <li>
- <a href="javascript:void(0);" lay-event='order_info'>
- <i class="fa fa-file-text"></i> 订单详情
- </a>
- </li>
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('去送货','{:Url('delivery')}?id={{d.id}}',{w:400,h:300})">
- <i class="fa fa-motorcycle"></i> 去送货
- </a>
- </li>
- {{# if(d.exchange_id>0){ }}
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('退代币','{:Url('money_back')}?id={{d.id}}')">
- <i class="fa fa-history"></i> 退代币
- </a>
- </li>
- {{# } ;}}
- {{# if(parseFloat(d.use_integral) > 0 && parseFloat(d.use_integral) >
- parseFloat(d.back_integral)){ }}
- <li>
- <a lay-event='marke' href="javascript:void(0);">
- <i class="fa fa-paste"></i> 订单备注
- </a>
- </li>
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('退积分','{:Url('integral_back')}?id={{d.id}}',{w:400,h:300})">
- <i class="fa fa-history"></i> 退积分
- </a>
- </li>
- {{# };}}
- {{# if(parseFloat(d.pay_price) > parseFloat(d.refund_price)){ }}
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('退款','{:Url('refund_y')}?id={{d.id}}',{w:400,h:300})">
- <i class="fa fa-history"></i>立即退款
- </a>
- </li>
- {{# } ;}}
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('不退款','{:Url('refund_n')}?id={{d.id}}',{w:400,h:300})">
- <i class="fa fa-openid"></i> 不退款
- </a>
- </li>
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('订单记录','{:Url('order_status')}?oid={{d.id}}')">
- <i class="fa fa-newspaper-o"></i> 订单记录
- </a>
- </li>
- </ul>
- {{# }else if(d._status==4){ }}
- <button class="btn btn-default btn-xs" type="button"
- onclick="$eb.createModalFrame('配送信息','{:Url('distribution')}?id={{d.id}}')">
- <i class="fa fa-cart-arrow-down"></i> 配送信息
- </button>
- <button type="button" class="layui-btn layui-btn-xs" onclick="dropdown(this)">操作 <span
- class="caret"></span></button>
- <ul class="layui-nav-child layui-anim layui-anim-upbit">
- <li>
- <a href="javascript:void(0);" lay-event='order_print'>
- <i class="fa fa-file-text"></i> 打印订单
- </a>
- </li>
- <li>
- <a href="javascript:void(0);" lay-event='order_info'>
- <i class="fa fa-file-text"></i> 订单详情
- </a>
- </li>
- <li>
- <a lay-event='marke' href="javascript:void(0);">
- <i class="fa fa-paste"></i> 订单备注
- </a>
- </li>
- <li>
- <a lay-event='danger' href="javascript:void(0);">
- <i class="fa fa-cart-arrow-down"></i> 已收货
- </a>
- </li>
- {{# if(d.exchange_id>0){ }}
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('退代币','{:Url('money_back')}?id={{d.id}}')">
- <i class="fa fa-history"></i> 退代币
- </a>
- </li>
- {{# } ;}}
- {{# if(parseFloat(d.pay_price) > parseFloat(d.refund_price)){ }}
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('退款','{:Url('refund_y')}?id={{d.id}}')">
- <i class="fa fa-history"></i> 立即退款
- </a>
- </li>
- {{# }else if(parseFloat(d.use_integral) > 0 && parseFloat(d.use_integral) >
- parseFloat(d.back_integral)){ }}
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('退积分','{:Url('integral_back')}?id={{d.id}}')">
- <i class="fa fa-history"></i> 退积分
- </a>
- </li>
- {{# } }}
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('订单记录','{:Url('order_status')}?oid={{d.id}}')">
- <i class="fa fa-newspaper-o"></i> 订单记录
- </a>
- </li>
- </ul>
- {{# }else if(d._status==5 || d._status==6){ }}
- <button type="button" class="layui-btn layui-btn-xs" onclick="dropdown(this)">操作 <span
- class="caret"></span></button>
- <ul class="layui-nav-child layui-anim layui-anim-upbit">
- <li>
- <a href="javascript:void(0);" lay-event='order_print'>
- <i class="fa fa-file-text"></i> 打印订单
- </a>
- </li>
- <li>
- <a href="javascript:void(0);" lay-event='order_info'>
- <i class="fa fa-file-text"></i> 订单详情
- </a>
- </li>
- <li>
- <a lay-event='marke' href="javascript:void(0);">
- <i class="fa fa-paste"></i> 订单备注
- </a>
- </li>
- {{# if(d.exchange_id>0){ }}
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('退代币','{:Url('money_back')}?id={{d.id}}')">
- <i class="fa fa-history"></i> 退代币
- </a>
- </li>
- {{# } ;}}
- {{# if(parseFloat(d.pay_price) > parseFloat(d.refund_price)){ }}
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('退款','{:Url('refund_y')}?id={{d.id}}')">
- <i class="fa fa-history"></i> 立即退款
- </a>
- </li>
- {{# };}}
- {{# if(parseFloat(d.use_integral) > 0 && parseFloat(d.use_integral) >
- parseFloat(d.back_integral)){ }}
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('退积分','{:Url('integral_back')}?id={{d.id}}')">
- <i class="fa fa-history"></i> 退积分
- </a>
- </li>
- {{# } }}
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('订单记录','{:Url('order_status')}?oid={{d.id}}')">
- <i class="fa fa-newspaper-o"></i> 订单记录
- </a>
- </li>
- </ul>
- {{# }else if(d._status==7){ }}
- <button type="button" class="layui-btn layui-btn-xs" onclick="dropdown(this)">操作 <span
- class="caret"></span></button>
- <ul class="layui-nav-child layui-anim layui-anim-upbit">
- <li>
- <a href="javascript:void(0);" lay-event='order_print'>
- <i class="fa fa-file-text"></i> 打印订单
- </a>
- </li>
- <li>
- <a href="javascript:void(0);" lay-event='order_info'>
- <i class="fa fa-file-text"></i> 订单详情
- </a>
- </li>
- <li>
- <a lay-event='marke' href="javascript:void(0);">
- <i class="fa fa-paste"></i> 订单备注
- </a>
- </li>
- {{# if(d.exchange_id>0){ }}
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('退代币','{:Url('money_back')}?id={{d.id}}')">
- <i class="fa fa-history"></i> 退代币
- </a>
- </li>
- {{# } ;}}
- {{# if(parseFloat(d.pay_price) > parseFloat(d.refund_price)){ }}
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('退款','{:Url('refund_y')}?id={{d.id}}')">
- <i class="fa fa-history"></i> 立即退款
- </a>
- </li>
- {{# } }}
- {{# if(parseFloat(d.use_integral) > 0 && parseFloat(d.use_integral) >=
- parseFloat(d.back_integral)){ }}
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('退积分','{:Url('integral_back')}?id={{d.id}}')">
- <i class="fa fa-history"></i> 退积分
- </a>
- </li>
- {{# } }}
- <li>
- <a href="javascript:void(0);"
- onclick="$eb.createModalFrame('订单记录','{:Url('order_status')}?oid={{d.id}}')">
- <i class="fa fa-newspaper-o"></i> 订单记录
- </a>
- </li>
- </ul>
- {{# }; }}
- </script>
- </div>
- </div>
- </div>
- </div>
- <!--end-->
- </div>
- <script src="{__ADMIN_PATH}js/layuiList.js"></script>
- {/block}
- {block name="script"}
- <script>
- layList.tableList('List', "{:Url('order_list',['real_name'=>$real_name])}", function () {
- return [
- {type: 'checkbox'},
- {field: 'order_id', title: '订单号', sort: true, event: 'order_id', width: '14%', templet: '#order_id'},
- {field: 'nickname', title: '用户信息', templet: '#userinfo', width: '10%', align: 'center'},
- {field: 'spread_uid', title: '推荐人信息', templet: '#spread_uid', width: '10%', align: 'center'},
- {field: 'info', title: '商品信息', templet: "#info", height: 'full-20'},
- {field: 'pay_price', title: '实际支付', width: '8%', align: 'center'},
- {field: 'paid', title: '支付状态', templet: '#paid', width: '8%', align: 'center'},
- {field: 'status', title: '订单状态', templet: '#status', width: '8%', align: 'center'},
- {field: 'exchange', title: '代币兑换', width: '10%', align: 'center'},
- {field: 'add_time', title: '下单时间', width: '10%', sort: true, align: 'center'},
- {field: 'right', title: '操作', align: 'center', toolbar: '#act', width: '10%'},
- ];
- });
- layList.tool(function (event, data, obj) {
- switch (event) {
- case 'order_paid':
- var url = layList.U({c: 'order.store_order', a: 'offline', p: {id: data.id}});
- $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);
- } else
- return Promise.reject(res.data.msg || '修改失败')
- }).catch(function (err) {
- $eb.$swal('error', err);
- });
- }, {'title': '您确定要修改支付状态吗?', 'text': '修改后将无法恢复,请谨慎操作!', 'confirm': '是的,我要修改'})
- break;
- case 'verify':
- var url = layList.U({c: 'order.store_order', a: 'verify', p: {id: data.id}});
- $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);
- } else
- return Promise.reject(res.data.msg || '核销失败')
- }).catch(function (err) {
- $eb.$swal('error', err);
- });
- }, {'title': '您确定核销该订单吗?', 'text': '修改后将无法恢复,请谨慎操作!', 'confirm': '是的,我要核销'})
- break;
- case 'marke':
- var url = layList.U({c: 'order.store_order', a: 'remark'}),
- id = data.id,
- make = data.remark;
- $eb.$alert('textarea', {title: '请修改内容', value: make}, function (result) {
- if (result) {
- $.ajax({
- url: url,
- data: 'remark=' + result + '&id=' + id,
- type: 'post',
- dataType: 'json',
- success: function (res) {
- if (res.code == 200) {
- $eb.$swal('success', res.msg);
- } else
- $eb.$swal('error', res.msg);
- }
- })
- } else {
- $eb.$swal('error', '请输入要备注的内容');
- }
- });
- break;
- case 'danger':
- var url = layList.U({c: 'order.store_order', a: 'take_delivery', p: {id: data.id}});
- $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);
- } else
- return Promise.reject(res.data.msg || '收货失败')
- }).catch(function (err) {
- $eb.$swal('error', err);
- });
- }, {'title': '您确定要修改收货状态吗?', 'text': '修改后将无法恢复,请谨慎操作!', 'confirm': '是的,我要修改'})
- break;
- case 'order_info':
- $eb.createModalFrame(data.nickname + '订单详情', layList.U({a: 'order_info', q: {oid: data.id}}));
- break;
- case 'order_print':
- var url = layList.U({c: 'order.store_order', a: 'order_print', p: {id: data.id}});
- $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);
- } else
- return Promise.reject(res.data.msg || '核销失败')
- }).catch(function (err) {
- $eb.$swal('error', err);
- });
- }, {'title': '确认打印订单?', 'text': '是否确认打印!', 'confirm': '确定'})
- break;
- }
- })
- var action = {
- del_order: function () {
- var ids = layList.getCheckData().getIds('id');
- if (ids.length) {
- var url = layList.U({c: 'order.store_order', a: 'del_order'});
- $eb.$swal('delete', function () {
- $eb.axios.post(url, {ids: ids}).then(function (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': '是的,我要删除'})
- } else {
- layList.msg('请选择要删除的订单');
- }
- },
- write_order: function () {
- return $eb.createModalFrame('订单核销', layList.U({a: 'write_order'}), {w: 500, h: 400});
- },
- };
- $('#container-action').find('button').each(function () {
- $(this).on('click', function () {
- var act = $(this).data('type');
- action[act] && action[act]();
- });
- })
- //下拉框
- $(document).click(function (e) {
- $('.layui-nav-child').hide();
- })
- function dropdown(that) {
- var oEvent = arguments.callee.caller.arguments[0] || event;
- oEvent.stopPropagation();
- var offset = $(that).offset();
- var top = offset.top - $(window).scrollTop();
- var index = $(that).parents('tr').data('index');
- $('.layui-nav-child').each(function (key) {
- if (key != index) {
- $(this).hide();
- }
- })
- if ($(document).height() < top + $(that).next('ul').height()) {
- $(that).next('ul').css({
- 'padding': 10,
- 'top': -($(that).parents('td').height() / 2 + $(that).height() + $(that).next('ul').height() / 2),
- 'min-width': 'inherit',
- 'position': 'absolute'
- }).toggle();
- } else {
- $(that).next('ul').css({
- 'padding': 10,
- 'top': $(that).parents('td').height() / 2 + $(that).height(),
- 'min-width': 'inherit',
- 'position': 'absolute'
- }).toggle();
- }
- }
- var real_name = '<?=$real_name?>';
- var orderCount =<?=json_encode($orderCount)?>, payTypeCount =<?=json_encode($payTypeCount)?>,
- status =<?=$status ? $status : "''"?>;
- require(['vue'], function (Vue) {
- new Vue({
- el: "#app",
- data: {
- badge: [],
- payType: [
- {name: '全部', value: ''},
- {name: '微信支付', value: 1, count: payTypeCount.weixin},
- {name: '余额支付', value: 2, count: payTypeCount.yue},
- {name: '支付宝支付', value: 4, count: payTypeCount.ali},
- {name: '线下支付', value: 3, count: payTypeCount.offline},
- ],
- orderType: [
- {name: '全部', value: ''},
- {name: '普通订单', value: 1, count: orderCount.general},
- // {name: '拼团订单', value: 2, count: orderCount.pink},
- // {name: '秒杀订单', value: 3, count: orderCount.seckill},
- // {name: '砍价订单', value: 4, count: orderCount.bargain},
- {name: '兑换订单', value: 5, count: orderCount.exchange},
- ],
- orderStatus: [
- {name: '全部', value: ''},
- {name: '已卖出', value: 9, count: orderCount.ys},
- {name: '未发货', value: 1, count: orderCount.wf, class: true},
- {name: '待核销', value: 5, count: orderCount.write_off, class: true},
- {name: '未支付', value: 0, count: orderCount.wz},
- {name: '待收货', value: 2, count: orderCount.ds},
- {name: '待评价', value: 3, count: orderCount.dp},
- {name: '交易完成', value: 4, count: orderCount.jy},
- {name: '退款中', value: -1, count: orderCount.tk, class: true},
- {name: '已退款', value: -2, count: orderCount.yt},
- {name: '已删除', value: -4, count: orderCount.del},
- ],
- dataList: [
- {name: '全部', value: ''},
- {name: '今天', value: 'today'},
- {name: '昨天', value: 'yesterday'},
- {name: '最近7天', value: 'lately7'},
- {name: '最近30天', value: 'lately30'},
- {name: '本月', value: 'month'},
- {name: '本年', value: 'year'},
- ],
- where: {
- data: '',
- status: status,
- type: '',
- pay_type: '',
- real_name: real_name || '',
- 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 () {
- this.where.excel = 1;
- location.href = layList.U({c: 'order.store_order', a: 'order_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}
|