This commit is contained in:
jianghanbo 2024-08-08 21:08:23 +08:00
parent df40013b24
commit abc1738bdf
73 changed files with 412 additions and 44 deletions

View File

@ -6,7 +6,7 @@
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="getList"> <el-button class="filter-item" type="primary" icon="el-icon-search" @click="getList">
搜索 搜索
</el-button> </el-button>
<el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-circle-plus" @click="handleCreate({})"> <el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-circle-plus" @click="handleCreate({routes:[]})">
添加 添加
</el-button> </el-button>
</div> </div>
@ -122,7 +122,32 @@
<el-form-item label="产品ID"> <el-form-item label="产品ID">
<el-input v-model="item.product_ids" type="textarea" /> <el-input v-model="item.product_ids" type="textarea" />
<el-label style="color: red;font-size: 11px;">多个用英文逗号隔开例如: 384731,2328</el-label> <span style="color: red;font-size: 11px;">多个用英文逗号隔开例如: 384731,2328</span>
</el-form-item>
<!-- <el-form-item label="路线">
<el-checkbox-group v-model="item.routes">
<el-checkbox label="复选框 A">111</el-checkbox>
<el-checkbox label="复选框 B">2222</el-checkbox>
<el-checkbox label="复选框 C">3333</el-checkbox>
<el-checkbox label="禁用" disabled></el-checkbox>
<el-checkbox label="选中且禁用" disabled></el-checkbox>
</el-checkbox-group>
</el-form-item> -->
<!-- <el-form-item label="路线">
<el-select multiple v-model="item.routes" filterable placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item label="路线">
<el-radio-group v-model="item.route_type">
<el-radio :label="10">境内跟团</el-radio>
<el-radio :label="20">境外跟团</el-radio>
</el-radio-group>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -189,7 +214,26 @@ export default {
}, },
dialogVisible: false, dialogVisible: false,
dialogWork: false, dialogWork: false,
item: {} item: {
btn:[]
},
route_type: '',
// options: [{
// value: '1',
// label: '线1'
// }, {
// value: '2',
// label: '线2'
// }, {
// value: '3',
// label: '线3'
// }, {
// value: '4',
// label: '线4'
// }, {
// value: '5',
// label: '线5'
// }],
} }
}, },
created() { created() {

View File

@ -27,6 +27,14 @@
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="getList"> <el-button class="filter-item" type="primary" icon="el-icon-search" @click="getList">
搜索 搜索
</el-button> </el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-search"
@click="getList(1)"
>
导出
</el-button>
</div> </div>
<el-table v-loading="listLoading" :data="list" border fit highlight-current-row style="width: 100%"> <el-table v-loading="listLoading" :data="list" border fit highlight-current-row style="width: 100%">
@ -90,13 +98,45 @@ export default {
this.getList() this.getList()
}, },
methods: { methods: {
getList() { getList(is_excel) {
if (is_excel == 1) {
this.listQuery.excel = 1;
if (!this.listQuery.times) {
this.$message({
message: "请选择日期",
type: "warning",
});
return;
}
const isdate = this.listQuery.times[0] instanceof Date;
const params = {
...this.listQuery,
times: [
isdate ? this.listQuery.times[0].toISOString() : "",
isdate ? this.listQuery.times[1].toISOString() : "",
],
};
window.open("/admin/data/index?" + this.objectToQuery(params));
return;
}
this.listQuery.excel = 0;
this.$axios.get('/admin/data/index', { params: this.listQuery }).then(response => { this.$axios.get('/admin/data/index', { params: this.listQuery }).then(response => {
this.list = response.data this.list = response.data
this.oss = response.ext.oss this.oss = response.ext.oss
this.listLoading = false this.listLoading = false
}) })
} },
objectToQuery(obj) {
return Object.keys(obj)
.map((key) => {
const value = obj[key];
if (value == undefined || value == null) return "";
return encodeURIComponent(key) + "=" + encodeURIComponent(value);
})
.join("&");
},
} }
} }
</script> </script>

View File

