chenjj пре 3 месеци
родитељ
комит
dd38998bbd

+ 3 - 1
src/api/finance/settlement.js

@@ -69,4 +69,6 @@ export function sendCode(phone) {
     url: `/sms/sendCode/${phone}`,
     method: 'get',
   })
-}
+}
+
+

+ 12 - 0
src/api/system/user.js

@@ -134,3 +134,15 @@ export function deptTreeSelect() {
     method: 'get'
   })
 }
+
+
+
+
+// 生成小程序用户邀请二维码
+export function getInviteQrCode(params) {
+  return request({
+    url: '/core/InviteUser/getInviteQrCode',
+    method: 'get',
+    params
+  })
+}

+ 1 - 1
src/assets/styles/sidebar.scss

@@ -44,7 +44,7 @@
 
     &.has-logo {
       .el-scrollbar {
-        height: calc(100% - 50px);
+        height: calc(100% - 100px);
       }
     }
 

+ 3 - 0
src/layout/components/Sidebar/index.vue

@@ -21,6 +21,8 @@
         />
       </el-menu>
     </el-scrollbar>
+    <qrCode :collapse="false"/>
+
   </div>
 </template>
 
@@ -31,6 +33,7 @@ import variables from '@/assets/styles/variables.module.scss'
 import useAppStore from '@/store/modules/app'
 import useSettingsStore from '@/store/modules/settings'
 import usePermissionStore from '@/store/modules/permission'
+import qrCode from './qrCode.vue'
 
 const route = useRoute();
 const appStore = useAppStore()

+ 156 - 0
src/layout/components/Sidebar/qrCode.vue

