问题描述:
平台商城订单列表导出的订单数据异常。
解决方法:
1、找到这个文件:view/admin目录下源码
路径:src/pages/order/orderList/orderlistDetails.vue 。修改 data 选项中 currentTab 值为 0 。

2、修改完毕需要重新打包admin
打包文档:
https://doc.crmeb.com/pro/crmebprov3_3/27364
3、修改php代码
文件:app/controller/admin/v1/other/export/ExportExcel.php
方法:storeOrder
public function storeOrder(StoreOrderServices $services, SystemRegionAgentServices $regionAgentServices)
{
$where_tmp = $this->request->getMore([
['status', ''],
['real_name', ''],
['is_del', ''],
['data', '', '', 'time'],
['pay_time', ''],
['take_time', ''], //收货时间
['deliveryType', ''], //1 快递、2 商家配送、3 UU、4 达达、5 无需配送、6到店核销
['interval_price_min', ''],
['interval_price_max', ''],
['type', ''],
['export_type', ''],
['pay_type', ''],
['plat_type', -1],
['order', ''],
['field_key', ''],
['store_id', ''],
['supplier_id', ''],
['ids', ''],
['product_type', ''],
['order_type', ''],
]);
//门店订单参数为time
$time = $this->request->param('time', '');
if ($time && !$where_tmp['time']) {
$where_tmp['time'] = $time;
}
$type = $where_tmp['export_type'];
unset($where_tmp['export_type']);
$where = $with = [];
if ($where_tmp['ids']) {
$where['id'] = explode(',', $where_tmp['ids']);
}
$where['product_type'] = $where_tmp['product_type'];
$where['order_type'] = $where_tmp['order_type'];
$where['status'] = trim($where_tmp['status']);
if ($type) {
$where['status'] = 1;
$where['paid'] = 1;
$where['is_del'] = 0;
$where['shipping_type'] = 1;
$where['pid'] = 0;
$with = ['pink', 'refund' => function ($query) {
$query->whereIn('refund_type', [0, 1, 2, 4, 5])->where('is_cancel', 0)->where('is_del', 0)->field('id,store_order_id');
}];
}
if (!$where_tmp['ids']) {
unset($where_tmp['ids']);
$where = array_merge($where, $where_tmp);
}
$where['is_system_del'] = 0;
$where['plat_type'] = $where_tmp['plat_type'];
$where['store_id'] = $where_tmp['store_id'];
$where['supplier_id'] = $where_tmp['supplier_id'];
if (!$where_tmp['store_id']) {//无筛选
if ($this->adminType == 3 && $this->agentId) {//区域代理商登录
$storeIds = $regionAgentServices->getRegionAgentStoreId((int)$this->agentId);
if ($storeIds) {
$where['store_id'] = $storeIds;
} else {
return $this->success($this->service->storeOrder([], $type));
}
}
}
if ($where['store_id'] || $where['supplier_id'] || $where['plat_type'] != '' && in_array($where['plat_type'], [0, 1, 2])) {
$where['pid'] = 0;
} elseif (!in_array($where['status'], [-1, -2, -3])) {
$where['pid'] = [0, -1];
}
$data = $services->getExportList($where, $with, $this->service->limit);
return $this->success($this->service->storeOrder($data, $type));
}4、修改完php代码,需要重启swoole守护