@ -40,6 +40,11 @@
<span>{{ scope.row.last_work_time | parseTime('{y}-{m}-{d} {h}:{i}') }}</span> <span>{{ scope.row.last_work_time | parseTime('{y}-{m}-{d} {h}:{i}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="138px" align="center" label="路线">
<template slot-scope="scope">
<span>{{ scope.row.last_work_time | parseTime('{y}-{m}-{d} {h}:{i}') }}</span>
</template>
</el-table-column>
</el-table> </el-table>
</div> </div>
</template> </template>

View File

@ -7,6 +7,12 @@
style="width: 200px" style="width: 200px"
class="filter-item" class="filter-item"
/> />
<el-input
v-model="listQuery.product_name"
placeholder="标题"
style="width: 200px"
class="filter-item"
/>
<el-input <el-input
v-model="listQuery.mobile" v-model="listQuery.mobile"
@ -747,10 +753,10 @@ export default {
resetForm(formName) { resetForm(formName) {
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
}, },
getAdminList() { getAdminList(typeDesc = '') {
this.$axios this.$axios
.get("/admin/admin/index", { .get("/admin/admin/index", {
params: { limit: 100, status: 1, is_order: 1 }, params: { limit: 100, status: 1, is_order: 1, type_desc:typeDesc },
}) })
.then((response) => { .then((response) => {
this.adminList = response.data.data; this.adminList = response.data.data;
@ -759,6 +765,7 @@ export default {
.catch((err) => {}); .catch((err) => {});
}, },
onCirculation(item) { onCirculation(item) {
this.getAdminList(item.category_desc);
this.applyVisible = true; this.applyVisible = true;
this.item3 = { ...item, os: Number(item.os) }; this.item3 = { ...item, os: Number(item.os) };
console.log(this.item3); console.log(this.item3);

View File

@ -25,6 +25,15 @@
搜索 搜索
</el-button> </el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-search"
@click="getList(1)"
>
导出
</el-button>
</div> </div>
<el-table v-loading="listLoading" :data="list" border highlight-current-row style="width: 100%"> <el-table v-loading="listLoading" :data="list" border highlight-current-row style="width: 100%">
@ -159,9 +168,32 @@ export default {
this.getList() this.getList()
}, },
methods: { methods: {
getList() { getList(is_excel) {
if (is_excel == 1) {
this.listQuery.excel = 1;
console.log('l:' + this.listQuery.times)
if (!this.listQuery.times) {
this.$message({
message: "请选择日期",
type: "warning",
});
return;
}
const isdate = this.listQuery.times[0] instanceof Date;
const params = {
...this.listQuery,
times: [
isdate ? this.listQuery.times[0].toISOString() : "",
isdate ? this.listQuery.times[1].toISOString() : "",
],
};
window.open("/admin/index/productNameList?" + this.objectToQuery(params));
return;
}
this.listQuery.excel = 0;
this.$axios.get('/admin/index/productNameList', { params: this.listQuery }).then(response => { this.$axios.get('/admin/index/productNameList', { params: this.listQuery }).then(response => {
console.log(response)
this.listLoading = false this.listLoading = false
console.log(this.listLoading) console.log(this.listLoading)
this.list = response.data.data this.list = response.data.data
@ -171,6 +203,15 @@ export default {
}).catch(() => { }).catch(() => {
}) })
},
objectToQuery(obj) {
return Object.keys(obj)
.map((key) => {
const value = obj[key];
if (value == undefined || value == null) return "";
return encodeURIComponent(key) + "=" + encodeURIComponent(value);
})
.join("&");
} }
} }
} }

View File

@ -10,6 +10,8 @@ use support\Redis;
class AdminController extends base class AdminController extends base
{ {
const ROUTE_LISTS = ['境内' => 10, '境外' => 20];
public function Index(Request $request) { public function Index(Request $request) {
$query = Admins::order('status', 'desc')->order('id', 'desc'); $query = Admins::order('status', 'desc')->order('id', 'desc');
@ -22,12 +24,17 @@ class AdminController extends base
if($is_order = $request->get('is_order')) { if($is_order = $request->get('is_order')) {
$query->where('is_order', $is_order); $query->where('is_order', $is_order);
} }
Log::info('type_desc:' . $request->get('type_desc'));
if($typeDesc = $request->get('type_desc')) {
$routeType = self::ROUTE_LISTS[mb_substr($typeDesc, 0, 2)] ?? 10;
$query->where('route_type', $routeType);
}
$list = $query->paginate($request->get('limit',10)); $list = $query->paginate($request->get('limit',10));
return $this->success($list->hidden(['password','remember_token']),null,['oss' => Orders::OSS]); return $this->success($list->hidden(['password','remember_token']),null,['oss' => Orders::OSS]);
} }
public function edit(Request $request) { public function edit(Request $request) {
$id = $request->get('id', 0); $id = $request->get('id', 0);
$info = (new Admins())->find($id); $info = (new Admins())->find($id);
@ -64,6 +71,7 @@ class AdminController extends base
$is_anchor = $request->post('is_anchor',0); $is_anchor = $request->post('is_anchor',0);
$is_franchisee = $request->post('is_franchisee',0); $is_franchisee = $request->post('is_franchisee',0);
$product_ids = $request->post('product_ids',''); $product_ids = $request->post('product_ids','');
$routeType = $request->post('route_type','10');
if($id) { if($id) {
$item = (new Admins())->find($id); $item = (new Admins())->find($id);
@ -103,8 +111,10 @@ class AdminController extends base
$item->is_anchor = $is_anchor; $item->is_anchor = $is_anchor;
$item->is_franchisee = $is_franchisee; $item->is_franchisee = $is_franchisee;
$item->product_ids = $product_ids; $item->product_ids = $product_ids;
$item->route_type = $routeType;
Log::info('logs:' . json_encode($item));
$back = $item->save(); $back = $item->save();
if($back) if($back)
return $this->success($item->hidden(['password','remember_token'])); return $this->success($item->hidden(['password','remember_token']));
return $this->error(2003, '写入数据库错误'); return $this->error(2003, '写入数据库错误');
} }

View File

@ -41,6 +41,10 @@ class DataController extends base
o.admin_id,a.name'); o.admin_id,a.name');
if($times) { if($times) {
if (is_string($times)) {
$times = explode(',', $times);
}
Log::info('proudct times2222:' . json_encode($times));
$query->whereBetween('o.create_at',[strtotime($times[0])*1000,strtotime($times[1])*1000+999]); $query->whereBetween('o.create_at',[strtotime($times[0])*1000,strtotime($times[1])*1000+999]);
} }
if($os) { if($os) {
@ -81,6 +85,56 @@ class DataController extends base
$totalArr[1]['write_rate_price'] = (float)number_format(($totalArr[1]['asset_price']/$totalArr[1]['total_price'])*100,2); $totalArr[1]['write_rate_price'] = (float)number_format(($totalArr[1]['asset_price']/$totalArr[1]['total_price'])*100,2);
$list = array_merge($list->toArray(), $totalArr); $list = array_merge($list->toArray(), $totalArr);
$excel = $request->get('excel');
if($excel == 1) {
$writer = new \XLSXWriter();
$writer->writeSheetHeader('跟进统计', [
'姓名' => 'string',
'订单数' => 'string',
'订单总金额' => 'price',
'核销数' => 'integer',
'核销金额' => 'price',
'未付款订单' => 'integer',
'未付款金额' => 'price',
'核销率(按订单)' => 'string',
'退款率' => 'string',
]);
$osList = [
1 => '美团',
2 => '快手',
3 => '抖音',
];
bcscale(2);
$list = array_values($list);
Log::info('lists:' . json_encode($list));
foreach($list as $val) {
$writer->writeSheetRow('跟进统计', [
$val['admin']['name'],
$val['orders'],
bcdiv($val['total_price'], 100),
$val['assets'],
bcdiv($val['asset_price'], 100),
$val['nopays'],
bcdiv($val['nopay_price'], 100),
$val['write_rate'] . '%',
$val['write_rate_price'] . '%',
]);
}
$file_name = "跟进统计-".date('Ymd-His').".xlsx";
$response = response();
$c = $writer->writeToString();
$response->withHeaders([
'Content-Type' => 'application/force-download',
'Content-Disposition' => 'attachment; filename="'.$file_name.'"',
'Content-Transfer-Encoding' => 'binary',
'Cache-Control' => 'max-age=0',
])->withBody($c);
return $response;
}
return $this->success(array_values($list), null, ['oss' => Orders::OSS]); return $this->success(array_values($list), null, ['oss' => Orders::OSS]);
} }
@ -93,7 +147,7 @@ class DataController extends base
$online = new Onlines(); $online = new Onlines();
$list = $online->online($admin, $times); $list = $online->online($admin, $times);
return $this->success($list); return $this->success($list);
} }
@ -134,7 +188,7 @@ class DataController extends base
$end = date('Ymd', strtotime($times[1])); $end = date('Ymd', strtotime($times[1]));
$query->whereBetween('date',[$start,$end]); $query->whereBetween('date',[$start,$end]);
} }
$list = $query->paginate($request->get('limit')); $list = $query->paginate($request->get('limit'));
return $this->success($list); return $this->success($list);

View File

@ -314,6 +314,9 @@ class IndexController extends base
} }
if($times) { if($times) {
if (is_string($times)) {
$times = explode(',', $times);
}
$list = $list->whereBetween('create_at',[strtotime($times[0])*1000,strtotime($times[1])*1000+999]); $list = $list->whereBetween('create_at',[strtotime($times[0])*1000,strtotime($times[1])*1000+999]);
} }
@ -324,6 +327,66 @@ class IndexController extends base
$list = $list->where('product_name','like','%'.$product_name.'%'); $list = $list->where('product_name','like','%'.$product_name.'%');
} }
$excel = $request->get('excel');
if($excel == 1) {
$orderProducts = $list->select();
$writer = new \XLSXWriter();
$writer->writeSheetHeader('产品列表', [
'产品名称' => 'string',
'平台' => 'string',
'订单数' => 'integer',
'订单金额' => 'price',
'待更进' => 'integer',
'跟进中' => 'integer',
'待使用' => 'integer',
'待使用金额' => 'price',
'核销数' => 'integer',
'核销金额' => 'price',
'退款数' => 'integer',
'退款金额' => 'price',
'核销率' => 'string',
'退款率' => 'string',
]);
$osList = [
1 => '美团',
2 => '快手',
3 => '抖音',
];
bcscale(2);
foreach($orderProducts as $product) {
$writer->writeSheetRow('产品列表', [
$product->product_name,
$osList[$product->os] ?? '',
$product->all,
bcdiv($product->total, 100),
$product->wait,
$product->doing,
$product->tobeused,
bcdiv($product->tobeused_price, 100),
$product->asset,
bcdiv($product->asset_price, 100),
$product->refund,
bcdiv($product->refund_price, 100),
number_format(($product['asset']/$product['all'])*100,2) . '%',
number_format(($product['refund']/$product['all'])*100,2) . '%',
]);
}
$file_name = "产品统计-".date('Ymd-His').".xlsx";
$response = response();
$c = $writer->writeToString();
$response->withHeaders([
'Content-Type' => 'application/force-download',
'Content-Disposition' => 'attachment; filename="'.$file_name.'"',
'Content-Transfer-Encoding' => 'binary',
'Cache-Control' => 'max-age=0',
])->withBody($c);
return $response;
}
$list = $list->paginate($limit)->toArray(); $list = $list->paginate($limit)->toArray();
foreach ($list['data'] as &$item) { foreach ($list['data'] as &$item) {

View File

@ -7,6 +7,8 @@ use app\model\Backs;
use app\model\Follows; use app\model\Follows;
use app\model\Orders; use app\model\Orders;
use app\model\Logs; use app\model\Logs;
use app\model\ThirdMobileLogs;
use app\server\AliCloudApiService;
use app\server\Orders as ServerOrders; use app\server\Orders as ServerOrders;
use stdClass; use stdClass;
use support\Log; use support\Log;
@ -22,12 +24,12 @@ class OrderController extends base
$timetype = $request->get('timetype'); $timetype = $request->get('timetype');
$times = $request->get('times'); $times = $request->get('times');
$os_status = $request->get('os_status'); $os_status = $request->get('os_status');
$where = []; $where = [];
if(!$request->admin->is_super) { if(!$request->admin->is_super) {
$where = [['admin_id','=', $request->admin->id]]; $where = [['admin_id','=', $request->admin->id]];
} }
if($sn) { if($sn) {
$where[] = ['sn','=', $sn]; $where[] = ['sn','=', $sn];
} }
@ -38,7 +40,7 @@ class OrderController extends base
$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', 'mobileInfo'])->where($where)
->order('create_at','desc') ->order('create_at','desc')
->order('update_time','desc') ->order('update_time','desc')
->order('id','desc'); ->order('id','desc');
@ -50,7 +52,7 @@ class OrderController extends base
$query->where('os', $os_status[0] ?? 0 )->where('order_status', $os_status[1] ?? 0); $query->where('os', $os_status[0] ?? 0 )->where('order_status', $os_status[1] ?? 0);
} }
} }
if($status!=null && $status >= 0) { if($status!=null && $status >= 0) {
$query->where('status', $status); $query->where('status', $status);
} }
@ -65,6 +67,11 @@ class OrderController extends base
$query->where('mobile','like', '%'.$mobile.'%'); $query->where('mobile','like', '%'.$mobile.'%');
} }
$productName = $request->get('product_name');
if($productName){
$query->where('product_name','like', '%'.$productName.'%');
}
$zhubo = $request->get('zhubo'); $zhubo = $request->get('zhubo');
if($zhubo){ if($zhubo){
$zhubo_id = Admins::where('username', $zhubo)->value('id'); $zhubo_id = Admins::where('username', $zhubo)->value('id');
@ -118,6 +125,22 @@ class OrderController extends base
$list = $orders->visible(['admin' => ['username','name','avatar']])->hidden(['check_sn'])->append(['order_status_name','status_name','os_name']); $list = $orders->visible(['admin' => ['username','name','avatar']])->hidden(['check_sn'])->append(['order_status_name','status_name','os_name']);
foreach ($list as &$value) {
$mobileInfo = $value['mobileInfo'] ?? '';
if (empty($value['mobileInfo'])) {
try {
$mobileInfo = (new AliCloudApiService())->getMobileArea($value['mobile']);
} catch (\Exception $exception) {
$mobileInfo = [];
Log::info('查询手机归属地失败:' . $exception->getMessage());
}
}
if (!empty($mobileInfo)) {
$value['mobile'] = $value['mobile'] . sprintf('(%s-%s)', $mobileInfo['area'], $mobileInfo['originalIsp']);
}
}
$_oss = []; $_oss = [];
$_oss[] = []; $_oss[] = [];
foreach (Orders::OSS as $key=>$os) { foreach (Orders::OSS as $key=>$os) {
@ -139,13 +162,13 @@ class OrderController extends base
$_oss[$key]['children'] = $_ch; $_oss[$key]['children'] = $_ch;
} }
return $this->success($list,null,['timetype'=> Orders::timeType, 'oss' => $_oss]); return $this->success($list,null,['timetype'=> Orders::timeType, 'oss' => $_oss]);
} }
public function all(Request $request) { public function all(Request $request) {
$sn = $request->get('sn'); $sn = $request->get('sn');
if($sn) { if($sn) {
$where[] = ['sn','=', $sn]; $where[] = ['sn','=', $sn];
} }
@ -306,7 +329,7 @@ class OrderController extends base
if(empty($has)) { if(empty($has)) {
Logs::pass2($request->admin->id, $check_sn); Logs::pass2($request->admin->id, $check_sn);
} }
//通过命令行核销订单 //通过命令行核销订单
Redis::LPUSH('Travel:Order:check:lits',json_encode([ Redis::LPUSH('Travel:Order:check:lits',json_encode([
'admin_id' => $request->admin->id, 'admin_id' => $request->admin->id,
@ -320,11 +343,11 @@ class OrderController extends base
public function backlist(Request $request) { public function backlist(Request $request) {
$sn = $request->get('sn'); $sn = $request->get('sn');
$status = $request->get('status',null); $status = $request->get('status',null);
$query = Backs::with(['into','outto','orders','apply'])->where(function($query) use($request) { $query = Backs::with(['into','outto','orders','apply'])->where(function($query) use($request) {
$query->where('admin_id', $request->admin->id)->WhereOr('admin', $request->admin->id); $query->where('admin_id', $request->admin->id)->WhereOr('admin', $request->admin->id);
})->order('update_time','desc')->order('id','desc'); })->order('update_time','desc')->order('id','desc');
if($sn) { if($sn) {
$order_id = Orders::where('sn', $sn)->value('id'); $order_id = Orders::where('sn', $sn)->value('id');
$query->where('order_id', $order_id); $query->where('order_id', $order_id);
@ -333,7 +356,7 @@ class OrderController extends base
if($status != null) { if($status != null) {
$query->where('status', $status); $query->where('status', $status);
} }
$backs = $query->paginate($request->get('limit',10)); $backs = $query->paginate($request->get('limit',10));
foreach($backs as &$back){ foreach($backs as &$back){
if ($back->admin_id == $request->admin->id || $back->admin == $request->admin->id){ if ($back->admin_id == $request->admin->id || $back->admin == $request->admin->id){

View File

@ -150,4 +150,8 @@ class Orders extends base
}); });
} }
public function mobileInfo()
{
return $this->hasOne(ThirdMobileLogs::class, 'mobile', 'mobile');
}
} }

View File

@ -0,0 +1,8 @@
<?php
namespace app\model;
use think\facade\Db;
class ThirdMobileLogs extends base
{
}

View File

@ -0,0 +1,69 @@
<?php
namespace app\server;
use app\model\ThirdMobileLogs;
use support\Log;
/**
* 阿里云市场相关接口
*/
class AliCloudApiService {
/**
* @param $mobile
* @return array|mixed
* @throws \think\db\exception\BindParamException
*/
public function getMobileArea($mobile) {
$host = "https://jumcvit.market.alicloudapi.com";
$path = "/mobile/area";
$method = "POST";
$appcode = "4402db67815049c18a55a996b5644f5b";
$headers = array();
array_push($headers, "Authorization:APPCODE " . $appcode);
//根据API的要求定义相对应的Content-Type
array_push($headers, "Content-Type".":"."application/x-www-form-urlencoded; charset=UTF-8");
$bodys = "mobile_number=" . $mobile;
$url = $host . $path;
$aliData = $this->curlRequest($url, $method, $headers, $bodys);
Log::info("查询手机归属地{$mobile}" . json_encode($aliData));
if (isset($aliData['code']) && $aliData['code'] == 200) {
ThirdMobileLogs::query()->insert([
'mobile' => $mobile,
'area' => $aliData['data']['area'],
'originalIsp' => $aliData['data']['originalIsp'],
]);
}
return $aliData['data'] ?? [];
}
/**
* @param $url
* @param $method
* @param $headers
* @param $bodys
* @return mixed
*/
private function curlRequest($url, $method, $headers, $bodys){
$curl = curl_init();
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_FAILONERROR, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
//设定返回信息中是否包含响应信息头启用时会将响应信息头作为数据流输出true 表示输出信息头, false表示不输出信息头
//如果想将响应结果json字符串转为json数组建议将 CURLOPT_HEADER 设置成 false
curl_setopt($curl, CURLOPT_HEADER, true);
if (1 == strpos("$".$url, "https://"))
{
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
}
curl_setopt($curl, CURLOPT_POSTFIELDS, $bodys);
curl_close($curl);
list($header, $body) = explode("\r\n\r\n", curl_exec($curl), 2);
Log::info("查询手机归属地1" . $body);
return json_decode($body, true);
}
}

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-6af90fbe]{position:relative;padding-bottom:60px}.el-table[data-v-6af90fbe],.filter-container[data-v-6af90fbe]{padding-bottom:52px} .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-c2b91c36]{position:relative;padding-bottom:60px}.el-table[data-v-c2b91c36],.filter-container[data-v-c2b91c36]{padding-bottom:52px}

View File

@ -0,0 +1 @@
.app-container[data-v-45d18cae]{position:relative;padding-bottom:60px}.el-table[data-v-45d18cae],.filter-container[data-v-45d18cae]{padding-bottom:52px}.search[data-v-45d18cae]{margin-left:10px}

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-56348a28]{position:relative;padding-bottom:60px}.el-table[data-v-56348a28],.filter-container[data-v-56348a28]{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-4d1caf76]{position:relative;padding-bottom:60px}.el-table[data-v-4d1caf76],.filter-container[data-v-4d1caf76]{padding-bottom:5px}

View File

@ -1 +0,0 @@
.app-container[data-v-2926b996]{position:relative;padding-bottom:60px}.el-table[data-v-2926b996],.filter-container[data-v-2926b996]{padding-bottom:52px}.search[data-v-2926b996]{margin-left:10px}

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

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

View File

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-24cd5960"],{"5c7c":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"app-container"},[n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.list,border:"",fit:"","highlight-current-row":""}},[n("el-table-column",{attrs:{align:"center",label:"ID",width:"60",prop:"id"}}),n("el-table-column",{attrs:{align:"center",label:"姓名",width:"80",prop:"username"}}),n("el-table-column",{attrs:{align:"center",label:"状态",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[0===e.row.isOnline?n("el-tag",{attrs:{type:"border-card"}},[t._v("下线")]):t._e(),1===e.row.isOnline?n("el-tag",{attrs:{type:"success"}},[t._v("在线")]):t._e(),2===e.row.isOnline?n("el-tag",{attrs:{type:"info"}},[t._v("没上线")]):t._e()]}}])}),n("el-table-column",{attrs:{align:"center",label:"是否分单",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-switch",{attrs:{"active-value":1,"inactive-value":0},on:{change:function(n){return t.updateStatus(e.row)}},model:{value:e.row.isEndWork,callback:function(n){t.$set(e.row,"isEndWork",n)},expression:"scope.row.isEndWork"}})]}}])}),n("el-table-column",{attrs:{align:"center",label:"在线时长",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(Math.floor((e.row.data?e.row.data.onlineTime:e.row.onlineTime)/60)||"--")+" 分钟 ")]}}])}),n("el-table-column",{attrs:{width:"138px",align:"center",label:"上线时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("parseTime")(e.row.start_work_time,"{y}-{m}-{d} {h}:{i}")))])]}}])}),n("el-table-column",{attrs:{width:"138px",align:"center",label:"停止分单时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("parseTime")(e.row.end_work_time,"{y}-{m}-{d} {h}:{i}")))])]}}])}),n("el-table-column",{attrs:{width:"138px",align:"center",label:"下线时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("parseTime")(e.row.last_work_time,"{y}-{m}-{d} {h}:{i}")))])]}}])}),n("el-table-column",{attrs:{width:"138px",align:"center",label:"路线"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("parseTime")(e.row.last_work_time,"{y}-{m}-{d} {h}:{i}")))])]}}])})],1)],1)},a=[],l={name:"GetOnlineList",components:{},data:function(){return{statusArr:{0:"禁用",1:"启用"},list:[],total:0,loading:!1,listLoading:!0,listQuery:{page:1,limit:10,status:null,content:""},dialogCreate:!1,dialogEdit:!1,item:{},anchors:{}}},created:function(){this.listQuery.status=this.$route.query.status||null,this.listQuery.content=this.$route.query.content||null,this.getOnlineList()},methods:{getOnlineList:function(){var t=this;this.listLoading=!0,this.$axios.get("/admin/admin/getOnlineList",{params:this.listQuery}).then((function(e){t.list=e.data,t.listLoading=!1})).catch((function(){t.listLoading=!1}))},updateStatus:function(t){var e=this;this.$axios.post("/admin/admin/editInfo",{id:t.id,order_num:t.order_num,is_order:t.isEndWork}).then((function(){e.getOnlineList()})).catch((function(){}))}}},s=l,r=(n("89a4"),n("2877")),o=Object(r["a"])(s,i,a,!1,null,"45d18cae",null);e["default"]=o.exports},"89a4":function(t,e,n){"use strict";n("d4f7")},d4f7:function(t,e,n){}}]);

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

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0de3a1"],{"856d":function(t,e,l){"use strict";l.r(e);var i=function(){var t=this,e=t.$createElement,l=t._self._c||e;return l("div",{staticClass:"app-container"},[l("div",{staticClass:"filter-container"},[l("el-date-picker",{staticClass:"filter-item",attrs:{type:"datetimerange","default-time":["00:00:00","23:59:59"],"range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.listQuery.times,callback:function(e){t.$set(t.listQuery,"times",e)},expression:"listQuery.times"}}),l("el-select",{staticClass:"filter-item",attrs:{filterable:"",placeholder:"请选择"},model:{value:t.listQuery.os,callback:function(e){t.$set(t.listQuery,"os",e)},expression:"listQuery.os"}},[l("el-option",{key:"",attrs:{label:"请选择",value:""}}),t._l(t.oss,(function(t,e){return l("el-option",{key:e,attrs:{label:t,value:e}})}))],2),l("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:t.getList}},[t._v(" 搜索 ")]),l("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:function(e){return t.getList(1)}}},[t._v(" 导出 ")])],1),l("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.list,border:"",fit:"","highlight-current-row":""}},[l("el-table-column",{attrs:{align:"center",fixed:"",label:"姓名",width:"120",prop:"admin.name"}}),l("el-table-column",{attrs:{align:"center",label:"订单数",width:"120",prop:"orders"}}),l("el-table-column",{attrs:{align:"center",label:"订单总金额"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.total_price/100)+" ")]}}])}),l("el-table-column",{attrs:{align:"center",label:"核销数",width:"120",prop:"assets"}}),l("el-table-column",{attrs:{align:"center",label:"核销金额"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.asset_price/100)+" ")]}}])}),l("el-table-column",{attrs:{align:"center",label:"未付款订单",width:"120",prop:"nopays"}}),l("el-table-column",{attrs:{align:"center",label:"未付款金额"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.nopay_price/100)+" ")]}}])}),l("el-table-column",{attrs:{align:"center",label:"核销率(按订单)",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.write_rate)+"% ")]}}])}),l("el-table-column",{attrs:{align:"center",width:"180",label:"核销率(按销售额)"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.write_rate_price)+"% ")]}}])})],1)],1)},a=[],s=l("5530"),n=(l("a15b"),l("d81d"),l("b64b"),{name:"Datalist",data:function(){return{oss:null,list:[],listLoading:!0,listQuery:{}}},created:function(){this.getList()},methods:{getList:function(t){var e=this;if(1!=t)this.listQuery.excel=0,this.$axios.get("/admin/data/index",{params:this.listQuery}).then((function(t){e.list=t.data,e.oss=t.ext.oss,e.listLoading=!1}));else{if(this.listQuery.excel=1,!this.listQuery.times)return void this.$message({message:"请选择日期",type:"warning"});var l=this.listQuery.times[0]instanceof Date,i=Object(s["a"])(Object(s["a"])({},this.listQuery),{},{times:[l?this.listQuery.times[0].toISOString():"",l?this.listQuery.times[1].toISOString():""]});window.open("/admin/data/index?"+this.objectToQuery(i))}},objectToQuery:function(t){return Object.keys(t).map((function(e){var l=t[e];return void 0==l||null==l?"":encodeURIComponent(e)+"="+encodeURIComponent(l)})).join("&")}}}),r=n,o=l("2877"),c=Object(o["a"])(r,i,a,!1,null,null,null);e["default"]=c.exports}}]);

View File

@ -1 +0,0 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0de3a1"],{"856d":function(t,e,l){"use strict";l.r(e);var a=function(){var t=this,e=t.$createElement,l=t._self._c||e;return l("div",{staticClass:"app-container"},[l("div",{staticClass:"filter-container"},[l("el-date-picker",{staticClass:"filter-item",attrs:{type:"datetimerange","default-time":["00:00:00","23:59:59"],"range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.listQuery.times,callback:function(e){t.$set(t.listQuery,"times",e)},expression:"listQuery.times"}}),l("el-select",{staticClass:"filter-item",attrs:{filterable:"",placeholder:"请选择"},model:{value:t.listQuery.os,callback:function(e){t.$set(t.listQuery,"os",e)},expression:"listQuery.os"}},[l("el-option",{key:"",attrs:{label:"请选择",value:""}}),t._l(t.oss,(function(t,e){return l("el-option",{key:e,attrs:{label:t,value:e}})}))],2),l("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:t.getList}},[t._v(" 搜索 ")])],1),l("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.list,border:"",fit:"","highlight-current-row":""}},[l("el-table-column",{attrs:{align:"center",fixed:"",label:"姓名",width:"120",prop:"admin.name"}}),l("el-table-column",{attrs:{align:"center",label:"订单数",width:"120",prop:"orders"}}),l("el-table-column",{attrs:{align:"center",label:"订单总金额"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.total_price/100)+" ")]}}])}),l("el-table-column",{attrs:{align:"center",label:"核销数",width:"120",prop:"assets"}}),l("el-table-column",{attrs:{align:"center",label:"核销金额"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.asset_price/100)+" ")]}}])}),l("el-table-column",{attrs:{align:"center",label:"未付款订单",width:"120",prop:"nopays"}}),l("el-table-column",{attrs:{align:"center",label:"未付款金额"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.nopay_price/100)+" ")]}}])}),l("el-table-column",{attrs:{align:"center",label:"核销率(按订单)",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.write_rate)+"% ")]}}])}),l("el-table-column",{attrs:{align:"center",width:"180",label:"核销率(按销售额)"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.write_rate_price)+"% ")]}}])})],1)],1)},s=[],i={name:"Datalist",data:function(){return{oss:null,list:[],listLoading:!0,listQuery:{}}},created:function(){this.getList()},methods:{getList:function(){var t=this;this.$axios.get("/admin/data/index",{params:this.listQuery}).then((function(e){t.list=e.data,t.oss=e.ext.oss,t.listLoading=!1}))}}},n=i,r=l("2877"),o=Object(r["a"])(n,a,s,!1,null,null,null);e["default"]=o.exports}}]);

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

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

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

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

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

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f14cda0a"],{4697:function(t,e,n){},"5c7c":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"app-container"},[n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.list,border:"",fit:"","highlight-current-row":""}},[n("el-table-column",{attrs:{align:"center",label:"ID",width:"60",prop:"id"}}),n("el-table-column",{attrs:{align:"center",label:"姓名",width:"80",prop:"username"}}),n("el-table-column",{attrs:{align:"center",label:"状态",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[0===e.row.isOnline?n("el-tag",{attrs:{type:"border-card"}},[t._v("下线")]):t._e(),1===e.row.isOnline?n("el-tag",{attrs:{type:"success"}},[t._v("在线")]):t._e(),2===e.row.isOnline?n("el-tag",{attrs:{type:"info"}},[t._v("没上线")]):t._e()]}}])}),n("el-table-column",{attrs:{align:"center",label:"是否分单",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-switch",{attrs:{"active-value":1,"inactive-value":0},on:{change:function(n){return t.updateStatus(e.row)}},model:{value:e.row.isEndWork,callback:function(n){t.$set(e.row,"isEndWork",n)},expression:"scope.row.isEndWork"}})]}}])}),n("el-table-column",{attrs:{align:"center",label:"在线时长",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(Math.floor((e.row.data?e.row.data.onlineTime:e.row.onlineTime)/60)||"--")+" 分钟 ")]}}])}),n("el-table-column",{attrs:{width:"138px",align:"center",label:"上线时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("parseTime")(e.row.start_work_time,"{y}-{m}-{d} {h}:{i}")))])]}}])}),n("el-table-column",{attrs:{width:"138px",align:"center",label:"停止分单时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("parseTime")(e.row.end_work_time,"{y}-{m}-{d} {h}:{i}")))])]}}])}),n("el-table-column",{attrs:{width:"138px",align:"center",label:"下线时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(t._f("parseTime")(e.row.last_work_time,"{y}-{m}-{d} {h}:{i}")))])]}}])})],1)],1)},a=[],l={name:"GetOnlineList",components:{},data:function(){return{statusArr:{0:"禁用",1:"启用"},list:[],total:0,loading:!1,listLoading:!0,listQuery:{page:1,limit:10,status:null,content:""},dialogCreate:!1,dialogEdit:!1,item:{},anchors:{}}},created:function(){this.listQuery.status=this.$route.query.status||null,this.listQuery.content=this.$route.query.content||null,this.getOnlineList()},methods:{getOnlineList:function(){var t=this;this.listLoading=!0,this.$axios.get("/admin/admin/getOnlineList",{params:this.listQuery}).then((function(e){t.list=e.data,t.listLoading=!1})).catch((function(){t.listLoading=!1}))},updateStatus:function(t){var e=this;this.$axios.post("/admin/admin/editInfo",{id:t.id,order_num:t.order_num,is_order:t.isEndWork}).then((function(){e.getOnlineList()})).catch((function(){}))}}},s=l,o=(n("c1db"),n("2877")),r=Object(o["a"])(s,i,a,!1,null,"2926b996",null);e["default"]=r.exports},c1db:function(t,e,n){"use strict";n("4697")}}]);