@@ -0,0 +1,156 @@
+<template>
+    <div class="sidebar-qrcode-container" :class="{ 'collapse': collapse }">
+        <transition name="sidebarLogoFade">
+            <div v-if="collapse" key="collapse" class="sidebar-qrcode-link" @click="openDialog">
+                <img v-if="logo" :src="logo" class="sidebar-qrcode" />
+                <h1 v-else class="sidebar-title">生成邀请码</h1>
+            </div>
+            <div v-else key="expand" class="sidebar-qrcode-link" @click="openDialog">
+                <img v-if="logo" :src="logo" class="sidebar-qrcode" />
+                <h1 class="sidebar-title">生成邀请码</h1>
+            </div>
+        </transition>
+
+        <el-dialog v-model="centerDialogVisible" title="二维码" width="500" align-center>
+
+            <div>
+                <el-image :src="qrBase64" />
+                <el-button type="primary" round @click="downloadBase64Image">图片下载</el-button>
+            </div>
+
+        </el-dialog>
+    </div>
+</template>
+
+<script setup>
+import logo from '@/assets/logo/logo.png'
+import useSettingsStore from '@/store/modules/settings'
+import variables from '@/assets/styles/variables.module.scss'
+import { getInviteQrCode } from '@/api/system/user'
+import useUserStore from '@/store/modules/user'
+import { ref } from 'vue'
+const { proxy } = getCurrentInstance();
+const userStore = useUserStore();
+const areaType = ref(userStore.user.dept.areaType);// 0: 平台 3:区域公司 4:服务中心
+
+defineProps({
+    collapse: {
+        type: Boolean,
+        required: true
+    }
+})
+
+const settingsStore = useSettingsStore();
+const sideTheme = computed(() => settingsStore.sideTheme);
+const centerDialogVisible = ref(false)
+const qrBase64 = ref('');
+
+// 获取Logo背景色
+const getLogoBackground = computed(() => {
+    if (settingsStore.isDark) {
+        return 'var(--sidebar-bg)';
+    }
+    return sideTheme.value === 'theme-dark' ? variables.menuBg : variables.menuLightBg;
+});
+
+// 获取Logo文字颜色
+const getLogoTextColor = computed(() => {
+    if (settingsStore.isDark) {
+        return 'var(--sidebar-text)';
+    }
+    return sideTheme.value === 'theme-dark' ? '#fff' : variables.menuLightText;
+});
+
+const openDialog = async () => {
+    try {
+        const res = await getInviteQrCode({
+            referrerType: areaType.value === '3' ? '2' : '3',//推荐者类型 1用户 2区域公司 3服务中心
+            referrerId: userStore.user.userId,//推荐者id(用户id/区域id/服务中心id)
+        });
+        console.log("TCL: openDialog -> res", res)
+
+        if (res.code === 200) {
+            qrBase64.value = "data:image/png;base64," + res.data;
+            centerDialogVisible.value = true;
+            return;
+        }
+        throw res.msg
+    } catch (error) {
+        proxy.$modal.msgError(error);
+        console.log("TCL: openDialog -> error", error)
+
+    }
+
+
+}
+
+const downloadBase64Image = async () => {
+    try {
+        const link = document.createElement('a');
+        link.href = qrBase64.value;
+        link.download = '推广二维码(金邻助家).png';
+        document.body.appendChild(link);
+        link.click();
+        document.body.removeChild(link);
+    } catch (error) {
+        console.log("TCL: imageDown -> error", error)
+        proxy.$modal.msgError('二维码图片下载失败!');
+    }
+}
+
+
+
+</script>
+
+<style lang="scss" scoped>
+@import '@/assets/styles/variables.module.scss';
+
+.sidebarLogoFade-enter-active {
+    transition: opacity 1.5s;
+}
+
+.sidebarLogoFade-enter,
+.sidebarLogoFade-leave-to {
+    opacity: 0;
+}
+
+.sidebar-qrcode-container {
+    position: relative;
+    width: 100%;
+    height: 50px;
+    line-height: 50px;
+    background: v-bind(getLogoBackground);
+    text-align: center;
+    overflow: hidden;
+
+    & .sidebar-qrcode-link {
+        height: 100%;
+        width: 100%;
+        cursor: pointer;
+
+        & .sidebar-qrcode {
+            width: 32px;
+            height: 32px;
+            vertical-align: middle;
+            margin-right: 12px;
+        }
+
+        & .sidebar-title {
+            display: inline-block;
+            margin: 0;
+            color: v-bind(getLogoTextColor);
+            font-weight: 600;
+            line-height: 50px;
+            font-size: 14px;
+            font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
+            vertical-align: middle;
+        }
+    }
+
+    &.collapse {
+        .sidebar-qrcode {
+            margin-right: 0px;
+        }
+    }
+}
+</style>

+ 4 - 4
src/views/components/ListPage/Search.vue

@@ -48,20 +48,20 @@
                     <template v-if="item.show">
                                 <template v-if="item.hasPermi">
                                     <el-button  :type="item.type || 'primary'" :icon="item.icon"
-                                    @click="() => item.func(formInline)" plain v-if="item.show(tabsValue)"> {{ item.label }}</el-button>
+                                    @click="() => item.func({...formInline,tabsValue})" plain v-if="item.show(tabsValue)"> {{ item.label }}</el-button>
                                 </template>
                                 <template v-else>
                                     <el-button   :type="item.type || 'primary'" :icon="item.icon"
-                                    @click="() => item.func(formInline)" plain v-if="item.show(tabsValue)"> {{ item.label }}</el-button>
+                                    @click="() => item.func({...formInline,tabsValue})" plain v-if="item.show(tabsValue)"> {{ item.label }}</el-button>
                                 </template>
                            </template>
                            <template v-else-if="item.hasPermi">
                                 <el-button   :type="item.type || 'primary'" :icon="item.icon"
-                                @click="() => item.func(formInline)" plain v-hasPermi="item.hasPermi"> {{ item.label }}</el-button>
+                                @click="() => item.func({...formInline,tabsValue})" plain v-hasPermi="item.hasPermi"> {{ item.label }}</el-button>
                            </template>
                            <template v-else>
                                 <el-button  :type="item.type || 'primary'" :icon="item.icon"
