123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702 |
- {include file="public/layout" /}
- <script type="text/javascript" src="__SKIN__/js/clipboard.min.js"></script>
- <body class="bodystyle" style="cursor: default; -moz-user-select: inherit;min-width:auto;">
- <div id="append_parent"></div>
- <div id="ajaxwaitid"></div>
- {include file="order/left" /}
- <div class="page" style="min-width:auto;margin-left:100px;padding-bottom: 0px;">
- <div class="flexigrid flexigrid-xin">
- <div class="header-bar">
- <div class="more">
- <div class="search">
- <div class="content">
- <form id="postForm" action="{:url('Shop/index')}" method="get" onsubmit="layer_loading('正在处理');" style="display: unset;">
- {$searchform.hidden|default=''}
- <input type="hidden" name="order_status" value="{$Request.param.order_status}">
- <div class="ey-form-item"><label class="users-form-item-label">关键词:</label>
- <div class="users-form-item-content">
- <div class="users-select">
- <div tabindex="0" class="users-select-selection">
- <!-- 订单号查询 -->
- <div class="sDiv2">
- <input type="text" size="50" name="order_code" id="order_code" value="{$Request.param.order_code}" class="qsbox" style="width: 170px;" placeholder="订单号或商品名称...">
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <div class="ey-form-item"><label class="users-form-item-label">支付方式:</label>
- <div class="users-form-item-content">
- <div class="users-select">
- <div tabindex="0" class="users-select-selection">
- <div class="">
- <select name="pay_name" id="pay_name">
- <option value="" {empty name="$pay_name"}selected{/empty}>全部</option>
- <option value="admin_pay" {eq name="$pay_name" value="admin_pay"}selected{/eq}>后台支付</option>
- <option value="balance" {eq name="$pay_name" value="balance"}selected{/eq}>余额支付</option>
- {eq name="$shopOpenOffline" value="0"}
- <option value="delivery_pay" {eq name="$pay_name" value="delivery_pay"}selected{/eq}>货到付款</option>
- {/eq}
- {eq name="$openWeChat" value="0"}
- <option value="wechat" {eq name="$pay_name" value="wechat"}selected{/eq}>微信支付</option>
- {/eq}
- {eq name="$openAliPay" value="0"}
- <option value="alipay" {eq name="$pay_name" value="alipay"}selected{/eq}>支付宝支付</option>
- {/eq}
- <option value="noNeedPay" {eq name="$pay_name" value="noNeedPay"}selected{/eq}>无需支付</option>
- </select>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <div class="ey-form-item"><label class="users-form-item-label">订单来源:</label>
- <div class="users-form-item-content">
- <div class="users-select">
- <div tabindex="0" class="users-select-selection">
- <div class="">
- <select name="order_terminal" id="order_terminal">
- <option value="0" {empty name="$order_terminal"}selected{/empty}>全部</option>
- <option value="1" {eq name="$order_terminal" value="1"}selected{/eq}>电脑端</option>
- <option value="2" {eq name="$order_terminal" value="2"}selected{/eq}>手机端</option>
- {eq name="$openMall" value="1"}
- <option value="3" {eq name="$order_terminal" value="3"}selected{/eq}>微信小程序</option>
- {/eq}
- </select>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <div class="ey-form-item"><label class="users-form-item-label">商品类型:</label>
- <div class="users-form-item-content">
- <div class="users-select">
- <div tabindex="0" class="users-select-selection">
- <div class="">
- <select name="contains_virtual" id="contains_virtual">
- <option value="0" {empty name="$contains_virtual"}selected{/empty}>全部</option>
- {if condition="in_array($shopType, [0, 2])"}
- <option value="1" {eq name="$contains_virtual" value="1"}selected{/eq}>实体商品</option>
- {/if}
- {if condition="in_array($shopType, [1, 2])"}
- <option value="2" {eq name="$contains_virtual" value="2"}selected{/eq}>虚拟商品</option>
- {/if}
- </select>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <div class="ey-form-item"><label class="users-form-item-label">下单时间:</label>
- <div class="users-form-item-content">
- <div class="users-select">
- <div tabindex="0" class="users-select-selection">
- <div class="sDiv2">
- <input type="text" name="add_time_begin" id="add_time_begin" autocomplete="off" value="{$Request.param.add_time_begin}" class="qsbox" placeholder="起始日期">
- </div>
- 至
- <div class="sDiv2">
- <input type="text" name="add_time_end" id="add_time_end" autocomplete="off" value="{$Request.param.add_time_end}" class="qsbox" placeholder="结束日期">
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <div class="ey-form-item"><label class="users-form-item-label">活动订单:</label>
- <div class="users-form-item-content">
- <div class="users-select">
- <div tabindex="0" class="users-select-selection">
- <div class="">
- <select name="act_type">
- <option value="0" {if condition="!$Request.param.act_type"}selected{/if}>全部</option>
- <option value="1" {eq name="$Request.param.act_type" value="1"} selected {/eq}>普通订单</option>
- {notempty name="$seckill"}
- <option value="2" {eq name="$Request.param.act_type" value="2"} selected {/eq}>秒杀订单</option>
- {/notempty}
- {notempty name="$pointsShop"}
- <option value="3" {eq name="$Request.param.act_type" value="3"} selected {/eq}>积分订单</option>
- {/notempty}
- </select>
- </div>
- </div>
- </div>
- </div>
- </div>
- </form>
- <div class="ey-form-item">
- <div class="users-form-item-content">
- <span class="bt-xin" onclick="OrderQuery();">查询</span>
- <span class="bt-xin-no" onclick="OrderQuery('reset');">重置</span>
- <div class="fbutton">
- <a href="javascript:void(0);" onclick="OrderExcelExport(this);" data-url="{:url('Order/ajax_order_excel_export')}" class="bt-xin-xia"><i class="iconfont e-xiazai"></i>导出</a>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <div class="page" style="min-width:auto;margin-left:100px;">
- <div class="flexigrid flexigrid-xin" style=" padding-right: 1px; ">
- <div class="tableDiv bubbleInfo">
- <table cellspacing="0" cellpadding="0" style="width: 100%;">
- <thead>
- <tr>
- <th> <div class="">商品信息</div> </th>
- <th class="w240"> <div class="">单价/数量</div> </th>
- <th class="w240"> <div class="">实付款</div> </th>
- <th class="w240"> <div class="">收货人</div> </th>
- <th class="w160"> <div class="">配送方式</div> </th>
- <th class="w160"> <div class="">支付方式</div> </th>
- <th class="w160"> <div class="">状态</div> </th>
- <th class="w180"> <div class="">操作</div> </th>
- </tr>
- </thead>
- <tbody>
- {empty name="list"}
- <tr>
- <td class="no-data" align="center" axis="col0" colspan="50">
- <div class="">
- <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
- </div>
- </td>
- </tr>
- {else/}
- {volist name="list" id="vo"}
- <tr class="order-empty"><td colspan="8"></td></tr>
- <tr>
- <td class="biaotou" colspan="8">
- <span class="mr15" style=" display: flex; flex-direction: row; align-items: center;">
- <!-- <i class="iconfont e-pintuan1 f-18 orange mr5"></i> -->
- {notempty name="$seckill"}
- {notempty name="$vo.is_seckill_order" value="0"}
- <i class="iconfont e-miaoshashangpin f-18 orange mr5"></i>
- {/notempty}
- {/notempty}
- {notempty name="$vo.points_shop_order"}<i class="iconfont e-wodejifen f-18 orange mr5"></i>{/notempty}
- <i class="iconfont e-shijian"></i>
- <span class="mr15">{$vo.add_time}</span>
- <span class="mr15">
- 订单号:{$vo.order_code} <a class="copy order_code" onclick="OrderCopy();" data-clipboard-text="{$vo.order_code}"><i class="iconfont e-fuzhi f-16"></i></a>
- </span>
- </span>
- </td>
- </tr>
- <tr>
- {volist name="$vo.Details" id="do"}
- {eq name="$i" value="1"}
- <td>
- <div class="goods-detail">
- <div class="goods-image">
- <a href="{$do.arcurl}" target="_blank"><img src="{$do.litpic}"></a>
- </div>
- <div class="goods-info">
- <p class="goods-title">{eq name="$do.prom_type" value="0"}<span class="shi">实</span>{else/}<span>虚</span>{/eq}{$do.product_name}</p>
- <p class="goods-spec">{$do.data}</p>
- {if condition="!empty($do.apply_service) && !empty($do.service_id)"}
- <p class="after-sale"><span>售后-{$do.status_name}</span><a data-href="{:url('ShopService/after_service_details', array('service_id' => $do['service_id'], 'iframe' => 1))}" onclick="openFullframe(this, '售后详情', '99%', '99%');">售后详情</a></p>
- {/if}
- </div>
- </div>
- </td>
- <td class=""><p>{empty name="$vo.points_shop_order"}¥{/empty}{$do.product_price} X {$do.num}</p></td>
- {/eq}
- {/volist}
-
- <td class="" rowspan="{$vo.rowspan}">
- <p style="color: #636669; font-weight: 600;">{empty name="$vo.points_shop_order"}¥{/empty}{$vo.order_amount} <span style="font-weight: 400;">(含运费:¥{$vo.shipping_fee})</span></p>
- </td>
-
- <td class="" rowspan="{$vo.rowspan}">
- {eq name="$vo.prom_type" value="0"}
- <p>{$vo.consignee}</p><p class="am-link-muted">{$vo.mobile}</p>
- {else/}
- <p>{$vo.u_nickname}</p><p class="am-link-muted">{$vo.u_mobile}</p>
- {/eq}
- </td>
- <td class="" rowspan="{$vo.rowspan}">
- {if condition="$vo.prom_type == 0"}{eq name="$vo.logistics_type" value="1"}物流配送{else/}到店自提{/eq}{elseif condition="$vo.prom_type == 1"}无需物流{/if}
- </td>
- <td class="" rowspan="{$vo.rowspan}">
- <span class="am-badge am-badge-secondary">{$pay_method_arr[$vo.pay_name]|default='未付款'}</span>
- </td>
-
- <td class="" rowspan="{$vo.rowspan}">
- <p>
- <span class="zt {eq name='$vo.order_status' value='0'}show{else/}none{/eq}" style="color: #ff1f2c">待付款</span>
- {eq name="$vo.logistics_type" value="2"}
- <span class="zt {eq name='$vo.order_status' value='1'}show{else/}none{/eq}" style="color: #2d8cf0;">待核销</span>
- {else /}
- <span class="zt {eq name='$vo.order_status' value='1'}show{else/}none{/eq}" style="color: #ff9900">待发货</span>
- {/eq}
- <span class="zt {eq name='$vo.order_status' value='2'}show{else/}none{/eq}" style="color: #2d8cf0;">已发货</span>
- <span class="zt {eq name='$vo.order_status' value='3'}show{else/}none{/eq}" style="color: #19be6b;">已完成</span>
- <span class="zt {eq name='$vo.order_status' value='-1'}show{else/}none{/eq}" style="color: #939799;">已关闭</span>
- </p>
-
- </td>
- <td rowspan="{$vo.rowspan}">
- <div class="operation">
-
- {eq name="$vo.order_status" value='0'}
- <!-- 订单未付款时出现 -->
- <a href="JavaScript:void(0);" onclick="OrderMark('yfk', '{$vo.order_id}', '{$vo.users_id}');" class="bt">确认付款</a>
- <a href="JavaScript:void(0);" onclick="PromptChangePrice('{$vo.order_id}', '{$vo.order_amount}');" class="bt">订单改价</a>
- <script type="text/javascript">
- // 弹出改价输入框
- function PromptChangePrice(order_id, order_amount) {
- layer.prompt({
- formType: 3,
- shade: layer_shade,
- move: false,
- title: '提示',
- id: 'BulkSetPrice',
- btnAlign:'r',
- closeBtn: 3,
- btn: ['确定', '关闭'],
- success: function(layero, index) {
- $("#BulkSetPrice").find('input').attr('placeholder', '请输入应付金额');
- $("#BulkSetPrice").find('input').attr('value', order_amount);
- $("#BulkSetPrice").find('input').attr('onkeyup', "this.value=this.value.replace(/[^\\d.]/g,'')");
- $("#BulkSetPrice").find('input').attr('onpaste', "this.value=this.value.replace(/[^\\d.]/g,'')");
- var msg = '<span style="color: red;">改价后让用户重新进入订单列表点击支付</span>';
- $("#BulkSetPrice").append(msg);
- // 修改订单金额后为保证支付金额准确有效<br/>请让用户刷新订单列表页后重新点击支付
- }
- }, function(price, index) {
- if (0 < price) {
- layer.close(index);
- OrderChangePrice(order_id, order_amount, price);
- } else {
- layer.msg('应付金额不允许为0', {time: 1500});
- }
- });
- }
-
- // 提交改价数据并追加一条订单操作记录
- function OrderChangePrice(OrderID, OrderAmount, Price) {
- if (0 >= Price) layer.msg('应付金额不允许为0', {time: 1500});
- layer_loading('正在处理');
- $.ajax({
- type : 'post',
- url : "{:url('Shop/order_change_price')}",
- data : {
- order_id: OrderID,
- order_amount_old: OrderAmount,
- order_amount: Price,
- _ajax: 1
- },
- dataType : 'json',
- success : function(res) {
- layer.closeAll();
- if (1 == res.code) {
- layer.msg(res.msg, {time: 1500}, function() {
- window.location.reload();
- });
- } else {
- layer.alert(res.msg, {title: false, closeBtn: 0}, function() {
- window.location.reload();
- });
- }
- }
- });
- }
- </script>
- <a href="JavaScript:void(0);" onclick="OrderMark('gbdd', '{$vo.order_id}', '{$vo.users_id}');" class="bt">关闭订单</a>
- <!-- END -->
- {/eq}
- {if condition="1 == $vo.order_status"}
- {eq name="$vo.logistics_type" value="2"}
- <a href="JavaScript:void(0);" onclick="OrderVerify('{$vo.order_id}','{$vo.users_id}');" class="bt">确认核销</a>
- {else /}
- <a href="JavaScript:void(0);" data-url="{:url('Shop/order_send', ['order_id'=>$vo.order_id])}" onclick="OrderSend(this);" class="bt">确认发货</a>
- {notempty name="$LogData[$vo.order_id]['action_count']"}
- <span class="bt">发货提醒<em class="num">{$LogData[$vo.order_id]['action_count']}</em></span>
- {/notempty}
- {/eq}
- <!-- 订单待发货时出现 -->
- <a class="bt" href="javascript:void(0);" onclick="OrderMark('sdtk', '{$vo.order_id}');">手动退款</a>
-
- {/if}
-
- {if condition="2 == $vo.order_status"}
- <!-- 订单已发货时出现 -->
- <a class="bt" href="javascript:void(0);" onclick="OrderMark('sdtk', '{$vo.order_id}');">手动退款</a>
- <a href="JavaScript:void(0);" onclick="OrderMark('ysh','{$vo.order_id}','{$vo.users_id}');" class="bt">确认收货</a>
- <input type="hidden" id="beizhu-url" value="{:url('Shop/update_note')}">
- <a class="bt" href="javascript:void(0);" data-href="{:url('shop/order_remarks', ['order_id'=>$vo.order_id])}" onclick="openFullframe(this, '商家备注', '600px', '55%');" title="订单备注">订单备注</a>
- {/if}
-
- {if condition="-1 == $vo.order_status or 3 == $vo.order_status"}
- <a class="bt" href="javascript:void(0);" data-href="{:url('shop/order_remarks', ['order_id'=>$vo.order_id])}" onclick="openFullframe(this, '商家备注', '600px', '55%');" title="订单备注">订单备注</a>
- <input type="hidden" id="beizhu-url" value="{:url('Shop/update_note')}">
- <a class="bt" href="JavaScript:void(0);" onclick="OrderMark('ddsc','{$vo.order_id}','{$vo.users_id}');">订单删除</a>
- {/if}
-
- {if condition="-1 == $vo.order_status and 1 == $vo.manual_refund"}
- <!-- 订单已发货时出现 -->
- <a href="JavaScript:void(0);" onclick="BrowseRefundNote('{$vo.refund_note}');" class="bt">退款备注</a>
- {/if}
- <a class="bt" href="{:url('Shop/order_details',array('order_id'=>$vo['order_id']))}">订单详情</a>
- </div>
- </td>
- </tr>
-
- {volist name="$vo.Details" id="do"}
- {gt name="$i" value="1"}
- <tr>
- <td>
- <div class="goods-detail">
- <div class="goods-image">
- <a href="{$do.arcurl}" target="_blank"><img src="{$do.litpic}"></a>
- </div>
- <div class="goods-info">
- <p class="goods-title">{eq name="$do.prom_type" value="0"}<span class="shi">实</span>{else/}<span>虚</span>{/eq}{$do.product_name}</p>
- <p class="goods-spec">{$do.data}</p>
- {if condition="!empty($do.apply_service) && !empty($do.service_id)"}
- <p class="after-sale"><span>售后-{$do.status_name}</span><a data-href="{:url('ShopService/after_service_details', array('service_id' => $do['service_id'], 'iframe' => 1))}" onclick="openFullframe(this, '售后详情', '99%', '99%');">售后详情</a></p>
- {/if}
- </div>
- </div>
- </td>
- <td class=""><p>¥{$do.product_price} X {$do.num}</p></td>
- </tr>
- {/gt}
- {/volist}
- {/volist}
- {/empty}
- </tbody>
- </table>
- </div>
- {notempty name="list"}
- <div class="tDiv">
- <div class="tDiv2">
- <!-- <div class="fbutton checkboxall">
- <input type="checkbox" autocomplete="off" class="checkAll">
- </div>
- <div class="fbutton">
- <a onclick="batch_del(this, 'ids');" data-url="{:url('Shop/order_del')}" class="layui-btn layui-btn-primary">
- <span>批量删除</span>
- </a>
- </div> -->
- {include file="public/page" /}
- </div>
- <div style="clear:both"></div>
- </div>
- {/notempty}
- </div>
- </div>
-
- <script type="text/javascript">
- $(function() {
- $('input[name*=ids]').click(function() {
- if ($('input[name*=ids]').length == $('input[name*=ids]:checked').length) {
- $('.checkAll').prop('checked','checked');
- } else {
- $('.checkAll').prop('checked', false);
- }
- });
- $('input[type=checkbox].checkAll').click(function(){
- $('input[type=checkbox]').prop('checked',this.checked);
- });
- });
-
- layui.use('laydate', function() {
- var laydate = layui.laydate;
- //执行一个laydate实例
- laydate.render({
- elem: '#add_time_begin' //指定元素
- });
- laydate.render({
- elem: '#add_time_end' //指定元素
- });
- });
-
- $(document).ready(function() {
- // 表格行点击选中切换
- $('#flexigrid > table>tbody >tr').click(function() {
- $(this).toggleClass('trSelected');
- });
- });
-
- // AJAX调用下载
- function OrderExcelExport(obj) {
- layer_loading('订单导出中');
- $.ajax({
- type: 'post',
- url : $(obj).attr('data-url'),
- data: {
- _ajax: 1,
- // 导出类型,商城订单固定值1
- export_type: 1,
- // 搜索条件信息,可为空
- pay_name: "{$pay_name}",
- order_code: "{$Request.param.order_code}",
- end_time: "{$Request.param.add_time_end}",
- start_time: "{$Request.param.add_time_begin}",
- order_status: "{$Request.param.order_status}",
- order_terminal: "{$order_terminal}",
- contains_virtual: "{$contains_virtual}",
- },
- dataType: 'json',
- success: function(res) {
- layer.closeAll();
- if (1 == res.code) {
- window.location.href = res.url;
- } else {
- showErrorAlert(res.msg);
- }
- },
- error: function(e) {
- layer.closeAll();
- showErrorAlert(e.responseText);
- }
- });
- }
-
- // 订单号复制
- function OrderCopy() {
- var clipboard1 = new Clipboard(".order_code");
- clipboard1.on("success", function(e) {
- layer.msg("复制成功");
- });
- clipboard1.on("error", function(e) {
- layer.msg("复制失败!请手动复制", {icon: 5});
- });
- }
-
- // 订单查询
- function OrderQuery(isReset) {
- if (isReset && 'reset' == isReset) {
- window.location.href = "{:url('Shop/index', ['order_status'=>$Request.param.order_status])}";
- } else {
- $('#postForm').submit();
- }
- }
-
- // 订单发货
- function OrderSend(obj) {
- var url = $(obj).attr('data-url');
-
- // iframe窗
- var iframes = layer.open({
- type: 2,
- title: '订单发货详情',
- fixed: true, //不固定
- shadeClose: false,
- shade: layer_shade,
- area: ['694px', '600px'],
- content: url
- });
- // layer.full(iframes);
- }
-
- // 订单操作
- function OrderMark(status_name, order_id, users_id, admin_note, update_time) {
- if('yfk' == status_name) {
- var msg = '确认订单已付款?';
- } else if ('ysh' == status_name) {
- var msg = '确认订单已收货?';
- } else if ('gbdd' == status_name) {
- var msg = '确认关闭订单?';
- } else if ('ddbz' == status_name) {
- layer.prompt({
- formType: 2,
- shade: layer_shade,
- value: admin_note,
- title: '提示',
- closeBtn: 3,
- id: 'AdminNote',
- area: ['300px', '100px'],
- success: function(layero, index) {
- if (admin_note) {
- var msg = '<br/><span style="color: #999; font-size: 12px;">最后更新:'+update_time+'</span>';
- $("#AdminNote").append(msg);
- $(".layui-layer-content").css('text-align', 'left');
- }
- }
- }, function(value, index, elem) {
- OrderNote(order_id,value);
- layer.close(index);
- });
- return false;
- } else if ('sdtk' == status_name) {
- layer.prompt({
- formType: 2,
- shade: layer_shade,
- value: '',
- title: '提示',
- closeBtn: 3,
- id: 'manualRefund',
- btnAlign:'r',
- btn: ['关闭并退款', '取消'],
- area: ['300px', '120px'],
- success: function(layero, index) {
- $("#manualRefund").find('textarea').attr('placeholder', '请填写关闭订单原因(非必填)');
- var msg = '<span class="f-16 mb5" style="display: block;">是否关闭订单并自行手动退款</span><span class="red f-12">此操作系统不会自动退款,需手动线下退款</span><br/><br/>';
- $("#manualRefund").prepend(msg);
- $(".layui-layer-content").css('text-align', 'left');
- },
- yes: function(index, layero) {
- // 手动关闭订单并退款
- var value = $("#manualRefund").find("textarea").val();
- ManualRefund(order_id, value);
- layer.close(index);
- }
- });
- return false;
- } else if ('ddsc' == status_name) {
- var msg = '确认删除订单?';
- }
-
- layer.confirm(msg, {
- shade: layer_shade,
- title: '提示',
- closeBtn: 3,
- btnAlign:'r',
- btn: ['确定','取消'],
- success: function () {
- $(".layui-layer-content").css('text-align', 'left');
- }
- }, function() {
- $.ajax({
- url: "{:url('Shop/order_mark_status')}",
- data: {order_id:order_id,status_name:status_name,users_id:users_id, _ajax:1},
- type:'post',
- dataType:'json',
- success:function(res) {
- layer.closeAll();
- if (1 == res.code) {
- layer.msg(res.msg, {time: 1500},function(){
- window.location.reload();
- });
- } else {
- layer.msg(res.msg, {time: 1500});
- }
- }
- });
- },function(index) {
- layer.closeAll(index);
- });
- }
-
- // 订单备注
- function OrderNote(order_id, admin_note) {
- $.ajax({
- url: "{:url('Shop/update_note')}",
- data: {order_id:order_id,admin_note:admin_note, _ajax:1},
- type:'post',
- dataType:'json',
- success:function(res){
- layer.closeAll();
- if (1 == res.code) {
- layer.msg(res.msg, {time: 1500},function(){
- window.location.reload();
- });
- } else {
- layer.msg(res.msg, {time: 1500});
- }
- }
- });
- }
-
- // 手动关闭订单并退款
- function ManualRefund(order_id, refund_note) {
- $.ajax({
- url: "{:url('Shop/order_manual_refund')}",
- data: {order_id: order_id, refund_note: refund_note, _ajax: 1},
- type:'post',
- dataType:'json',
- success:function(res) {
- layer.closeAll();
- if (1 == res.code) {
- layer.msg(res.msg, {time: 1500}, function() {
- window.location.reload();
- });
- } else {
- layer.msg(res.msg, {time: 1500});
- }
- }
- });
- }
-
- // 查看手动退款原因
- function BrowseRefundNote(layer_str) {
- if (!layer_str) layer_str = '未填写备注信息';
- layer.confirm(layer_str, {title: '提示', shade: layer_shade, closeBtn: 3, btn: ['关闭'], btnAlign:'r', area: ['25%', '25%'],
- success: function () {
- $(".layui-layer-content").css('text-align', 'left');
- }});
- }
-
- function OrderVerify(order_id, users_id) {
- // 是否开启核销功能
- var openVerify = "{$weappInfo['data']['openVerify']|default=0}";
- if (0 === parseInt(openVerify)) {
- layer.alert('已关闭核销功能,核销订单将无法操作', {
- shade: layer_shade,
- area: ['480px', '190px'],
- move: false,
- title: '提示',
- btnAlign:'r',
- closeBtn: 3,
- success: function () {
- $(".layui-layer-content").css('text-align', 'left');
- }
- });
- return false;
- }
-
- // 是否开启后台二次核销
- var openSecondVerify = "{$weappInfo['data']['openSecondVerify']|default=0}";
- layer.confirm('核销后用户的核销凭证将失效,确认核销此单?', {
- shade: layer_shade,
- title: '提示',
- closeBtn: 3,
- btnAlign:'r',
- btn: ['确定','取消'],
- success: function () {
- $(".layui-layer-content").css('text-align', 'left');
- if (1 === parseInt(openSecondVerify)) {
- var html = '<div style="padding: 0 0 10px 20px; color: red;">请输入核销码二次验证:</div><input type="text" id="verify_code" style="margin-left: 20px; margin-bottom: 5px;" placeholder="请输入订单核销码"/></div>';
- $(".layui-layer-content").after(html);
- }
- }
- }, function() {
- var verify_code = 1 === parseInt(openSecondVerify) ? $("#verify_code").val() : '';
- if ('' == verify_code && 1 === parseInt(openSecondVerify)) {
- $('#verify_code').focus();
- return false;
- }
- layer_loading('正在处理');
- $.ajax({
- url: "{:url('Shop/verify')}",
- data: {order_id: order_id, verify_code: verify_code, users_id: users_id, _ajax: 1},
- type:'post',
- dataType:'json',
- success:function(res) {
- layer.closeAll();
- if (1 == res.code) {
- layer.msg(res.msg, {time: 1500},function(){
- window.location.reload();
- });
- } else {
- layer.msg(res.msg, {time: 1500});
- }
- }
- });
- },function(index) {
- layer.closeAll(index);
- });
- }
- </script>
-
- {include file="public/footer" /}
|