Просмотр исходного кода

Merge remote-tracking branch 'origin/v5.0.0dev' into v5.0.0dev

Gosowong 2 лет назад
Родитель
Сommit
72a3057622

+ 16 - 0
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();
+    }
 }

+ 7 - 1
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) {

+ 8 - 2
template/admin/src/pages/kefu/mobile/index.vue

@@ -217,6 +217,7 @@ export default {
       }
     },
     records() {
+      if (!this.chatList.length) return;
       return this.chatList.map((item, index) => {
         item.time = this.$moment(item.add_time * 1000).format('MMMDo h:mm');
         if (index) {
@@ -264,7 +265,7 @@ export default {
         if (data.msn_type == 1 || data.msn_type == 2) {
           data.msn = this.replace_em(data.msn);
         }
-        if (data.msn_type == 5) return;
+        // if (data.msn_type == 5)
         this.chatList.push(data);
 
         this.$refs['scrollBox'].refresh();
@@ -565,7 +566,12 @@ export default {
   },
 };
 </script>
-
+<style>
+html,
+body {
+  font-size: 50px;
+}
+</style>
 <style lang="stylus" scoped>
 .head-box{
     position relative

+ 2 - 2
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即可