You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
171 lines
6.1 KiB
171 lines
6.1 KiB
<?php /*a:1:{s:68:"/server/wwwroot/wzsmam.njrzwl.cn/app/agent/view/index/orderlist.html";i:1727170463;}*/ ?>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset=utf-8>
|
|
<meta name="renderer" content="webkit"/>
|
|
<meta name="force-rendering" content="webkit"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"/>
|
|
<meta name=viewport content="width=device-width,initial-scale=1">
|
|
<title>订单管理</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
|
|
<!-- Latest compiled and minified CSS -->
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-table@1.23.4/dist/bootstrap-table.min.css">
|
|
|
|
|
|
</head>
|
|
<body>
|
|
<div class="panel panel-default panel-intro" style="margin:20px">
|
|
<div class="container text-center">
|
|
<div class="row">
|
|
<div class="col">
|
|
<input type="text" name="order_code" class="form-control" id="order_code" placeholder="请输入系统订单号" />
|
|
</div>
|
|
<div class="col">
|
|
<input type="text" name="mobile" class="form-control" id="mobile" placeholder="请输入下单手机号" />
|
|
</div>
|
|
<div class="col">
|
|
<select name="pay_type" class="form-control" id="pay_type">
|
|
<option value=''>全部</option>
|
|
<option value='-1'>已取消</option>
|
|
<option value='1'>待支付</option>
|
|
<option value='2'>待服务</option>
|
|
<option value='3'>师傅接单</option>
|
|
<option value='4'>师傅出发</option>
|
|
<option value='5'>师傅到达</option>
|
|
</select>
|
|
</div>
|
|
<div class="col">
|
|
<a href="javascript:;" class="btn btn-success" onclick="searchwrd()" title="搜索" ><i class="fa fa-trash"></i> 搜索</a>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div id="toolbar" class="toolbar">
|
|
<a href="javascript:;" class="btn btn-danger btn-del " onclick="delList()" title="删除" ><i class="fa fa-trash"></i> 批量删除</a>
|
|
</div>
|
|
<table id="table" class="table table-striped table-bordered table-hover table-nowrap" ></table>
|
|
</div>
|
|
<script src="/js/jquery-3.5.1.min.js" ></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
|
|
<!-- Latest compiled and minified JavaScript -->
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap-table@1.23.4/dist/bootstrap-table.min.js"></script>
|
|
<!-- Latest compiled and minified Locales -->
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap-table@1.23.4/dist/locale/bootstrap-table-zh-CN.min.js"></script>
|
|
<script>
|
|
|
|
var table = $("#table");
|
|
table.bootstrapTable({
|
|
url: '/massage/admin/AdminOrder/orderList?page=1&limit=10&goods_name=&coach_name=&order_code=&mobile=&start_time=&end_time=&is_coach=0&is_store=0&admin_id=&is_add=0&token=7c3862613ffb49259ef11800a91c2825',
|
|
pagination: true,
|
|
strictSearch: true,
|
|
search: false,
|
|
pk: 'id',
|
|
queryParams:function(params){
|
|
return {
|
|
page:params.pageNumber,
|
|
limit:params.pageSize,
|
|
order_code:$('#order_code').val(),
|
|
mobile:$('#mobile').val(),
|
|
}
|
|
},
|
|
toolbar: '#toolbar',
|
|
responseHandler:function(res){
|
|
return {
|
|
"total":res.data.total,
|
|
"rows":res.data.data
|
|
};
|
|
},
|
|
columns: [{
|
|
checkbox: true,
|
|
visible: true //是否显示复选框
|
|
},{
|
|
field: 'id',
|
|
title: 'ID'
|
|
}, {
|
|
field: 'id',
|
|
title: '服务项目',
|
|
operate: 'LIKE',
|
|
}, {
|
|
field: 'user_name',
|
|
title: '下单人'
|
|
}, {
|
|
field: 'mobile',
|
|
title: '下单手机号'
|
|
},{
|
|
field: 'coach_name',
|
|
title: '师傅'
|
|
},{
|
|
field: 'init_service_price',
|
|
title: '服务项目服务费'
|
|
},{
|
|
field: 'balance',
|
|
title: '实收金额'
|
|
},{
|
|
field: 'price',
|
|
title: '退款金额'
|
|
},{
|
|
field: 'price',
|
|
title: '子订单'
|
|
}, {
|
|
field: 'order_code',
|
|
title: '系统订单号'
|
|
},{
|
|
field: 'transaction_id',
|
|
title: '付款订单号'
|
|
},{
|
|
field: 'price',
|
|
title: '下单时间'
|
|
},{
|
|
field: 'price',
|
|
title: '支付方式'
|
|
},{
|
|
field: 'price',
|
|
title: '状态',
|
|
searchList: {"0":'待审核',"1":'审核通过',"-1":'驳回'}
|
|
},{field: 'operate',
|
|
title: '操作',table: table,formatter: function(value, row, index) {
|
|
return '<button class="btn btn-danger" onclick="deleteRow(' + row.id + ')">Delete</button>';
|
|
}}]
|
|
});
|
|
function deleteRow(id){
|
|
$.ajax({
|
|
url: '/massage/admin/AdminOrder/orderdel', // 替换为你的API端点
|
|
type: 'POST', // 请求类型
|
|
contentType: 'application/json', // 发送信息至服务器时内容编码类型
|
|
data: JSON.stringify({ token: '7c3862613ffb49259ef11800a91c2825',ids:id }), // 将对象转换为JSON字符串
|
|
processData: false, // 不要对data进行处理,因为数据已经是字符串
|
|
dataType: 'json', // 期望从服务器返回的数据类型
|
|
success: function(response) {
|
|
if(response.code==200){
|
|
alert('操作成功')
|
|
$("#table").bootstrapTable("refresh");
|
|
}
|
|
// 请求成功时的回调函数
|
|
console.log('Response:', response);
|
|
},
|
|
error: function(xhr, status, error) {
|
|
// 请求失败时的回调函数
|
|
console.error('Error:', error);
|
|
}
|
|
});
|
|
}
|
|
function delList(){
|
|
var cks=table.bootstrapTable("getSelections");;
|
|
var ids="";
|
|
console.log(cks);
|
|
for(var i=0;i<cks.length;i++){
|
|
console.log(cks[i].id);
|
|
if(cks[i].id){
|
|
ids+=cks[i].id+",";
|
|
}
|
|
}
|
|
console.log(ids);
|
|
deleteRow(ids);
|
|
}
|
|
function searchwrd(){
|
|
$("#table").bootstrapTable("refresh");
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|