增加预约字段

This commit is contained in:
karl 2024-08-08 09:56:28 +08:00
parent 4ca5b458f0
commit df40013b24
9 changed files with 71 additions and 5 deletions

View File

@ -78,6 +78,17 @@
:default-time="['00:00:00', '23:59:59']" :default-time="['00:00:00', '23:59:59']"
end-placeholder="结束日期" end-placeholder="结束日期"
/> />
<el-select
v-model="listQuery.appointment_status"
filterable
placeholder="预约状态"
class="filter-item"
style="width: 120px"
>
<el-option key="" label="请选择" value="" />
<el-option key="1" label="已预约" value="1" />
<el-option key="0" label="未预约" value="0" />
</el-select>
<el-button <el-button
class="filter-item" class="filter-item"
@ -201,6 +212,21 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="预约状态(抖音)" width="80">
<template slot-scope="scope">
<div
style="padding: 1px 5px; border-radius: 3px"
:style="{
color: order_status[scope.row.appointment_status],
border: `1px solid ${order_status[scope.row.appointment_status]}`,
}"
type="primary"
>
{{ scope.row.appointment_status == 1 ? '已预约' : '未预约' }}
</div>
</template>
</el-table-column>
<el-table-column align="center" label="状态" width="80"> <el-table-column align="center" label="状态" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<div <div

View File

@ -32,6 +32,10 @@ class OrderController extends base
$where[] = ['sn','=', $sn]; $where[] = ['sn','=', $sn];
} }
// if (in_array($appointment_status, [0, 1])) {
// $where[] = ['appointment_status', '=', $appointment_status];
// }
$status = $request->get('status', null); $status = $request->get('status', null);
$query = Orders::attimes($timetype, $times)->with(['admin','anchor','backs'])->where($where) $query = Orders::attimes($timetype, $times)->with(['admin','anchor','backs'])->where($where)
@ -51,6 +55,11 @@ class OrderController extends base
$query->where('status', $status); $query->where('status', $status);
} }
$appointment_status = $request->get('appointment_status', null);
if($appointment_status!=null && $appointment_status >= 0) {
$query->where('appointment_status', $appointment_status);
}
$mobile = $request->get('mobile'); $mobile = $request->get('mobile');
if($mobile){ if($mobile){
$query->where('mobile','like', '%'.$mobile.'%'); $query->where('mobile','like', '%'.$mobile.'%');

View File

@ -170,7 +170,6 @@ class Douyin
throw new Exception("抖音拉单{$order->order_id}详情获取失败"); throw new Exception("抖音拉单{$order->order_id}详情获取失败");
} }
$item = new Orders(); $item = new Orders();
$item->os = 3; $item->os = 3;
$item->sn = $order->order_id; $item->sn = $order->order_id;
@ -414,6 +413,30 @@ class Douyin
return $orderDetail->data ?? null; return $orderDetail->data ?? null;
} }
/**
* @param string $orderId
* @return array|null
*/
public function _orderMakeAppointmentStatus(string $orderId)
{
if (empty($orderId)) return [];
$params = [
'page_index' => 1,
'page_size' => 50,
'status' => 3,
'order_id' => $orderId,
'sku_name' => '',
'last_phone' => '',
'category' => [
"third_category_list" => []
]
];
$orderBookingManagement = $this->_curl('/life/trade_view/v1/travel_agency/book/search?root_life_account_id=' . $this->_id(), $params, 'POST');
return $orderBookingManagement->order_list ?? null;
}
public function _orderBookingManagement(string $orderId) public function _orderBookingManagement(string $orderId)
{ {
if (empty($orderId)) return []; if (empty($orderId)) return [];

View File

@ -98,6 +98,14 @@ class Orders {
$it = $dy->get(1, null, null, $order->sn); $it = $dy->get(1, null, null, $order->sn);
if ($it) { if ($it) {
$got = $it[0]; $got = $it[0];
// 查询未预约状态
if ($order->appointment_status != 1) {
$appointment_status = $dy->_orderMakeAppointmentStatus($order->sn);
if ($appointment_status !== null) {
$got['appointment_status'] = 1;
}
}
} }
break; break;

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
.pagination-container[data-v-28fdfbeb]{padding:32px 16px;position:fixed;bottom:0;left:0;width:100%;background:#fff;padding:40px 280px;-webkit-box-shadow:0 -2px 10px rgba(0,0,0,.1);box-shadow:0 -2px 10px rgba(0,0,0,.1);z-index:100}.pagination-container.hidden[data-v-28fdfbeb]{display:none}.app-container[data-v-7e3d35b4]{position:relative;padding-bottom:60px}.el-table[data-v-7e3d35b4],.filter-container[data-v-7e3d35b4]{padding-bottom:5px} .pagination-container[data-v-28fdfbeb]{padding:32px 16px;position:fixed;bottom:0;left:0;width:100%;background:#fff;padding:40px 280px;-webkit-box-shadow:0 -2px 10px rgba(0,0,0,.1);box-shadow:0 -2px 10px rgba(0,0,0,.1);z-index:100}.pagination-container.hidden[data-v-28fdfbeb]{display:none}.app-container[data-v-56348a28]{position:relative;padding-bottom:60px}.el-table[data-v-56348a28],.filter-container[data-v-56348a28]{padding-bottom:5px}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long