From 8dc2e603a92f62245509c0892085c2b465158a67 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Wed, 10 May 2023 15:01:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=88=B0=E5=A4=84=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=87=AA=E5=AE=9A=E4=B9=89=E8=A1=A8=E5=8D=95=E5=86=85?= =?UTF-8?q?=E5=AE=B9=EF=BC=8C=E4=BC=98=E5=8C=96=E5=AE=A2=E6=9C=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/dao/service/StoreServiceDao.php | 16 ++++++++++++++++ .../app/services/other/export/ExportServices.php | 8 +++++++- template/admin/vue.config.js | 4 ++-- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/crmeb/app/dao/service/StoreServiceDao.php b/crmeb/app/dao/service/StoreServiceDao.php index ab5d6566b..044c5f245 100644 --- a/crmeb/app/dao/service/StoreServiceDao.php +++ b/crmeb/app/dao/service/StoreServiceDao.php @@ -86,4 +86,20 @@ class StoreServiceDao extends BaseDao return $this->getModel()->whereNotIn('uid', $where['notUid'])->update($data); } + /** + * 统计数量 + * @param array $where + * @param bool $search + * @return int + * @throws \ReflectionException + * @author 吴汐 + * @email 442384644@qq.com + * @date 2023/05/10 + */ + public function count($where = [], $search = true) + { + return $this->search($where, false)->when(isset($where['noId']), function ($query) use ($where) { + $query->whereNotIn('uid', $where['noId']); + })->count(); + } } diff --git a/crmeb/app/services/other/export/ExportServices.php b/crmeb/app/services/other/export/ExportServices.php index 10a4bc281..86da2fa75 100644 --- a/crmeb/app/services/other/export/ExportServices.php +++ b/crmeb/app/services/other/export/ExportServices.php @@ -74,7 +74,7 @@ class ExportServices extends BaseServices */ public function exportOrderList($where) { - $header = ['订单号', '收货人姓名', '收货人电话', '收货地址', '商品信息', '总价格', '实际支付', '支付状态', '支付时间', '订单状态', '下单时间', '用户备注']; + $header = ['订单号', '收货人姓名', '收货人电话', '收货地址', '商品信息', '总价格', '实际支付', '支付状态', '支付时间', '订单状态', '下单时间', '用户备注', '表单信息']; $filename = '订单列表_' . date('YmdHis', time()); $export = $fileKey = []; /** @var StoreOrderServices $orderServices */ @@ -127,6 +127,11 @@ class ExportServices extends BaseServices } else if ($item['paid'] == 1 && $item['refund_status'] == 2) { $item['status_name'] = '已退款'; } + $custom_form = ''; + foreach ($item['custom_form'] as $custom_form_value) { + $custom_form .= $custom_form_value['title'] . ':' . $custom_form_value['value'] . ';'; + } + $goodsName = []; foreach ($item['_info'] as $value) { $_info = $value['cart_info']; @@ -157,6 +162,7 @@ class ExportServices extends BaseServices 'status_name' => $item['status_name'] ?? '未知状态', 'add_time' => $item['add_time'], 'mark' => $item['mark'], + 'custom_form' => $custom_form, ]; $export[] = $one_data; if ($i == 0) { diff --git a/template/admin/vue.config.js b/template/admin/vue.config.js index 87b7397cb..14dc7ac7f 100644 --- a/template/admin/vue.config.js +++ b/template/admin/vue.config.js @@ -18,7 +18,7 @@ const resolve = (dir) => { // 例如:https://www.foobar.com/my-app/ // 需要将它改为'/my-app/' // iview-admin线上演示打包路径: https://file.iviewui.com/admin-dist/ -// const BASE_URL = process.env.NODE_ENV === 'production' ? '/' : '/'; +const BASE_URL = process.env.NODE_ENV === 'production' ? '/' : '/'; const env = process.env.NODE_ENV; module.exports = { // Project deployment base @@ -31,7 +31,7 @@ module.exports = { outputDir: Setting.outputDir, runtimeCompiler: true, productionSourceMap: false, //关闭生产环境下的SourceMap映射文件 - baseUrl: '/', + baseUrl: BASE_URL, // tweak internal webpack configuration. // see https://github.com/vuejs/vue-cli/blob/dev/docs/webpack.md // 如果你不需要使用eslint,把lintOnSave设为false即可