-                                @click="() => item.func(formInline)"  plain> {{ item.label }}</el-button>
+                                @click="() => item.func({...formInline,tabsValue})"  plain> {{ item.label }}</el-button>
                            </template>
             </el-col>
         </el-row>

+ 33 - 8
src/views/finance/examine/useData.js

@@ -121,6 +121,13 @@ export default ({proxy,jlzj_area_type}) => {
                 prop: 'userNickName',
                 width:'140px',
                 type: 'input',
+                isSearch: false
+            },
+            {
+                label: '用户联系方式',
+                prop: 'volunteerName',
+                width: '140px',
+                type: 'input',
                 isSearch: true
             },
             {
@@ -128,6 +135,13 @@ export default ({proxy,jlzj_area_type}) => {
                 prop: 'volunteerName',
                 width:'140px',
                 type: 'input',
+                isSearch: false
+            },
+            {
+                label: '志愿者联系方式',
+                prop: 'volunteerName',
+                width: '140px',
+                type: 'input',
                 isSearch: true
             },
             {
@@ -148,6 +162,11 @@ export default ({proxy,jlzj_area_type}) => {
                 isSearch: false,
                 width:'150px'
             },
+            {
+                label: '区域公司抽成比例',
+                prop: 'areaDistributionAmount',
+                 width:'150px'
+            },
             {
                 label: '区域公司抽成金额',
                 prop: 'areaDistributionAmount',
@@ -216,14 +235,20 @@ export default ({proxy,jlzj_area_type}) => {
                     return  tabsValue === '10'
                 }
             },
-            // {
-            //     label: '导出',
-            //     func: (parmas) => {
-            //         exportFile(parmas);
-            //     },
-            //     key: 'export',
-            //     type: 'primary'
-            // },
+            {
+                label: '导出',
+                func: (parmas) => {
+                     try {
+                        proxy.download("core/orderSettlementApplication/export",{
+                            ...parmas,
+                            auditorStatus: parmas.tabsValue
+                        }, `订单费用结算申请表_${new Date().getTime()}.xlsx`);
+                    } catch (error) { 
+                    }
+                },
+                key: 'export',
+                type: 'primary'
+            },
         ],
         scopeBtns:[
             {

+ 1 - 1
src/views/finance/settlement/service.vue

@@ -16,8 +16,8 @@ import ListPage from '@/views/components/ListPage/index.vue';
 import DialogForm from '@/views/components/DialogForm/index.vue';
 import { settlementOrderList } from "@/api/finance/settlement.js";
 import useService from './useService';
-import useUserStore from '@/store/modules/user'
 import useData from './useData';
+import useUserStore from '@/store/modules/user'
 const { proxy } = getCurrentInstance();
 const userStore = useUserStore();
 const jlzj_area_type = ref(userStore.user.dept.areaType);// 0: 平台 3:区域公司 4:服务中心

+ 39 - 0
src/views/finance/settlement/useRegional.js

@@ -144,6 +144,21 @@ export default ({ proxy, jlzj_area_type }) => {
                 }
                 // hasPermi:["finance:settlement"] 
             },
+             {
+                label: '导出',
+                func: (parmas) => {
+                     console.log("TCL: parmas", parmas)
+                     try {
+                        proxy.download("core/users/orders/settlementOrderList/export",{
+                            ...parmas,
+                            areaSettlementStatus: parmas.tabsValue
+                        }, `订单费用结算表_${new Date().getTime()}.xlsx`);
+                    } catch (error) { 
+                    }
+                },
+                key: 'export',
+                type: 'primary'
+            },
         ],
         dialogType,
         tableColumn: ref([
@@ -175,6 +190,13 @@ export default ({ proxy, jlzj_area_type }) => {
                 prop: 'userNickName',
                 width: '140px',
                 type: 'input',
+                isSearch: false
+            },
+            {
+                label: '用户联系方式',
+                prop: 'volunteerName',
+                width: '140px',
+                type: 'input',
                 isSearch: true
             },
             {
@@ -182,6 +204,13 @@ export default ({ proxy, jlzj_area_type }) => {
                 prop: 'volunteerName',
                 width: '140px',
                 type: 'input',
+                isSearch: false
+            },
+            {
+                label: '志愿者联系方式',
+                prop: 'volunteerName',
+                width: '140px',
+                type: 'input',
                 isSearch: true
             },
             {
@@ -209,6 +238,11 @@ export default ({ proxy, jlzj_area_type }) => {
                 isSearch: true,
                 width: '150px'
             },
+            {
+                label: '抽成比例',
+                prop: 'areaDistributionAmount',
+                width: '150px'
+            },
             {
                 label: '抽成金额',
                 prop: 'areaDistributionAmount',
@@ -226,6 +260,11 @@ export default ({ proxy, jlzj_area_type }) => {
                 prop: 'areaSettlementTime',
                 width: '160px',
             },
+            {
+                label: '服务中心抽成比例',
+                prop: 'areaDistributionAmount',
+                width: '150px'
+            },
             {
                 label: '服务中心抽成金额',
                 prop: 'serviceCentreDistributionAmount',

+ 33 - 0
src/views/finance/settlement/useService.js

@@ -146,6 +146,20 @@ export default ({ proxy, jlzj_area_type }) => {
                 }
                 // hasPermi:["finance:settlement"] 
             },
+            {
+                label: '导出',
+                func: (parmas) => {
+                     try {
+                        proxy.download("core/users/orders/settlementOrderList/export",{
+                            ...parmas,
+                            serviceCentreSettlementStatus: parmas.tabsValue
+                        }, `订单费用结算表_${new Date().getTime()}.xlsx`);
+                    } catch (error) { 
+                    }
+                },
+                key: 'export',
+                type: 'primary'
+            },
         ],
         dialogType,
         tableColumn: ref([
@@ -177,6 +191,13 @@ export default ({ proxy, jlzj_area_type }) => {
                 prop: 'userNickName',
                 width: '140px',
                 type: 'input',
+                isSearch: false
+            },
+            {
+                label: '用户联系方式',
+                prop: 'volunteerName',
+                width: '140px',
+                type: 'input',
                 isSearch: true
             },
             {
@@ -184,6 +205,13 @@ export default ({ proxy, jlzj_area_type }) => {
                 prop: 'volunteerName',
                 width: '140px',
                 type: 'input',
+                isSearch: false
+            },
+            {
+                label: '志愿者联系方式',
+                prop: 'volunteerName',
+                width: '140px',
+                type: 'input',
                 isSearch: true
             },
             {
@@ -203,6 +231,11 @@ export default ({ proxy, jlzj_area_type }) => {
                 dict: lrr_service_status,
                 isSearch: true
             },
+            {
+                label: '抽成比例',
+                prop: 'serviceCentreDistributionAmount',
+                width: '150px'
+            },
             {
                 label: '抽成金额',
                 prop: 'serviceCentreDistributionAmount',

+ 4 - 4
src/views/finance/withdrawal/useData.js

@@ -249,13 +249,13 @@ export default ({ proxy, jlzj_area_type }) => {
         ],
         talkeColumn:ref([
             {
-                label: '支付宝账',
+                label: '支付宝账',
                 prop: 'alipayAccountNo',
                 type: 'input',
                 isSearch: true
             },
             {
-                label: '支付宝名',
+                label: '支付宝名',
                 prop: 'alipayName',
                 type: 'input',
                 isSearch: true
@@ -381,12 +381,12 @@ export default ({ proxy, jlzj_area_type }) => {
             title: '结算申请',
             column: [
                 {
-                    label: '支付宝账:',
+                    label: '支付宝账:',
                     prop: 'alipayAccountNo',
                     type: 'text',
                 },
                 {
-                    label: '支付宝名:',
+                    label: '支付宝名:',
                     prop: 'alipayName',
                     type: 'text',
                 },