Commit 587b7126 by 朱继来

1. 主管审核接口;

2. 反审接口;
parent bf049b01
......@@ -898,6 +898,40 @@ Class OrderController extends Controller
}
}
// 主管审核
public function ajaxAuditPass(Request $request)
{
if ($request->isMethod('post')) {
$data['order_id'] = $request->input('order_id', '');
$data['operator_id'] = $request->user->userId;
$data['k1'] = time();
$data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi');
$url = Config('website.api_domain').'order/managerAudit';
$temp = json_decode(curlApi($url, $data, "POST"), true);
return array('errcode'=>$temp['err_code'], 'errmsg'=>$temp['err_msg']);
}
}
// 反审
public function ajaxReAudit(Request $request)
{
if ($request->isMethod('post')) {
$data['order_id'] = $request->input('order_id', '');
$data['operator_id'] = $request->user->userId;
$data['k1'] = time();
$data['k2'] = md5(md5($data['k1']).'fh6y5t4rr351d2c3bryi');
$url = Config('website.api_domain').'order/reAudit';
$temp = json_decode(curlApi($url, $data, "POST"), true);
return array('errcode'=>$temp['err_code'], 'errmsg'=>$temp['err_msg']);
}
}
// 驳回调价信息
public function ajaxRejected(Request $request)
{
......
......@@ -42,7 +42,9 @@ Route::group(['middleware' => 'web'], function () {
Route::get('/change/{id}', 'OrderController@changeOrder');
Route::match(['get', 'post'], '/sendSales/{id?}', 'OrderController@sendSales');
Route::post('/ajaxdeletegoods', 'OrderController@ajaxdeletegoods');
Route::post('/ajaxSaveChange', 'OrderController@ajaxSaveChange');
Route::post('/ajaxSaveChange', 'OrderController@ajaxSaveChange');
Route::post('/ajaxAuditPass', 'OrderController@ajaxAuditPass');
Route::post('/ajaxReAudit', 'OrderController@ajaxReAudit');
Route::get('/check/{id}', 'OrderController@check');
Route::match(['get', 'post'], '/applyAdjust/{id}', 'OrderController@applyAdjust');
Route::match(['get', 'post'], '/send/{id}', 'OrderController@send');
......
......@@ -680,7 +680,7 @@
var supplier_id = $(this).data('sup_id');
var supplier_name = $(this).data('sup_name');
if (supplier_id == '7' || supplier_name.toLowerCase() == 'digikey') {
if (supplier_id == '7' || supplier_name.toString().toLowerCase() == 'digikey') {
is_dgk = true;
}
})
......
......@@ -35,7 +35,7 @@
self.parents('tr').find('.change_status').val(-1); // 调整状态
self.parents('tr').find('.change_status_val').html('<i class="error">已取消</i>'); // 调整状态
self.parents('tr').find('.del_reason').val(reason); // 删除原因
self.parents('tr').find('input').attr('disabled', true); // 禁用当前行input
self.parents('tr').find('input').attr('readonly', 'readonly'); // 设置当前行input只读
calculate(self);
......@@ -583,7 +583,7 @@
}
})
layer.msg('审核提交中...', {icon: 16, time: 0, shade: 0.3}); // 阻止重复提交
// layer.msg('审核提交中...', {icon: 16, time: 0, shade: 0.3}); // 阻止重复提交
},
btn2: function(index, layero){
layer.close(index);
......@@ -672,6 +672,9 @@
var new_str = ''; // 新增商品数据
var curr_no = 1; // 标记当前行序号
// 明细取消禁用
$('.deletegoods').attr('disabled', false).css('pointer-events', 'auto');
for (var i in items) {
if (!items[i].is_add) {
$('.change_item_'+i).find('.change_goods_price').val(items[i].goods_price);
......
......@@ -1264,6 +1264,7 @@
}
});
})
}
......
......@@ -86,6 +86,10 @@
goods_len++
})
if (goods_len == 1) {
$('.deletegoods').attr('disabled', false).css('pointer-events', 'auto');
}
var curr_no = goods_len + 1; // 当前添加行序号
var data = eval('('+resp.data+')');
var order_item = data.item; // 当前新增商品信息
......
......@@ -544,6 +544,7 @@
},
})
}
},
}
......
+(function($){
$.lie = $.lie || {version: "v1.0.0"};
$.extend($.lie, {
audit: {
index:function() {
// 主管审核
$('.manager-audit').click(function() {
var order_id = $(this).data('id');
// 弹出提示
layer.open({
area: ['360px'],
title: '提示信息',
content: '确定审核通过该订单吗?',
btn:['确定', '取消'],
yes: function(index, layero){
$.ajax({
url : '/ajaxAuditPass',
type: 'post',
data: {order_id: order_id},
dataType: 'json',
success: function (resp) {
if(resp.errcode === 0){
layer.msg(resp.errmsg || '操作成功');
setTimeout(function(){
location.reload();
}, 1000);
} else {
layer.alert(resp.errmsg || '网络异常', function() {
location.reload();
});
}
},
error: function (res) {
console.log(res);
}
})
layer.msg('提交中...', {icon: 16, time: 0, shade: 0.3}); // 阻止重复提交
},
btn2: function(index, layero){
layer.close(index);
}
});
})
// 反审
$('.re-audit').click(function() {
var order_id = $(this).data('id');
// 弹出提示
layer.open({
area: ['360px'],
title: '提示信息',
content: '确定再次审核该订单吗?',
btn:['确定', '取消'],
yes: function(index, layero){
$.ajax({
url : '/ajaxReAudit',
type: 'post',
data: {order_id: order_id},
dataType: 'json',
success: function (resp) {
if(resp.errcode === 0){
layer.msg(resp.errmsg || '操作成功');
window.open('/change/' + order_id, '_blank')
return false;
}
layer.alert(resp.errmsg || '网络异常');
return false;
},
error: function (res) {
console.log(res);
}
})
layer.msg('提交中...', {icon: 16, time: 0, shade: 0.3}); // 阻止重复提交
},
btn2: function(index, layero){
layer.close(index);
}
});
})
},
}
})
})(jQuery)
\ No newline at end of file
......@@ -171,10 +171,7 @@
@endif
<td>状态</td>
@if (count($order_items_info) > 1)
<th width="5%">操作</th>
@endif
<th width="5%">操作</th>
</thead>
<tbody>
......@@ -191,10 +188,10 @@
<p>{{$v['goods_name']}}</p>
</td>
<td>
<input class="only_number num change_goods_number" name="change_info[{{$v['rec_id']}}][goods_number]" value="{{$v['goods_number']}}">
<input class="only_number num change_goods_number" name="change_info[{{$v['rec_id']}}][goods_number]" value="{{$v['goods_number']}}" <?= $v['status'] == -1 ? 'readonly' : '' ?>>
</td>
<td>
<input class="price only_number change_goods_price" name="change_info[{{$v['rec_id']}}][goods_price]" data-origin="{{$v['original_price']}}" data-price="{{$v['goods_price']}}" value="{{$v['goods_price']}}">
<input class="price only_number change_goods_price" name="change_info[{{$v['rec_id']}}][goods_price]" data-origin="{{$v['original_price']}}" data-price="{{$v['goods_price']}}" value="{{$v['goods_price']}}" <?= $v['status'] == -1 ? 'readonly' : '' ?>>
</td>
<!-- 销售类型为预售时展示 -->
@if ($order_info['sale_type'] == 2)
......@@ -214,14 +211,15 @@
<td>
<input class="change_status" type="hidden" name="change_info[{{$v['rec_id']}}][status]" value="{{$v['status']}}">
<span class="change_status_val">{{ $v['status'] == 1 ? '正常' : '<i class="error">已取消</i>' }}</span>
<span class="change_status_val"><?= $v['status'] == 1 ? '正常' : '<i class="error">已取消</i>' ?></span>
</td>
@if (count($order_items_info) > 1 && in_array($order_info['status'], [1, 2]))
@if (in_array($order_info['status'], [1, 2]) && $v['status'] == 1)
<td><a class="btn btn-xs btn-danger deletegoods" href="javascript:;" data-id="<?= $v['rec_id'] ?>" data-type="{{ $order_info['order_goods_type'] }}">删除</a></td>
<input type="hidden" class="del_reason" name="change_info[{{$v['rec_id']}}][del_reason]">
@else
<td></td>
@endif
<input type="hidden" class="del_reason" name="change_info[{{$v['rec_id']}}][del_reason]">
</tr>
@endforeach
</tbody>
......@@ -499,6 +497,13 @@
var pay_preferential = "{{ $order_price_info['pay_preferential'] ? $order_price_info['pay_preferential'] : 0 }}"; // 支付优惠(钱包)
var new_client_price = "{{ $order_price_info['new_client_price'] }}";
// 明细数目
var item_count = "{{ count($order_items_info) }}";
if (item_count == 1) {
$('.deletegoods').attr('disabled', true).css('pointer-events', 'none');
}
var rest_time = "{{$order_info['pay_time'] ? $order_info['pay_time'] - time() : NULL}}";
if (rest_time) {
......
......@@ -43,7 +43,7 @@
<td>{{$v['goods_number']}}</td>
<td>{{$v['goods_price']}}</td>
<td>
{{ $v['status'] == 1 ? '正常' : '<i style="color: red;">已取消</i>' }}
<?= $v['status'] == 1 ? '正常' : '<i style="color: red;">已取消</i>' ?>
@if (isset($v['is_add']))
<i style="color: green;">(新增)</i>
......
......@@ -145,13 +145,20 @@
<a class="btn btn-danger input-cancel-reason" href="javascript:;" data-oid="{{$order_info['order_id']}}" data-type="2">取消订单</a>
@endif
<!-- 判断操作权限 -->
@if (in_array($order_info['status'], [1, 2]) && in_array('check_order', $userPerms) && $order_info['sale_id'])
<a class="btn btn-info" href="{{URL('change', ['order_id'=>$order_info['order_id']])}}" target="_blank">人工审单</a>
@if (in_array('check_order', $userPerms) && $order_info['sale_id'])
@if ($order_info['status'] == 1)
<a class="btn btn-success" href="{{URL('change', ['order_id'=>$order_info['order_id']])}}" target="_blank">人工审单</a>
@elseif ($order_info['status'] == 2)
<a class="btn btn-success re-audit" data-id="{{$order_info['order_id']}}">反审</a>
@endif
@endif
<!-- 主管审核 -->
@if ($order_temp_info['is_manager_audit'] && in_array($role, [1, 2]) && $order_info['status'] == 1)
<a class="btn btn-danger manager-audit" data-id="{{$order_info['order_id']}}">主管审核</a>
@endif
<!-- 判断邮件发送时机 -->
<!-- 判断邮件发送时机 -->
@if (!empty($order_temp_info['erp_sn']) )
<a class="btn btn-primary send_mail" >发送邮件</a>
@endif
......@@ -352,6 +359,7 @@
$.lie.order.details();
$.lie.track.orderTrack();
$.lie.audit.index();
// 发送邮件
$(document).on('click','.send_mail',function(data){
......
......@@ -50,7 +50,7 @@
{{$currency.number_format($order_info['order_amount'] - $order_info['advance_amount'], 2, '.', '')}}
</td>
@endif
<td>{{ Config('params.order_status')[$order_info['status']] }}</td>
<td>{{ $order_temp_info['is_manager_audit'] ? '待主管审核' : Config('params.order_status')[$order_info['status']] }}</td>
<td>
<?php
......
<table class="table">
<thead>
<tr class="caption">
<th>序号</th>
<?php if ($order_info['order_goods_type'] == 2) { ?>
<th>商品ID</th>
<th>商品名</th>
<th>型号</th>
<?php } else { ?>
<th>商品ID</th>
<th>商品名</th>
<?php } ?>
<?php if ($order_info['order_goods_type'] == 1) { ?>
<th>供应商</th>
<?php } ?>
<th>制造商</th>
<!-- ERP或京东订单 -->
<?php if (in_array($order_info['order_type'], [2, 3])) { ?>
<th>采购数量</th>
<th>采购单价</th>
<?php } elseif ($username != 'vpadmin@ichunt.com') { ?>
<?php if ($order_info['order_goods_type'] == 2) { ?>
<th>购买数量</th>
<th>购买时单价</th>
<?php } else { ?>
<th>采购数量</th>
<th>采购单价</th>
<?php } ?>
<th>均摊后单价</th>
<?php } else { ?>
<th>商品数量</th>
<th>商品单价</th>
<?php } ?>
<th>小计</th>
<th>费用</th>
<th>折扣</th>
<th>合计</th>
<th>货期</th>
<?php if ($order_info['order_goods_type'] == 1) { ?>
<th>采购员</th>
<?php } ?>
<th>自采标记</th>
<th >批次</th>
<?php if ($order_info['order_goods_type'] == 1) { ?>
<th>生产跟踪</th>
<?php } ?>
<th>备注</th>
<th>状态</th>
<th>来源</th>
<th>操作</th>
<?php
if ($action_name == 'changeOrder' && count($order_items_info) > 1 && in_array($order_info['status'], [1, 2])) {
echo '<th>操作</th>';
}
?>
</tr>
</thead>
<tbody>
<?php if (!empty($order_items_info)) { ?>
<?php foreach ($order_items_info as $key => $v) { ?>
<tr>
<td><?= $key+1 ?></td>
<div class="row-fluid table-responsive">
<table class="table table-hover text-nowrap">
<thead>
<tr class="caption">
<th>序号</th>
<?php if ($order_info['order_goods_type'] == 2) { ?>
<td><?= $v['goods_id'] ?></td>
<td><a href="<?= Config('website.main_url').'item/'.$v['goods_id'].'.html?ptag=order' ?>" target="_blank"><?= $v['goods_name'] ?></a></td>
<td><?= App\Http\Controllers\getGoodsName($v['goods_id']) ?></td>
<th>商品ID</th>
<th>商品名</th>
<th>型号</th>
<?php } else { ?>
<td><?= $v['goods_id'] ?></td>
<td><a href="<?= Config('website.main_url').'goods_'.$v['goods_id'].'.html?ptag=order' ?>" target="_blank"><?= $v['goods_name'] ?></a></td>
<th>商品ID</th>
<th>商品名</th>
<?php } ?>
<?php if ($order_info['order_goods_type'] == 1) { ?>
<td><?= $v['supplier_name'] ?></td>
<th>供应商</th>
<?php } ?>
<td><?= $v['brand_name'] ?></td>
<td id="goods_number_<?= $v['rec_id'] ?>"><?= $v['goods_number'] ?></td>
<td>
<span id="<?= $v['rec_id'] ?>"><?= $v['goods_price'] ?></span>
</td>
<th>制造商</th>
<!-- ERP或京东订单 -->
<?php if (in_array($order_info['order_type'], [2, 3])) { ?>
<td><?= $v['goods_amount_format'] ?></td>
<th>采购数量</th>
<th>采购单价</th>
<?php } elseif ($username != 'vpadmin@ichunt.com') { ?>
<td><?= $v['single_pre_price_format'] ?></td>
<td><?= $v['goods_amount_format'] ?></td>
<?php if ($order_info['order_goods_type'] == 2) { ?>
<th>购买数量</th>
<th>购买时单价</th>
<?php } else { ?>
<th>采购数量</th>
<th>采购单价</th>
<?php } ?>
<th>均摊后单价</th>
<?php } else { ?>
<td><?= $v['goods_amount_format'] ?></td>
<th>商品数量</th>
<th>商品单价</th>
<?php } ?>
<td><?= $v['extra_price'] ?></td>
<td><?= $v['goods_discount_amount'] ?></td>
<td><?= number_format($v['goods_amount'] + $v['extra_price'] - $v['goods_discount_amount'], 2, '.', '') ?></td>
<td><?= $v['delivery_time'] ?></td>
<th>小计</th>
<th>费用</th>
<th>折扣</th>
<th>合计</th>
<th>货期</th>
<?php if ($order_info['order_goods_type'] == 1) { ?>
<td> <div class="buyerName">
<?php
echo !empty($v['buyerName'])?$v['buyerName']:'';
?>
</div>
</td>
<th>采购员</th>
<?php } ?>
<td>
<?php
if($v['self_supplier_type'] == 1) {
echo '自采';
} elseif($v['self_supplier_type'] == 2) {
echo '自采';
} else {
echo '自采';
}
?>
</td>
<th>自采标记</th>
<td class="batch"><?= !empty($v['batch']) ? $v['batch'] : ''; ?> </td>
<th >批次</th>
<?php if ($order_info['order_goods_type'] == 1) { ?>
<td><a class="order-track" data-rid="<?= $v['rec_id'] ?>"><?= App\Http\Controllers\getLastTrack($v['rec_id']) ?></a></td>
<th>生产跟踪</th>
<?php } ?>
<th>备注</th>
<th>状态</th>
<th>来源</th>
<th>操作</th>
<td><?= !empty($v['remarks']) ? $v['remarks'] : '' ?></td>
<?php
if ($action_name == 'changeOrder' && count($order_items_info) > 1 && in_array($order_info['status'], [1, 2])) {
echo '<th>操作</th>';
}
?>
</tr>
</thead>
<tbody>
<?php if (!empty($order_items_info)) { ?>
<?php foreach ($order_items_info as $key => $v) { ?>
<tr>
<td><?= $key+1 ?></td>
<?php if ($order_info['order_goods_type'] == 2) { ?>
<td><?= $v['goods_id'] ?></td>
<td><a href="<?= Config('website.main_url').'item/'.$v['goods_id'].'.html?ptag=order' ?>" target="_blank"><?= $v['goods_name'] ?></a></td>
<td><?= App\Http\Controllers\getGoodsName($v['goods_id']) ?></td>
<?php } else { ?>
<td><?= $v['goods_id'] ?></td>
<td><a href="<?= Config('website.main_url').'goods_'.$v['goods_id'].'.html?ptag=order' ?>" target="_blank"><?= $v['goods_name'] ?></a></td>
<?php } ?>
<td><?= $v['status'] == 1 ? '正常' : '<i class="error">已关闭</i>' ?></td>
<td><?= $v['goods_source'] == 1 ? '前台' : '后台' ?></td>
<td>
<!-- <button type="button" class="btn btn-success btn-xs remarks">编辑</button> -->
<?php if (in_array($order_info['status'], [1, 2, 3]) && $v['status'] == 1) { ?>
<button type="button" class="btn btn-success btn-xs edit-item" data-id="<?= $v['rec_id'] ?>" data-batch="<?= $v['batch'] ?>" data-bid="<?= $v['buyer_id'] ?>" data-remarks="<?= $v['remarks'] ?>">编辑</button>
<?php if ($order_info['order_goods_type'] == 1) { ?>
<td><?= $v['supplier_name'] ?></td>
<?php } ?>
</td>
</tr>
<?php } ?>
<?php } ?>
</tbody>
<tfoot>
<?php if ($order_info['order_remark']) { ?>
<tr>
<td>订单备注信息:</td>
<td colspan="20"><?= $order_info['order_remark'] ?></td>
</tr>
<?php } ?>
<?php if ($order_temp_info['kefu_remark']) { ?>
<tr>
<td>客服备注信息:</td>
<td colspan="20"><?= $order_temp_info['kefu_remark'] ?></td>
</tr>
<?php } ?>
<td><?= $v['brand_name'] ?></td>
<td id="goods_number_<?= $v['rec_id'] ?>"><?= $v['goods_number'] ?></td>
<td>
<span id="<?= $v['rec_id'] ?>"><?= $v['goods_price'] ?></span>
</td>
<?php if (in_array($order_info['order_type'], [2, 3])) { ?>
<td><?= $v['goods_amount_format'] ?></td>
<?php } elseif ($username != 'vpadmin@ichunt.com') { ?>
<td><?= $v['single_pre_price_format'] ?></td>
<td><?= $v['goods_amount_format'] ?></td>
<?php } else { ?>
<td><?= $v['goods_amount_format'] ?></td>
<?php } ?>
<?php if ($order_info['order_goods_type'] == 2 && $order_temp_info['business_type'] == 1) { ?>
<tr>
<td>项目需求描述:</td>
<td colspan="20"><?= $order_temp_info['sample_demand_desc'] ?></td>
</tr>
<td><?= $v['extra_price'] ?></td>
<td><?= $v['goods_discount_amount'] ?></td>
<td><?= number_format($v['goods_amount'] + $v['extra_price'] - $v['goods_discount_amount'], 2, '.', '') ?></td>
<td><?= $v['delivery_time'] ?></td>
<?php if ($order_info['order_goods_type'] == 1) { ?>
<td> <div class="buyerName">
<?php
echo !empty($v['buyerName'])?$v['buyerName']:'';
?>
</div>
</td>
<?php } ?>
<td>
<?php
if($v['self_supplier_type'] == 1) {
echo '自采';
} elseif($v['self_supplier_type'] == 2) {
echo '自采';
} else {
echo '自采';
}
?>
</td>
<td class="batch"><?= !empty($v['batch']) ? $v['batch'] : ''; ?> </td>
<?php if ($order_info['order_goods_type'] == 1) { ?>
<td><a class="order-track" data-rid="<?= $v['rec_id'] ?>"><?= App\Http\Controllers\getLastTrack($v['rec_id']) ?></a></td>
<?php } ?>
<td><?= !empty($v['remarks']) ? $v['remarks'] : '' ?></td>
<td><?= $v['status'] == 1 ? '正常' : '<i class="error">已关闭</i>' ?></td>
<td><?= $v['goods_source'] == 1 ? '前台' : '后台' ?></td>
<td>
<!-- <button type="button" class="btn btn-success btn-xs remarks">编辑</button> -->
<?php if (in_array($order_info['status'], [1, 2, 3]) && $v['status'] == 1) { ?>
<button type="button" class="btn btn-success btn-xs edit-item" data-id="<?= $v['rec_id'] ?>" data-batch="<?= $v['batch'] ?>" data-bid="<?= $v['buyer_id'] ?>" data-remarks="<?= $v['remarks'] ?>">编辑</button>
<?php } ?>
</td>
</tr>
<?php } ?>
<?php } ?>
</tfoot>
</table>
</tbody>
<tfoot>
<?php if ($order_info['order_remark']) { ?>
<tr>
<td>订单备注信息:</td>
<td colspan="20"><?= $order_info['order_remark'] ?></td>
</tr>
<?php } ?>
<!-- 退款已处理 -->
<?php if ($order_refund_info['status'] == 10 && $order_price_info['refund_price'] != 0) { ?>
<hr>
<table class="table">
<thead>
<tr class="caption">
<th>退款型号</th>
<th>退款数量</th>
<th>价格</th>
<th>小计</th>
</tr>
</thead>
<tbody>
<?php foreach ($order_refund_items as $k=>$v) { ?>
<?php if ($order_temp_info['kefu_remark']) { ?>
<tr>
<td><?= $v['goods_name'] ?></td>
<td><?= $v['refund_num'] ?></td>
<td><?= $currency . $v['single_pre_price'] ?></td>
<td><?= $currency . number_format($v['refund_num'] * $v['single_pre_price'], 4) ?></td>
</tr>
<td>客服备注信息:</td>
<td colspan="20"><?= $order_temp_info['kefu_remark'] ?></td>
</tr>
<?php } ?>
<tr>
<td>手动差价</td>
<td></td>
<td></td>
<td><?= '-' . $order_refund_info['price_fall'] ?></td>
</tr>
</tbody>
</table>
<?php } ?>
<?php if ($order_info['order_goods_type'] == 2 && $order_temp_info['business_type'] == 1) { ?>
<tr>
<td>项目需求描述:</td>
<td colspan="20"><?= $order_temp_info['sample_demand_desc'] ?></td>
</tr>
<?php } ?>
</tfoot>
</table>
<!-- 退款已处理 -->
<?php if ($order_refund_info['status'] == 10 && $order_price_info['refund_price'] != 0) { ?>
<hr>
<table class="table">
<thead>
<tr class="caption">
<th>退款型号</th>
<th>退款数量</th>
<th>价格</th>
<th>小计</th>
</tr>
</thead>
<tbody>
<?php foreach ($order_refund_items as $k=>$v) { ?>
<tr>
<td><?= $v['goods_name'] ?></td>
<td><?= $v['refund_num'] ?></td>
<td><?= $currency . $v['single_pre_price'] ?></td>
<td><?= $currency . number_format($v['refund_num'] * $v['single_pre_price'], 4) ?></td>
</tr>
<?php } ?>
<tr>
<td>手动差价</td>
<td></td>
<td></td>
<td><?= '-' . $order_refund_info['price_fall'] ?></td>
</tr>
</tbody>
</table>
<?php } ?>
</div>
<div class="order-total" style="margin-top: 30px;">
<div>
......@@ -290,3 +292,4 @@
<p>客户付款地址:<?= Config('website.pay_url').$order_info['order_id'] ?></p>
<?php } ?>
</div>
......@@ -12,6 +12,7 @@
<script src="/js/md5.js"></script>
<script src="/js/layui/layui.js"></script>
<script src="/js/details.js?v=<?= time() ?>"></script>
<script src="/js/order_audit.js"></script>
<script src="/js/order_track.js"></script>
<script src="/js/order_cancel.js"></script>
<script src="/js/refund.js?v=<?= time() ?>"></script>
......
......@@ -289,17 +289,21 @@
</td>
<td class="show-list">
<?php
switch ($v['status']) {
case -2: echo '<span class="list-text-no-check"><b>审核未通过</b></span>';break;
case -1: echo '<span class="list-text-cancel"><b>已取消</b></span>';break;
case 1: echo '<span class="list-text-checking"><b>待审核</b></span>';break;
case 2: echo '<span class="list-text-pay"><b>待付款</b></span>';break;
case 3: echo '<span class="list-text-last-pay"><b>待付尾款</b></span>';break;
case 4: echo '<span class="list-text-send"><b>待发货</b></span>';break;
case 7: echo '<span class="list-text-send"><b>部分发货</b></span>';break;
case 8: echo '<span class="list-text-confirm"><b>待收货</b></span>';break;
case 10: echo '<span class="list-text-success"><b>交易成功</b></span>';break;
}
if ($order_extend->is_manager_audit) {
echo '<span class="list-text-checking"><b>待主管审核</b></span>';
} else {
switch ($v['status']) {
case -2: echo '<span class="list-text-no-check"><b>审核未通过</b></span>';break;
case -1: echo '<span class="list-text-cancel"><b>已取消</b></span>';break;
case 1: echo '<span class="list-text-checking"><b>待审核</b></span>';break;
case 2: echo '<span class="list-text-pay"><b>待付款</b></span>';break;
case 3: echo '<span class="list-text-last-pay"><b>待付尾款</b></span>';break;
case 4: echo '<span class="list-text-send"><b>待发货</b></span>';break;
case 7: echo '<span class="list-text-send"><b>部分发货</b></span>';break;
case 8: echo '<span class="list-text-confirm"><b>待收货</b></span>';break;
case 10: echo '<span class="list-text-success"><b>交易成功</b></span>';break;
}
}
?>
</td>
<td class="show-list"> {{ Config('params.order_pay_type')[$v['order_pay_type']] }} </td>
......@@ -327,9 +331,18 @@
<td>
<div class="btn-group btn-group-xs" style="width: 240px;">
<a class="btn btn-primary" href="{{URL('details', ['order_id'=>$v['order_id']])}}" target="_blank">详情</a>
@if (in_array('check_order', $userPerms) && in_array($v['status'], [1, 2, 3]) && $v['sale_id'])
<a class="btn btn-success" href="{{URL('change', ['order_id'=>$v['order_id']])}}" target="_blank">人工审单</a>
@if (in_array('check_order', $userPerms) && $v['sale_id'])
@if ($v['status'] == 1)
<a class="btn btn-success" href="{{URL('change', ['order_id'=>$v['order_id']])}}" target="_blank">人工审单</a>
@elseif ($v['status'] == 2)
<a class="btn btn-success re-audit" data-id="{{$v['order_id']}}">反审</a>
@endif
@endif
<!-- 主管审核 -->
@if ($order_extend->is_manager_audit && in_array($role, [1, 2]) && $v['status'] == 1)
<a class="btn btn-danger manager-audit" data-id="{{$v['order_id']}}">主管审核</a>
@endif
<!-- 管理员和经理或有推送权限显示 -->
......@@ -438,6 +451,7 @@
$.lie.order.index();
$.lie.track.orderTrack();
$.lie.cancel.cancelorder();
$.lie.audit.index();
// 展开菜单
$('#side-menu').children('li').eq(1).addClass('active');
......
......@@ -11,6 +11,7 @@
<script src="/js/common.js"></script>
<script src="/js/layui/layui.js"></script>
<script src="/js/list.js?v=<?= time() ?>"></script>
<script src="/js/order_audit.js"></script>
<script src="/js/order_track.js"></script>
<script src="/js/order_cancel.js"></script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment