Commit 83f3e052acb6c09d01b119c2681d0e0a380cdb61
Merge branch 'master' of http://39.98.150.180/antissoft/lvqianmeiye_ERP
Showing
38 changed files
with
3056 additions
and
35 deletions
antis-ncc-admin/src/views/lqHytkHytk/detail.vue
| ... | ... | @@ -149,7 +149,7 @@ |
| 149 | 149 | </div> |
| 150 | 150 | |
| 151 | 151 | <!-- 科技部老师业绩 --> |
| 152 | - <div class="px-staff-section" v-if="px.qt2 === '科美'"> | |
| 152 | + <div class="px-staff-section" v-if="px.lqHytkKjbsyjList && px.lqHytkKjbsyjList.length > 0"> | |
| 153 | 153 | <div class="px-staff-header"> |
| 154 | 154 | <span class="px-staff-title">科技部老师业绩</span> |
| 155 | 155 | </div> | ... | ... |
antis-ncc-admin/src/views/statisticsList/form1.vue
| ... | ... | @@ -914,13 +914,13 @@ export default { |
| 914 | 914 | const projectNumber = matchedItem ? (Number(matchedItem.projectNumber) || 0) : 0 |
| 915 | 915 | const itemAmount = price * projectNumber |
| 916 | 916 | |
| 917 | - // 构建行数据 | |
| 917 | + // 构建行数据(所有行都显示完整数据,补全空白部分) | |
| 918 | 918 | const rowData = [ |
| 919 | - teacherIndex === 0 ? baseData.date : '', // 开单日期(只在第一行显示) | |
| 920 | - teacherIndex === 0 ? baseData.customerName : '', // 客户姓名(只在第一行显示) | |
| 921 | - teacherIndex === 0 ? baseData.customerPhone : '', // 客户电话(只在第一行显示) | |
| 922 | - teacherIndex === 0 ? baseData.goldTriangle : '', // 金三角(只在第一行显示) | |
| 923 | - teacherIndex === 0 ? baseData.customerType : '', // 客户类型(只在第一行显示) | |
| 919 | + baseData.date, // 开单日期 | |
| 920 | + baseData.customerName, // 客户姓名 | |
| 921 | + baseData.customerPhone, // 客户电话 | |
| 922 | + baseData.goldTriangle, // 金三角 | |
| 923 | + baseData.customerType, // 客户类型 | |
| 924 | 924 | teacher.teacherName || '无', // 健康师 |
| 925 | 925 | teacher.performance ? `¥${this.formatMoney(teacher.performance)}` : '¥0.00', // 业绩金额 |
| 926 | 926 | matchedItem ? (matchedItem.itemName || '无') : (teacher.itemName || '无'), // 相关品项 |
| ... | ... | @@ -929,15 +929,15 @@ export default { |
| 929 | 929 | matchedItem && matchedItem.price ? `¥${this.formatMoney(matchedItem.price)}` : '¥0.00', // 单价 |
| 930 | 930 | matchedItem ? (matchedItem.projectNumber || 0) : 0, // 次数 |
| 931 | 931 | `¥${this.formatMoney(itemAmount)}`, // 品项金额(单价 * 次数) |
| 932 | - teacherIndex === 0 ? baseData.paidAmount : '', // 已付金额(只在第一行显示) | |
| 933 | - teacherIndex === 0 ? baseData.debtAmount : '', // 欠款金额(只在第一行显示) | |
| 934 | - teacherIndex === 0 ? baseData.totalAmount : '', // 总金额(只在第一行显示) | |
| 935 | - teacherIndex === 0 ? baseData.paymentMethod : '', // 支付方式(只在第一行显示) | |
| 936 | - teacherIndex === 0 ? baseData.cooperationInstitutionName : '', // 合作机构(只在第一行显示) | |
| 937 | - teacherIndex === 0 ? baseData.paymentHospitalName : '', // 结算机构(只在第一行显示) | |
| 938 | - teacherIndex === 0 ? baseData.activityName : '', // 活动名称(只在第一行显示) | |
| 939 | - teacherIndex === 0 ? baseData.remark : '', // 备注(只在第一行显示) | |
| 940 | - teacherIndex === 0 ? baseData.createTime : '' // 开单时间(只在第一行显示) | |
| 932 | + baseData.paidAmount, // 已付金额 | |
| 933 | + baseData.debtAmount, // 欠款金额 | |
| 934 | + baseData.totalAmount, // 总金额 | |
| 935 | + baseData.paymentMethod, // 支付方式 | |
| 936 | + baseData.cooperationInstitutionName, // 合作机构 | |
| 937 | + baseData.paymentHospitalName, // 结算机构 | |
| 938 | + baseData.activityName, // 活动名称 | |
| 939 | + baseData.remark, // 备注 | |
| 940 | + baseData.createTime // 开单时间 | |
| 941 | 941 | ] |
| 942 | 942 | dataRows.push(rowData) |
| 943 | 943 | }) | ... | ... |
绿纤uni-app/apis/modules/oauth.js
| ... | ... | @@ -27,4 +27,8 @@ export default { |
| 27 | 27 | getUserList(params) { |
| 28 | 28 | return request.get(`${config.getApiBaseUrl()}/api/permission/Users`, params); |
| 29 | 29 | }, |
| 30 | + // 修改密码 | |
| 31 | + changePassword(data) { | |
| 32 | + return request.post(`${config.getApiBaseUrl()}/api/permission/Users/ChangePassword`, data); | |
| 33 | + }, | |
| 30 | 34 | } |
| 31 | 35 | \ No newline at end of file | ... | ... |
绿纤uni-app/common/config.js
| ... | ... | @@ -10,8 +10,8 @@ const ENV_CONFIG = { |
| 10 | 10 | // 正式环境 |
| 11 | 11 | production: { |
| 12 | 12 | name: '正式环境', |
| 13 | - // apiBaseUrl: 'http://erp_test.lvqianmeiye.com', | |
| 14 | - apiBaseUrl: 'https://erp.lvqianmeiye.com', | |
| 13 | + apiBaseUrl: 'http://erp_test.lvqianmeiye.com', | |
| 14 | + // apiBaseUrl: 'https://erp.lvqianmeiye.com', | |
| 15 | 15 | description: '生产环境服务器' |
| 16 | 16 | } |
| 17 | 17 | }; | ... | ... |
绿纤uni-app/components/custom-tab-bar/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <view class="tab-block"> | |
| 3 | + <view class='tab-list flex flex-center' :class="showMiddleButton === true?'tab-list-middle':'tab-list-default'"> | |
| 4 | + <view v-for="(item, index) in tabList" | |
| 5 | + :class="'list-item flex flex-column flex-middle ' + item.middleClass" | |
| 6 | + @tap="handlePush(item, index)" | |
| 7 | + :key="index"> | |
| 8 | + <view class="item-img-box"> | |
| 9 | + <image | |
| 10 | + class="item-img" | |
| 11 | + :src="currentTabIndex == index ? item.selectedIconPath : item.iconPath"/> | |
| 12 | + </view> | |
| 13 | + <view class="item-text font-20 color-black" :class="{ specialColor: currentTabIndex == index}"> | |
| 14 | + {{item.text}} | |
| 15 | + </view> | |
| 16 | + </view> | |
| 17 | + </view> | |
| 18 | + </view> | |
| 19 | +</template> | |
| 20 | + | |
| 21 | +<script> | |
| 22 | + export default { | |
| 23 | + props: { | |
| 24 | + // 当前选中的tab项,如果不传则自动根据当前页面路径计算 | |
| 25 | + tabIndex: { | |
| 26 | + type: Number, | |
| 27 | + default: null | |
| 28 | + } | |
| 29 | + }, | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + tabList: [ | |
| 33 | + { | |
| 34 | + iconPath:"/static/tabBar/icon2.png", | |
| 35 | + selectedIconPath: "/static/tabBar/icon1.png", | |
| 36 | + text: '首页', | |
| 37 | + pagePath: '/pages/home/home', | |
| 38 | + middleClass: '' | |
| 39 | + }, | |
| 40 | + { | |
| 41 | + iconPath:"/static/tabBar/icon2.png", | |
| 42 | + selectedIconPath: "/static/tabBar/icon1.png", | |
| 43 | + text: '日志', | |
| 44 | + pagePath: '/pages/home/home', | |
| 45 | + middleClass: '' | |
| 46 | + }, | |
| 47 | + { | |
| 48 | + iconPath: "/static/tabBar/icon4.png", | |
| 49 | + selectedIconPath: "/static/tabBar/icon3.png", | |
| 50 | + text: '数据中心', | |
| 51 | + pagePath: '/pages/information/information', | |
| 52 | + middleClass: '' | |
| 53 | + }, | |
| 54 | + { | |
| 55 | + iconPath: "/static/tabBar/icon6.png", | |
| 56 | + selectedIconPath: "/static/tabBar/icon5.png", | |
| 57 | + text: '我的', | |
| 58 | + pagePath: '/pages/me/me', | |
| 59 | + middleClass: '' | |
| 60 | + } | |
| 61 | + ], | |
| 62 | + showMiddleButton: false, | |
| 63 | + }; | |
| 64 | + }, | |
| 65 | + computed: { | |
| 66 | + // 自动计算当前选中的tab索引 | |
| 67 | + currentTabIndex() { | |
| 68 | + // 如果外部传入了 tabIndex,优先使用外部传入的值 | |
| 69 | + if (this.tabIndex !== null && this.tabIndex !== undefined) { | |
| 70 | + return this.tabIndex; | |
| 71 | + } | |
| 72 | + // 否则根据当前页面路径自动计算 | |
| 73 | + const pages = getCurrentPages(); | |
| 74 | + if (pages.length === 0) return 0; | |
| 75 | + | |
| 76 | + const currentPage = pages[pages.length - 1]; | |
| 77 | + const currentPath = '/' + currentPage.route; | |
| 78 | + | |
| 79 | + // 查找匹配的tab项 | |
| 80 | + const matchedIndex = this.tabList.findIndex(item => { | |
| 81 | + return currentPath === item.pagePath || currentPath.startsWith(item.pagePath); | |
| 82 | + }); | |
| 83 | + | |
| 84 | + return matchedIndex >= 0 ? matchedIndex : 0; | |
| 85 | + } | |
| 86 | + }, | |
| 87 | + methods: { | |
| 88 | + // 点击按钮 | |
| 89 | + handlePush(item, index) { | |
| 90 | + if (this.currentTabIndex !== index) { | |
| 91 | + uni.reLaunch({ | |
| 92 | + url: item.pagePath | |
| 93 | + }) | |
| 94 | + } | |
| 95 | + } | |
| 96 | + } | |
| 97 | + } | |
| 98 | +</script> | |
| 99 | + | |
| 100 | +<style lang="scss"> | |
| 101 | + .specialColor{ | |
| 102 | + color:#009b4d; | |
| 103 | + } | |
| 104 | + .flex { | |
| 105 | + display: flex; | |
| 106 | + flex-flow: row wrap; | |
| 107 | + } | |
| 108 | + | |
| 109 | + .flex-center { | |
| 110 | + align-items: center; | |
| 111 | + justify-content: center; | |
| 112 | + } | |
| 113 | + | |
| 114 | + .flex-column { | |
| 115 | + flex-direction: column; | |
| 116 | + } | |
| 117 | + | |
| 118 | + .flex-middle { | |
| 119 | + align-items: center; | |
| 120 | + } | |
| 121 | + .font-20 { | |
| 122 | + font-size: 22rpx; | |
| 123 | + } | |
| 124 | + .tab-block { | |
| 125 | + position: fixed; | |
| 126 | + bottom: 32rpx; | |
| 127 | + left: 50%; | |
| 128 | + transform: translateX(-50%); | |
| 129 | + z-index: 999; | |
| 130 | + width: calc(100% - 48rpx); | |
| 131 | + // max-width: 680rpx; | |
| 132 | + padding: 0 24rpx; | |
| 133 | + box-sizing: border-box; | |
| 134 | + .tab-list{ | |
| 135 | + height: 120rpx; | |
| 136 | + } | |
| 137 | + .tab-list-default{ | |
| 138 | + background-color: rgba(255, 255, 255, 0.85); | |
| 139 | + border-radius: 28rpx; | |
| 140 | + box-shadow: 0rpx 4rpx 20rpx rgba(0, 0, 0, 0.1); | |
| 141 | + backdrop-filter: blur(10rpx); | |
| 142 | + } | |
| 143 | + .tab-list-middle { | |
| 144 | + position: relative; | |
| 145 | + background: url('https://res.paquapp.com/popmartvip/home/nav_bar_bg_2x.png') no-repeat center center; | |
| 146 | + background-size: cover; | |
| 147 | + } | |
| 148 | + .list-item { | |
| 149 | + flex: 1; | |
| 150 | + .item-img-box { | |
| 151 | + width: 40rpx; | |
| 152 | + height: 40rpx; | |
| 153 | + margin-bottom: 6rpx; | |
| 154 | + position: relative; | |
| 155 | + } | |
| 156 | + | |
| 157 | + .item-img { | |
| 158 | + width: 40rpx; | |
| 159 | + height: 40rpx; | |
| 160 | + } | |
| 161 | + } | |
| 162 | + | |
| 163 | + .mid-button { | |
| 164 | + position: relative; | |
| 165 | + | |
| 166 | + .item-img-box { | |
| 167 | + width: 106rpx; | |
| 168 | + height: 106rpx; | |
| 169 | + margin-bottom: 9rpx; | |
| 170 | + position: absolute; | |
| 171 | + z-index: 1002; | |
| 172 | + top: -104rpx; | |
| 173 | + } | |
| 174 | + | |
| 175 | + .item-img { | |
| 176 | + width: 106rpx; | |
| 177 | + height: 106rpx; | |
| 178 | + } | |
| 179 | + | |
| 180 | + .item-text { | |
| 181 | + font-size: 20rpx; | |
| 182 | + position: absolute; | |
| 183 | + z-index: 1002; | |
| 184 | + bottom: -40rpx; | |
| 185 | + } | |
| 186 | + } | |
| 187 | + } | |
| 188 | +</style> | |
| 0 | 189 | \ No newline at end of file | ... | ... |
绿纤uni-app/components/custom-tab-bar/index副本.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <view class="tab-block"> | |
| 3 | + <view class='tab-list flex flex-center' :class="showMiddleButton === true?'tab-list-middle':'tab-list-default'"> | |
| 4 | + <view v-for="(item, index) in tabList" | |
| 5 | + :class="'list-item flex flex-column flex-middle ' + item.middleClass" | |
| 6 | + @tap="handlePush(item, index)" | |
| 7 | + :key="index"> | |
| 8 | + <view class="item-img-box"> | |
| 9 | + <image | |
| 10 | + class="item-img" | |
| 11 | + :src="selectedIndex == index ? item.selectedIconPath : item.iconPath" mode="heightFix"/> | |
| 12 | + </view> | |
| 13 | + <view class="item-text font-20 color-black" :class="{ specialColor: selectedIndex == index}"> | |
| 14 | + {{item.text}} | |
| 15 | + </view> | |
| 16 | + </view> | |
| 17 | + </view> | |
| 18 | + </view> | |
| 19 | +</template> | |
| 20 | + | |
| 21 | +<script> | |
| 22 | + export default { | |
| 23 | + data() { | |
| 24 | + return { | |
| 25 | + selectedIndex: 0, // 当前选中的tab索引 | |
| 26 | + tabList: [ | |
| 27 | + { | |
| 28 | + iconPath:"/static/tabBar/icon2.png", | |
| 29 | + selectedIconPath: "/static/tabBar/icon1.png", | |
| 30 | + text: '首页', | |
| 31 | + pagePath: '/pages/home/home', | |
| 32 | + middleClass: '' | |
| 33 | + }, | |
| 34 | + { | |
| 35 | + iconPath: "/static/tabBar/icon4.png", | |
| 36 | + selectedIconPath: "/static/tabBar/icon3.png", | |
| 37 | + text: '数据中心', | |
| 38 | + pagePath: '/pages/information/information', | |
| 39 | + middleClass: '' | |
| 40 | + }, | |
| 41 | + { | |
| 42 | + iconPath: "/static/tabBar/icon6.png", | |
| 43 | + selectedIconPath: "/static/tabBar/icon5.png", | |
| 44 | + text: '我的', | |
| 45 | + pagePath: '/pages/me/me', | |
| 46 | + middleClass: '' | |
| 47 | + } | |
| 48 | + ], | |
| 49 | + showMiddleButton: false | |
| 50 | + }; | |
| 51 | + }, | |
| 52 | + mounted() { | |
| 53 | + // 获取当前页面路径,设置选中索引 | |
| 54 | + this.setSelectedIndex(); | |
| 55 | + }, | |
| 56 | + updated() { | |
| 57 | + // 组件更新时重新检查选中状态 | |
| 58 | + this.setSelectedIndex(); | |
| 59 | + }, | |
| 60 | + methods: { | |
| 61 | + // 设置当前选中的tab索引(供外部调用) | |
| 62 | + setSelectedIndex(index) { | |
| 63 | + if (typeof index === 'number' && index >= 0 && index < this.tabList.length) { | |
| 64 | + this.selectedIndex = index; | |
| 65 | + } else { | |
| 66 | + // 如果没有传入索引,则根据当前页面路径自动判断 | |
| 67 | + const pages = getCurrentPages(); | |
| 68 | + if (pages.length === 0) return; | |
| 69 | + | |
| 70 | + const currentPage = pages[pages.length - 1]; | |
| 71 | + const currentPath = '/' + currentPage.route; | |
| 72 | + | |
| 73 | + // 根据当前页面路径设置选中索引 | |
| 74 | + const foundIndex = this.tabList.findIndex(item => item.pagePath === currentPath); | |
| 75 | + if (foundIndex !== -1) { | |
| 76 | + this.selectedIndex = foundIndex; | |
| 77 | + } | |
| 78 | + } | |
| 79 | + }, | |
| 80 | + // 点击按钮 | |
| 81 | + handlePush(item, index) { | |
| 82 | + if (this.selectedIndex !== index) { | |
| 83 | + uni.switchTab({ | |
| 84 | + url: item.pagePath, | |
| 85 | + success: () => { | |
| 86 | + this.selectedIndex = index; | |
| 87 | + }, | |
| 88 | + fail: (err) => { | |
| 89 | + console.error('切换tab失败:', err); | |
| 90 | + } | |
| 91 | + }); | |
| 92 | + } | |
| 93 | + } | |
| 94 | + } | |
| 95 | + } | |
| 96 | +</script> | |
| 97 | + | |
| 98 | +<style lang="scss"> | |
| 99 | + .specialColor{ | |
| 100 | + color:#009b4d; | |
| 101 | + } | |
| 102 | + .flex { | |
| 103 | + display: flex; | |
| 104 | + flex-flow: row wrap; | |
| 105 | + } | |
| 106 | + | |
| 107 | + .flex-center { | |
| 108 | + align-items: center; | |
| 109 | + justify-content: center; | |
| 110 | + } | |
| 111 | + | |
| 112 | + .flex-column { | |
| 113 | + flex-direction: column; | |
| 114 | + } | |
| 115 | + | |
| 116 | + .flex-middle { | |
| 117 | + align-items: center; | |
| 118 | + } | |
| 119 | + .font-20 { | |
| 120 | + font-size: 20rpx; | |
| 121 | + } | |
| 122 | + .tab-block { | |
| 123 | + position: fixed; | |
| 124 | + bottom: 0; | |
| 125 | + left: 0; | |
| 126 | + right: 0; | |
| 127 | + z-index: 999; | |
| 128 | + background-size: contain; | |
| 129 | + padding: 0 36rpx; | |
| 130 | + display: flex; | |
| 131 | + justify-content: center; | |
| 132 | + padding-bottom: env(safe-area-inset-bottom); | |
| 133 | + .tab-list{ | |
| 134 | + height:100rpx; | |
| 135 | + display: flex; | |
| 136 | + width: 676rpx; | |
| 137 | + } | |
| 138 | + .tab-list-default{ | |
| 139 | + background-color: #FFFFFF; | |
| 140 | + border-radius: 36rpx; | |
| 141 | + box-shadow: 0rpx 0rpx 30rpx #ababab; | |
| 142 | + } | |
| 143 | + .tab-list-middle { | |
| 144 | + position: relative; | |
| 145 | + background: url('https://res.paquapp.com/popmartvip/home/nav_bar_bg_2x.png') no-repeat center center; | |
| 146 | + background-size: cover; | |
| 147 | + } | |
| 148 | + .list-item { | |
| 149 | + flex: 1; | |
| 150 | + .item-img-box { | |
| 151 | + width: 44rpx; | |
| 152 | + height: 42rpx; | |
| 153 | + margin-bottom: 9rpx; | |
| 154 | + position: relative; | |
| 155 | + } | |
| 156 | + | |
| 157 | + .item-img { | |
| 158 | + width: 44rpx; | |
| 159 | + height: 42rpx; | |
| 160 | + } | |
| 161 | + } | |
| 162 | + | |
| 163 | + .mid-button { | |
| 164 | + position: relative; | |
| 165 | + | |
| 166 | + .item-img-box { | |
| 167 | + width: 106rpx; | |
| 168 | + height: 106rpx; | |
| 169 | + margin-bottom: 9rpx; | |
| 170 | + position: absolute; | |
| 171 | + z-index: 1002; | |
| 172 | + top: -104rpx; | |
| 173 | + } | |
| 174 | + | |
| 175 | + .item-img { | |
| 176 | + width: 106rpx; | |
| 177 | + height: 106rpx; | |
| 178 | + } | |
| 179 | + | |
| 180 | + .item-text { | |
| 181 | + font-size: 20rpx; | |
| 182 | + position: absolute; | |
| 183 | + z-index: 1002; | |
| 184 | + bottom: -40rpx; | |
| 185 | + } | |
| 186 | + } | |
| 187 | + } | |
| 188 | +</style> | |
| 189 | + | ... | ... |
绿纤uni-app/pages.json
| 1 | 1 | { |
| 2 | 2 | "pages": [ |
| 3 | 3 | { |
| 4 | + "path": "pages/home/home", | |
| 5 | + "style": { | |
| 6 | + "navigationBarTitleText": "绿纤工作台" | |
| 7 | + // "navigationStyle": "custom" | |
| 8 | + } | |
| 9 | + }, | |
| 10 | + { | |
| 11 | + "path": "pages/index/index", | |
| 12 | + "style": { | |
| 13 | + "navigationBarTitleText": "绿纤协同平台", | |
| 14 | + "navigationStyle": "custom" | |
| 15 | + } | |
| 16 | + }, | |
| 17 | + | |
| 18 | + { | |
| 4 | 19 | "path": "pages/index/index", |
| 5 | 20 | "style": { |
| 6 | 21 | "navigationBarTitleText": "绿纤协同平台", |
| ... | ... | @@ -118,14 +133,6 @@ |
| 118 | 133 | } |
| 119 | 134 | }, |
| 120 | 135 | { |
| 121 | - "path" : "refund/refund", | |
| 122 | - "style" : | |
| 123 | - { | |
| 124 | - "enablePullDownRefresh": false , | |
| 125 | - "navigationBarTitleText" : "退卡" | |
| 126 | - } | |
| 127 | - }, | |
| 128 | - { | |
| 129 | 136 | "path" : "pages/lx-list/lx-list", |
| 130 | 137 | "style" : |
| 131 | 138 | { |
| ... | ... | @@ -328,6 +335,18 @@ |
| 328 | 335 | { |
| 329 | 336 | "navigationBarTitleText" : "旧日志" |
| 330 | 337 | } |
| 338 | + }, | |
| 339 | + { | |
| 340 | + "path": "pages/information/information", | |
| 341 | + "style": { | |
| 342 | + "navigationStyle": "custom" | |
| 343 | + } | |
| 344 | + }, | |
| 345 | + { | |
| 346 | + "path": "pages/me/me", | |
| 347 | + "style": { | |
| 348 | + "navigationStyle": "custom" | |
| 349 | + } | |
| 331 | 350 | } |
| 332 | 351 | ], |
| 333 | 352 | "globalStyle": { |
| ... | ... | @@ -336,4 +355,35 @@ |
| 336 | 355 | "navigationBarBackgroundColor": "#fff" |
| 337 | 356 | }, |
| 338 | 357 | "uniIdRouter": {} |
| 358 | + // "tabBar": { | |
| 359 | + // "custom": false, | |
| 360 | + // "color": "#8a8a8a", | |
| 361 | + // "borderStyle": "white", | |
| 362 | + // "fontSize": "12px", | |
| 363 | + // "iconWidth": "30px", | |
| 364 | + // "spacing": "1px", | |
| 365 | + // "selectedColor": "#009b4d", | |
| 366 | + // "backgroundColor": "#FFFFFF", | |
| 367 | + // "height": "65px", | |
| 368 | + // "list": [ | |
| 369 | + // { | |
| 370 | + // "iconPath": "/static/tabBar/icon2.png", | |
| 371 | + // "selectedIconPath": "/static/tabBar/icon1.png", | |
| 372 | + // "pagePath": "pages/home/home", | |
| 373 | + // "text": "首页" | |
| 374 | + // }, | |
| 375 | + // { | |
| 376 | + // "iconPath": "/static/tabBar/icon4.png", | |
| 377 | + // "selectedIconPath": "/static/tabBar/icon3.png", | |
| 378 | + // "pagePath": "pages/information/information", | |
| 379 | + // "text": "数据中心" | |
| 380 | + // }, | |
| 381 | + // { | |
| 382 | + // "iconPath": "/static/tabBar/icon6.png", | |
| 383 | + // "selectedIconPath": "/static/tabBar/icon5.png", | |
| 384 | + // "pagePath": "pages/me/me", | |
| 385 | + // "text": "我的" | |
| 386 | + // } | |
| 387 | + // ] | |
| 388 | + // } | |
| 339 | 389 | } | ... | ... |
绿纤uni-app/pages/home/application.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <view class="warpbox"> | |
| 3 | + <!-- #ifdef MP-WEIXIN --> | |
| 4 | + <cover-view class="headerbox" :style="{height:topHeight+'px',paddingTop:paddingHeight+'px'}"> | |
| 5 | + <cover-view class="headerbox-icon"></cover-view> | |
| 6 | + <cover-view class="headerbox-content">应用</cover-view> | |
| 7 | + <cover-view class="headerbox-icon"></cover-view> | |
| 8 | + </cover-view> | |
| 9 | + <cover-view :style="{height:topHeight+'px'}"></cover-view> | |
| 10 | + <!-- #endif --> | |
| 11 | + <!-- #ifdef MP-ALIPAY || APP-PLUS --> | |
| 12 | + <view class="headerbox_h5" style="height:150rpx"> | |
| 13 | + <view class="headerbox-icon"></view> | |
| 14 | + <view class="headerbox-content">应用</view> | |
| 15 | + <view class="headerbox-icon"></view> | |
| 16 | + </view> | |
| 17 | + <!-- #endif --> | |
| 18 | + <!-- #ifdef H5 --> | |
| 19 | + <view class="headerbox_h5"> | |
| 20 | + <view class="headerbox-icon"></view> | |
| 21 | + <view class="headerbox-content">应用</view> | |
| 22 | + <view class="headerbox-icon"></view> | |
| 23 | + </view> | |
| 24 | + <!-- #endif --> | |
| 25 | + <view class="warpboxss" style="margin-top: 25rpx;"> | |
| 26 | + <view class="warpboxs-small-title" :style="isshow1?'padding-bottom: 30rpx;':''" @click="isshow1=!isshow1" > | |
| 27 | + <view><text class="warpboxs-small-title-line"></text>公司资料</view> | |
| 28 | + <view class="warpboxs-small-title-img"> | |
| 29 | + <image src="../../static/arrow-down.png" :style="isshow1?'transform: rotate(0deg);':'transform: rotate(-180deg);'"></image> | |
| 30 | + </view> | |
| 31 | + </view> | |
| 32 | + <view v-show="isshow1"> | |
| 33 | + <view class="fun_box_fir"> | |
| 34 | + <view class="fun_fir_1 fun_fir_border" @click="gopath('/pagesB/new1/new1?type=公司资质')"> | |
| 35 | + <!-- <view class="fun_tip" v-if="info2 && info2.leads && info2.leads.count != 0">{{info2 && info2.leads.count}}</view> --> | |
| 36 | + <image src="/static/icon/icon1.png" mode="scaleToFill"></image> | |
| 37 | + <view>公司资质</view> | |
| 38 | + </view> | |
| 39 | + <view class="fun_fir_1 fun_fir_border" @click="gopath('/pagesB/new1/new1?type=公司介绍')"> | |
| 40 | + <image src="/static/icon/icon2.png" mode="scaleToFill"></image> | |
| 41 | + <view>公司介绍</view> | |
| 42 | + </view> | |
| 43 | + <view class="fun_fir_1 fun_fir_border" @click="gopath('/pagesB/new1/new1?type=协同办公')"> | |
| 44 | + <image src="/static/icon/icon22.png" mode="scaleToFill"></image> | |
| 45 | + <view>协同办公</view> | |
| 46 | + </view> | |
| 47 | + </view> | |
| 48 | + <view class="fun_box_fir"> | |
| 49 | + <view class="fun_fir_1 fun_fir_border" @click="gopath('/pagesB/new1/new1?type=财务')"> | |
| 50 | + <!-- <view class="fun_tip" v-if="info2 && info2.leads && info2.leads.count != 0">{{info2 && info2.leads.count}}</view> --> | |
| 51 | + <image src="/static/icon/icon23.png" mode="scaleToFill"></image> | |
| 52 | + <view>财务</view> | |
| 53 | + </view> | |
| 54 | + <view class="fun_fir_1 fun_fir_border" @click="gopath('/pagesB/new1/new1?type=人力资源')"> | |
| 55 | + <image src="/static/icon/icon24.png" mode="scaleToFill"></image> | |
| 56 | + <view>人力资源</view> | |
| 57 | + </view> | |
| 58 | + <view class="fun_fir_1 fun_fir_border" @click="gopath('/pagesB/new1/new1?type=渠道管理')"> | |
| 59 | + <image src="/static/icon/icon25.png" mode="scaleToFill"></image> | |
| 60 | + <view>渠道管理</view> | |
| 61 | + </view> | |
| 62 | + </view> | |
| 63 | + <view class="fun_box_fir"> | |
| 64 | + <view class="fun_fir_1 fun_fir_border" @click="gopath('/pagesB/new1/new1?type=合约协议集合')"> | |
| 65 | + <image src="/static/icon/icon20.png" mode="scaleToFill"></image> | |
| 66 | + <view>合约协议集合</view> | |
| 67 | + </view> | |
| 68 | + </view> | |
| 69 | + </view> | |
| 70 | + </view> | |
| 71 | + | |
| 72 | + <view class="warpboxss"> | |
| 73 | + <view class="warpboxs-small-title" :style="isshow2?'padding-bottom: 30rpx;':''" @click="isshow2=!isshow2"> | |
| 74 | + <view><text class="warpboxs-small-title-line"></text>产品及服务</view> | |
| 75 | + <view class="warpboxs-small-title-img"> | |
| 76 | + <image src="../../static/arrow-down.png" :style="isshow2?'transform: rotate(0deg);':'transform: rotate(-180deg);'"></image> | |
| 77 | + </view> | |
| 78 | + </view> | |
| 79 | + <view v-show="isshow2"> | |
| 80 | + <view class="fun_box_fir"> | |
| 81 | + <view class="fun_fir_1 fun_fir_border" @click="gopath('/pagesA/product/index')"> | |
| 82 | + <!-- <view class="fun_tip" v-if="info2 && info2.leads && info2.leads.count != 0">{{info2 && info2.leads.count}}</view> --> | |
| 83 | + <image src="/static/icon/icon3.png" mode="scaleToFill"></image> | |
| 84 | + <view>公司产品</view> | |
| 85 | + </view> | |
| 86 | + <view class="fun_fir_1 fun_fir_border" @click="gopath('/pages/index/workorder/workorder')"> | |
| 87 | + <!-- <view class="fun_tip" v-if="info2 && info2.agent && info2.agent.count != 0">{{info2 && info2.agent.count}}</view> --> | |
| 88 | + <image src="/static/icon/icon4.png" mode="scaleToFill"></image> | |
| 89 | + <view>工单</view> | |
| 90 | + </view> | |
| 91 | + <view class="fun_fir_1 fun_fir_border" @click="gopath('/pagesB/new1/new1?type=产品方案')"> | |
| 92 | + <image src="/static/icon/icon26.png" mode="scaleToFill"></image> | |
| 93 | + <view>产品方案</view> | |
| 94 | + </view> | |
| 95 | + </view> | |
| 96 | + </view> | |
| 97 | + </view> | |
| 98 | + | |
| 99 | + <view class="warpboxss" v-if="isshowall"> | |
| 100 | + <view class="warpboxs-small-title" :style="isshow3?'padding-bottom: 30rpx;':''" @click="isshow3=!isshow3"> | |
| 101 | + <view><text class="warpboxs-small-title-line"></text>在线培训</view> | |
| 102 | + <view class="warpboxs-small-title-img"> | |
| 103 | + <image src="../../static/arrow-down.png" :style="isshow3?'transform: rotate(0deg);':'transform: rotate(-180deg);'"></image> | |
| 104 | + </view> | |
| 105 | + </view> | |
| 106 | + <view v-show="isshow3"> | |
| 107 | + <view class="fun_box_fir"> | |
| 108 | + <view class="fun_fir_1 fun_fir_border" @click="gopath('/pagesB/new1/new1?type=培训资料')"> | |
| 109 | + <!-- <view class="fun_tip" v-if="info2 && info2.leads && info2.leads.count != 0">{{info2 && info2.leads.count}}</view> --> | |
| 110 | + <image src="/static/icon/icon5.png" mode="scaleToFill"></image> | |
| 111 | + <view>培训资料</view> | |
| 112 | + </view> | |
| 113 | + <view class="fun_fir_1 fun_fir_border" @click="gotoPages()"> | |
| 114 | + <!-- <view class="fun_tip" v-if="info2 && info2.agent && info2.agent.count != 0">{{info2 && info2.agent.count}}</view> --> | |
| 115 | + <image src="/static/icon/icon6.png" mode="scaleToFill"></image> | |
| 116 | + <view>在线培训</view> | |
| 117 | + </view> | |
| 118 | + <!-- <view class="fun_fir_1 fun_fir_border"> | |
| 119 | + <view></view> | |
| 120 | + </view> --> | |
| 121 | + </view> | |
| 122 | + </view> | |
| 123 | + </view> | |
| 124 | + | |
| 125 | + <view class="warpboxss"> | |
| 126 | + <view class="warpboxs-small-title" :style="isshow4?'padding-bottom: 30rpx;':''" @click="isshow4=!isshow4"> | |
| 127 | + <view><text class="warpboxs-small-title-line"></text>协同办公</view> | |
| 128 | + <view class="warpboxs-small-title-img"> | |
| 129 | + <image src="../../static/arrow-down.png" :style="isshow4?'transform: rotate(0deg);':'transform: rotate(-180deg);'"></image> | |
| 130 | + </view> | |
| 131 | + </view> | |
| 132 | + <view v-show="isshow4"> | |
| 133 | + <view class="fun_box_fir"> | |
| 134 | + <view class="fun_fir_1 fun_fir_border" @click="gopath('/pagesA/punchclock/index')"> | |
| 135 | + <!-- <view class="fun_tip" v-if="info2 && info2.leads && info2.leads.count != 0">{{info2 && info2.leads.count}}</view> --> | |
| 136 | + <image src="/static/icon/icon7.png" mode="scaleToFill"></image> | |
| 137 | + <view>考勤</view> | |
| 138 | + </view> | |
| 139 | + <view class="fun_fir_1 fun_fir_border" @click="gopath('/pagesA/newbill/newbill')"> | |
| 140 | + <!-- <view class="fun_tip" v-if="info2 && info2.agent && info2.agent.count != 0">{{info2 && info2.agent.count}}</view> --> | |
| 141 | + <image src="/static/icon/icon8.png" mode="scaleToFill"></image> | |
| 142 | + <view>审批</view> | |
| 143 | + </view> | |
| 144 | + <view class="fun_fir_1 fun_fir_border" @click="gopath('/pages/index/schedule/schedule')"> | |
| 145 | + <image src="/static/icon/icon28.png" mode="scaleToFill"></image> | |
| 146 | + <view>日程</view> | |
| 147 | + </view> | |
| 148 | + <!-- <view class="fun_fir_1 fun_fir_border" @click="gopath('/pagesA/profile/needDeal')"> | |
| 149 | + <image src="/static/icon/icon9.png" mode="scaleToFill"></image> | |
| 150 | + <view>待办</view> | |
| 151 | + </view> --> | |
| 152 | + </view> | |
| 153 | + <view class="fun_box_fir" style="margin-top: -2rpx;"> | |
| 154 | + <view class="fun_fir_1 fun_fir_border" @click="gopath('/pages/news/theReminder/theReminder')"> | |
| 155 | + <!-- <view class="fun_tip" v-if="info2 && info2.examine && info2.examine.count != 0">{{info2 && info2.examine.count}}</view> --> | |
| 156 | + <image src="/static/icon/icon10.png" mode="scaleToFill"></image> | |
| 157 | + <view>通知</view> | |
| 158 | + </view> | |
| 159 | + <!-- <view class="fun_fir_1 fun_fir_border" @click="gopath('/pages/index/schedule/schedule')"> | |
| 160 | + <image src="/static/icon/icon28.png" mode="scaleToFill"></image> | |
| 161 | + <view>日程</view> | |
| 162 | + </view> --> | |
| 163 | + <!-- <view class="fun_fir_1 fun_fir_border"> | |
| 164 | + <view></view> | |
| 165 | + </view> | |
| 166 | + <view class="fun_fir_1 fun_fir_border"> | |
| 167 | + <view></view> | |
| 168 | + </view> --> | |
| 169 | + </view> | |
| 170 | + </view> | |
| 171 | + </view> | |
| 172 | + | |
| 173 | + <view class="warpboxss" v-if="isshowall"> | |
| 174 | + <view class="warpboxs-small-title" @click="isshow5=!isshow5" :style="isshow5?'padding-bottom: 30rpx;':''"> | |
| 175 | + <view><text class="warpboxs-small-title-line"></text>财务</view> | |
| 176 | + <view class="warpboxs-small-title-img"> | |
| 177 | + <image src="../../static/arrow-down.png" :style="isshow5?'transform: rotate(0deg);':'transform: rotate(-180deg);'"></image> | |
| 178 | + </view> | |
| 179 | + </view> | |
| 180 | + <view v-show="isshow5"> | |
| 181 | + <view class="fun_box_fir"> | |
| 182 | + <view class="fun_fir_1 fun_fir_border" @click="gopath('/pages/index/contract/contract')"> | |
| 183 | + <!-- <view class="fun_tip" v-if="info2 && info2.leads && info2.leads.count != 0">{{info2 && info2.leads.count}}</view> --> | |
| 184 | + <image src="/static/icon/icon11.png" mode="scaleToFill"></image> | |
| 185 | + <view>合同</view> | |
| 186 | + </view> | |
| 187 | + <view class="fun_fir_1 fun_fir_border" @click="gopath('/pagesA/payment/index')"> | |
| 188 | + <!-- <view class="fun_tip" v-if="info2 && info2.agent && info2.agent.count != 0">{{info2 && info2.agent.count}}</view> --> | |
| 189 | + <image src="/static/icon/icon12.png" mode="scaleToFill"></image> | |
| 190 | + <view>回款</view> | |
| 191 | + </view> | |
| 192 | + <view class="fun_fir_1 fun_fir_border" @click="gopath('/pagesB/fplist/fplist')"> | |
| 193 | + <!-- <view class="fun_tip" v-if="info2 && info2.examine && info2.examine.count != 0">{{info2 && info2.examine.count}}</view> --> | |
| 194 | + <image src="/static/icon/icon13.png" mode="scaleToFill"></image> | |
| 195 | + <view>发票</view> | |
| 196 | + </view> | |
| 197 | + </view> | |
| 198 | + </view> | |
| 199 | + </view> | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + <!-- 底部导航 --> | |
| 205 | + <uniTabbar v-if="tipNumber || tipNumber==3" :tipNumber="tipNumber"></uniTabbar> | |
| 206 | + </view> | |
| 207 | +</template> | |
| 208 | +<script> | |
| 209 | + import uniTabbar from '@/components/tabbara/tabbar.vue' | |
| 210 | + import { | |
| 211 | + BASE_IMG_URL | |
| 212 | + } from '@/util/api.js' | |
| 213 | + import { | |
| 214 | + pageJumps, | |
| 215 | + statisticalPageJumps | |
| 216 | + } from "@/pagesA/crm/crm_page_jumps.js"; | |
| 217 | + import { | |
| 218 | + netAgentList | |
| 219 | + } from '@/api/clues.js' | |
| 220 | + import { | |
| 221 | + getNowData | |
| 222 | + } from '@/util/weekTime.js' | |
| 223 | + import { | |
| 224 | + netGetBriefdata, | |
| 225 | + netTurnoverList | |
| 226 | + } from '@/api/kehu.js' | |
| 227 | + import { | |
| 228 | + netGetData, | |
| 229 | + netTime | |
| 230 | + } from '@/api/index.js' | |
| 231 | + import { | |
| 232 | + netMapKey | |
| 233 | + } from '@/api/login.js' | |
| 234 | + import { | |
| 235 | + getStaff102 | |
| 236 | + } from '@/api/ly.js' | |
| 237 | + import screenPop from './screen.vue' | |
| 238 | + | |
| 239 | + | |
| 240 | + export default { | |
| 241 | + mixins: [pageJumps, statisticalPageJumps], | |
| 242 | + components: { | |
| 243 | + uniTabbar, | |
| 244 | + screenPop | |
| 245 | + }, | |
| 246 | + data() { | |
| 247 | + return { | |
| 248 | + isshow1:true, | |
| 249 | + isshow2:true, | |
| 250 | + isshow3:true, | |
| 251 | + isshow4:true, | |
| 252 | + isshow5:true, | |
| 253 | + topHeight: 0, | |
| 254 | + paddingHeight: 0, | |
| 255 | + searchWidth: 470, | |
| 256 | + BASE_IMG_URL: BASE_IMG_URL, | |
| 257 | + tipNumber: 3, | |
| 258 | + typeList: ['本人及下属', '仅本人', '仅下属'], | |
| 259 | + typeIndex: 0, | |
| 260 | + dataTime: '', | |
| 261 | + startTime:'', | |
| 262 | + endTime:'', | |
| 263 | + text:'本月', | |
| 264 | + info: {}, //数据简报 数据 | |
| 265 | + info2:{}, | |
| 266 | + target_money: 0, //目标金额 | |
| 267 | + complete_money: 0, //完成 金额 | |
| 268 | + percentage: 0, //百分比 | |
| 269 | + shows: false, | |
| 270 | + approvelNum: 0, | |
| 271 | + oneChart:{}, | |
| 272 | + chartData: {}, | |
| 273 | + //业绩目标 | |
| 274 | + achieveArr:[ | |
| 275 | + {id:1,name:'合同'}, | |
| 276 | + {id:2,name:'回款'} | |
| 277 | + ], | |
| 278 | + achieveIndex:0, | |
| 279 | + roleType:1, | |
| 280 | + rules:[], | |
| 281 | + userinfo:uni.getStorageSync('userinfo'), | |
| 282 | + isshowall:true | |
| 283 | + } | |
| 284 | + }, | |
| 285 | + onLaunch() { | |
| 286 | + | |
| 287 | + }, | |
| 288 | + onLoad() { | |
| 289 | + //获取设备信息 | |
| 290 | + uni.getSystemInfo({ | |
| 291 | + success: (res) => { | |
| 292 | + let HeaderBar = 0 | |
| 293 | + // #ifdef MP-WEIXIN | |
| 294 | + let rect = wx.getMenuButtonBoundingClientRect(); | |
| 295 | + HeaderBar = rect.height + (rect.top - res.statusBarHeight) * 2 + res.statusBarHeight + 5; | |
| 296 | + this.topHeight = HeaderBar; | |
| 297 | + this.paddingHeight = rect.top | |
| 298 | + this.searchWidth = 470 | |
| 299 | + // #endif | |
| 300 | + // #ifdef MP-ALIPAY || APP-PLUS | |
| 301 | + HeaderBar = res.pixelRatio * res.statusBarHeight | |
| 302 | + this.topHeight = HeaderBar | |
| 303 | + this.paddingHeight = res.statusBarHeight | |
| 304 | + this.searchWidth = 690 | |
| 305 | + // #endif | |
| 306 | + // #ifdef H5 | |
| 307 | + this.topHeight = 72 | |
| 308 | + this.paddingHeight = 24 | |
| 309 | + this.searchWidth = 690 | |
| 310 | + // #endif | |
| 311 | + } | |
| 312 | + }) | |
| 313 | + getStaff102().then(res=>{ | |
| 314 | + console.error(res) | |
| 315 | + for (let i = 0; i < res.data.length; i++) { | |
| 316 | + if(this.userinfo.id == res.data[i]) { | |
| 317 | + this.isshowall = false | |
| 318 | + } | |
| 319 | + } | |
| 320 | + console.error(this.isshowall) | |
| 321 | + }) | |
| 322 | + | |
| 323 | + }, | |
| 324 | + onShow() { | |
| 325 | + this.roleType = uni.getStorageSync('roleType') | |
| 326 | + this.rules = uni.getStorageSync('rules') | |
| 327 | + this.dataTime = getNowData().substr(0, 7) | |
| 328 | + if (uni.getStorageSync('isAuth')) { | |
| 329 | + this.getTip() | |
| 330 | + } else { | |
| 331 | + // this.tipNumber = 0 | |
| 332 | + } | |
| 333 | + }, | |
| 334 | + methods: { | |
| 335 | + //小程序跳转 | |
| 336 | + gotoPages(){ | |
| 337 | + uni.navigateToMiniProgram({ | |
| 338 | + appId: 'wx0efbee4b6225c8ae', | |
| 339 | + success(res) { | |
| 340 | + // 打开成功 | |
| 341 | + uni.showToast({ | |
| 342 | + title: '跳转成功' | |
| 343 | + }) | |
| 344 | + | |
| 345 | + }, | |
| 346 | + fail(err) { | |
| 347 | + console.log(err) | |
| 348 | + // 打开失败/取消 | |
| 349 | + uni.showToast({ | |
| 350 | + title: '跳转不成功' | |
| 351 | + }) | |
| 352 | + } | |
| 353 | + }) | |
| 354 | + }, | |
| 355 | + gopath(e) { | |
| 356 | + if(e) { | |
| 357 | + uni.navigateTo({ | |
| 358 | + url:e, | |
| 359 | + }) | |
| 360 | + } else { | |
| 361 | + uni.showToast({ | |
| 362 | + icon:'none', | |
| 363 | + title:'暂未开通' | |
| 364 | + }) | |
| 365 | + } | |
| 366 | + }, | |
| 367 | + //业绩目标 | |
| 368 | + toTarget() { | |
| 369 | + if (this.roleType == 2 && (this.rules.indexOf('all') != -1 || this.rules.indexOf('2') != -1)) { | |
| 370 | + uni.navigateTo({ | |
| 371 | + url: '/pagesA/crm/salesTarget/salesTarget', | |
| 372 | + }) | |
| 373 | + } else { | |
| 374 | + uni.navigateTo({ | |
| 375 | + url: '/pagesA/crm/salesTarget/myTarget', | |
| 376 | + }) | |
| 377 | + } | |
| 378 | + }, | |
| 379 | + //员工列表 | |
| 380 | + jumpStaffList() { | |
| 381 | + uni.navigateTo({ | |
| 382 | + url:'/pagesA/profile/staff/stafflist/index' | |
| 383 | + }) | |
| 384 | + }, | |
| 385 | + //审批管理 | |
| 386 | + toApproveManage() { | |
| 387 | + uni.navigateTo({ | |
| 388 | + url:'/pagesA/work/approvelManage/index' | |
| 389 | + }) | |
| 390 | + }, | |
| 391 | + //业绩排名 | |
| 392 | + achieveRank() { | |
| 393 | + uni.navigateTo({ | |
| 394 | + url:'/pagesA/crm/statisticalFrom/achieveRank' | |
| 395 | + }) | |
| 396 | + }, | |
| 397 | + //切换业绩目标 | |
| 398 | + changeAchieve(e) { | |
| 399 | + this.achieveIndex = e.detail.value | |
| 400 | + // 业绩目标 | |
| 401 | + this.getTarget() | |
| 402 | + }, | |
| 403 | + | |
| 404 | + getTime() { | |
| 405 | + netTime({times:'thismonth'}).then(res=>{ | |
| 406 | + res = res.data | |
| 407 | + this.startTime = res.times[0] | |
| 408 | + this.endTime = res.times[1] | |
| 409 | + //当月 数据 简报、 | |
| 410 | + this.getData() | |
| 411 | + // 业绩目标 | |
| 412 | + this.getTarget() | |
| 413 | + }) | |
| 414 | + }, | |
| 415 | + getOpenid() { | |
| 416 | + netMapKey().then(res => { | |
| 417 | + uni.setStorageSync('mapKey', res.data.map_key) | |
| 418 | + uni.setStorageSync('appid', res.data.appid) | |
| 419 | + }) | |
| 420 | + }, | |
| 421 | + getTip() { | |
| 422 | + netAgentList().then(res => { | |
| 423 | + uni.setStorageSync('token', res.data.userinfo.token) | |
| 424 | + uni.setStorageSync('roleType', res.data.userinfo.role_type) | |
| 425 | + uni.setStorageSync('rules', res.data.userinfo.rules) | |
| 426 | + // this.tipNumber = res.data.total | |
| 427 | + this.info2 = res.data | |
| 428 | + | |
| 429 | + this.approvelNum = res.data.examine.count | |
| 430 | + //获取默认 时间的数据 | |
| 431 | + this.getTime() | |
| 432 | + //获取appid | |
| 433 | + this.getOpenid() | |
| 434 | + }) | |
| 435 | + }, | |
| 436 | + getData() { | |
| 437 | + let params = { | |
| 438 | + times: this.startTime+','+this.endTime, | |
| 439 | + type: this.typeIndex | |
| 440 | + } | |
| 441 | + netGetBriefdata(params).then(res => { | |
| 442 | + this.info = res.data | |
| 443 | + }) | |
| 444 | + }, | |
| 445 | + getTarget() { | |
| 446 | + let params = { | |
| 447 | + times: this.startTime+','+this.endTime, | |
| 448 | + type: this.typeIndex, | |
| 449 | + status: this.achieveArr[this.achieveIndex].id, | |
| 450 | + } | |
| 451 | + netGetData(params).then(res => { | |
| 452 | + this.complete_money = res.data.contract_moneys | |
| 453 | + this.target_money = res.data.achievement | |
| 454 | + let ratio = res.data.ratio>=100?100:res.data.ratio | |
| 455 | + let obj = { | |
| 456 | + series: [{ | |
| 457 | + name: "已完成", | |
| 458 | + color: "#2979ff", | |
| 459 | + data: ratio/100 | |
| 460 | + }] | |
| 461 | + }; | |
| 462 | + let b = { | |
| 463 | + title: { | |
| 464 | + name: res.data.ratio+'%', | |
| 465 | + fontSize: 18, | |
| 466 | + color: "#2979ff" | |
| 467 | + }, | |
| 468 | + subtitle: { | |
| 469 | + name: "完成率", | |
| 470 | + fontSize: 15, | |
| 471 | + color: "#666666" | |
| 472 | + }, | |
| 473 | + extra: { | |
| 474 | + arcbar: { | |
| 475 | + type: "circle", | |
| 476 | + width: 12, | |
| 477 | + backgroundColor: "#E9E9E9", | |
| 478 | + startAngle: 1.5, | |
| 479 | + endAngle: 0.25, | |
| 480 | + gap: 2 | |
| 481 | + } | |
| 482 | + } | |
| 483 | + } | |
| 484 | + this.oneChart = b | |
| 485 | + this.chartData = obj; | |
| 486 | + }) | |
| 487 | + }, | |
| 488 | + changeType(e) { | |
| 489 | + this.typeIndex = e.detail.value | |
| 490 | + this.getData() | |
| 491 | + this.getTarget() | |
| 492 | + }, | |
| 493 | + changeDataTime(e) { | |
| 494 | + this.$refs.screenChild.init() | |
| 495 | + }, | |
| 496 | + sureTime(params) { | |
| 497 | + console.log(params,'====') | |
| 498 | + if(params.text && params.start_time && params.end_time){ | |
| 499 | + this.text = params.text | |
| 500 | + this.startTime = params.start_time | |
| 501 | + this.endTime = params.end_time | |
| 502 | + this.getData() | |
| 503 | + this.getTarget() | |
| 504 | + } | |
| 505 | + }, | |
| 506 | + //产品列表 | |
| 507 | + toProductList() { | |
| 508 | + uni.navigateTo({ | |
| 509 | + url: '/pagesA/product/index' | |
| 510 | + }) | |
| 511 | + }, | |
| 512 | + | |
| 513 | + //项目列表 | |
| 514 | + toBusinessList(){ | |
| 515 | + uni.navigateTo({ | |
| 516 | + url: '/pagesA/business/my_business' | |
| 517 | + }) | |
| 518 | + }, | |
| 519 | + | |
| 520 | + toWorkorderList(){ | |
| 521 | + uni.navigateTo({ | |
| 522 | + url: '/pages/index/workorder/workorder' | |
| 523 | + }) | |
| 524 | + }, | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + //回款列表 | |
| 529 | + toPayment() { | |
| 530 | + uni.navigateTo({ | |
| 531 | + url: '/pagesA/payment/index' | |
| 532 | + }) | |
| 533 | + }, | |
| 534 | + //费用管理 | |
| 535 | + toCostList() { | |
| 536 | + uni.navigateTo({ | |
| 537 | + url: '/pagesA/cost/index' | |
| 538 | + }) | |
| 539 | + }, | |
| 540 | + //回款列表 | |
| 541 | + toPayment() { | |
| 542 | + uni.navigateTo({ | |
| 543 | + url: '/pagesA/payment/index' | |
| 544 | + }) | |
| 545 | + }, | |
| 546 | + //回款计划 | |
| 547 | + toPayPlan() { | |
| 548 | + uni.navigateTo({ | |
| 549 | + url: '/pagesA/payplan/index' | |
| 550 | + }) | |
| 551 | + }, | |
| 552 | + //业绩统计 | |
| 553 | + achieveStatis() { | |
| 554 | + uni.navigateTo({ | |
| 555 | + url:'/pagesA/crm/statisticalFrom/achieveStatis' | |
| 556 | + }) | |
| 557 | + }, | |
| 558 | + //打卡 | |
| 559 | + toClock() { | |
| 560 | + uni.navigateTo({ | |
| 561 | + url:'/pagesA/punchclock/index' | |
| 562 | + }) | |
| 563 | + }, | |
| 564 | + //项目 | |
| 565 | + toBusiness() { | |
| 566 | + uni.navigateTo({ | |
| 567 | + url:'/pagesA/business/index' | |
| 568 | + }) | |
| 569 | + }, | |
| 570 | + //数据简报的 项目 | |
| 571 | + toCheckBusiness() { | |
| 572 | + uni.navigateTo({ | |
| 573 | + url:'/pagesA/business/index?type='+this.typeIndex+'&stime='+this.startTime+'&etime='+this.endTime, | |
| 574 | + }) | |
| 575 | + }, | |
| 576 | + //客户成交量 未成交量 | |
| 577 | + toCus(status) { | |
| 578 | + uni.navigateTo({ | |
| 579 | + url:'/pagesA/crm/customerManagement/customerManagement?cusStatus='+status+'&stime='+this.startTime+'&etime='+this.endTime, | |
| 580 | + }) | |
| 581 | + }, | |
| 582 | + //项目成交量 未成交量 | |
| 583 | + toBus(status) { | |
| 584 | + uni.navigateTo({ | |
| 585 | + url:'/pagesA/business/index?busStatus='+status+'&stime='+this.startTime+'&etime='+this.endTime, | |
| 586 | + }) | |
| 587 | + }, | |
| 588 | + //线索池 | |
| 589 | + toCluePool() { | |
| 590 | + uni.navigateTo({ | |
| 591 | + url:'/pagesB/cluepool/index' | |
| 592 | + }) | |
| 593 | + } | |
| 594 | + } | |
| 595 | + } | |
| 596 | +</script> | |
| 597 | + | |
| 598 | +<style lang="scss" scoped> | |
| 599 | + .fun_box_fir_a{ | |
| 600 | + display: flex; | |
| 601 | + align-items: center; | |
| 602 | + border-top: 2rpx solid #efefef; | |
| 603 | + .fun_fir_1{ | |
| 604 | + flex-shrink: 0; | |
| 605 | + background:#fff; | |
| 606 | + text-align: center; | |
| 607 | + width:50%; | |
| 608 | + padding: 30rpx 0; | |
| 609 | + display: flex; | |
| 610 | + flex-direction: column; | |
| 611 | + justify-content: center; | |
| 612 | + align-items: center; | |
| 613 | + font-size:24rpx; | |
| 614 | + color:#000; | |
| 615 | + position: relative; | |
| 616 | + .fun_tip{ | |
| 617 | + position: absolute; | |
| 618 | + right:150rpx; | |
| 619 | + top:18rpx; | |
| 620 | + background:#F13E27; | |
| 621 | + color:#fff; | |
| 622 | + font-size:20rpx; | |
| 623 | + width:34rpx; | |
| 624 | + height:34rpx; | |
| 625 | + border-radius: 50%; | |
| 626 | + text-align: center; | |
| 627 | + line-height: 34rpx; | |
| 628 | + z-index:2; | |
| 629 | + } | |
| 630 | + image{ | |
| 631 | + width:45rpx; | |
| 632 | + height:45rpx; | |
| 633 | + margin-bottom:15rpx; | |
| 634 | + } | |
| 635 | + } | |
| 636 | + .fun_fir_border { | |
| 637 | + border-bottom: 2rpx solid #efefef; | |
| 638 | + border-right: 2rpx solid #efefef; | |
| 639 | + } | |
| 640 | + .fun_fir_border_right { | |
| 641 | + border-right: 2rpx solid #efefef; | |
| 642 | + } | |
| 643 | + } | |
| 644 | + .fun_box_fir{ | |
| 645 | + display: flex; | |
| 646 | + align-items: center; | |
| 647 | + .fun_fir_1{ | |
| 648 | + flex-shrink: 0; | |
| 649 | + background:#fff; | |
| 650 | + text-align: center; | |
| 651 | + width:33%; | |
| 652 | + display: flex; | |
| 653 | + flex-direction: column; | |
| 654 | + justify-content: center; | |
| 655 | + align-items: center; | |
| 656 | + font-size:24rpx; | |
| 657 | + color:#000; | |
| 658 | + position: relative; | |
| 659 | + height: 170rpx; | |
| 660 | + .fun_tip{ | |
| 661 | + position: absolute; | |
| 662 | + right: 85rpx; | |
| 663 | + top:18rpx; | |
| 664 | + background:#F13E27; | |
| 665 | + color:#fff; | |
| 666 | + font-size:20rpx; | |
| 667 | + width:34rpx; | |
| 668 | + height:34rpx; | |
| 669 | + border-radius: 50%; | |
| 670 | + text-align: center; | |
| 671 | + line-height: 34rpx; | |
| 672 | + z-index: 10; | |
| 673 | + | |
| 674 | + } | |
| 675 | + image{ | |
| 676 | + width:45rpx; | |
| 677 | + height:45rpx; | |
| 678 | + margin-bottom:15rpx; | |
| 679 | + } | |
| 680 | + } | |
| 681 | + .fun_fir_border { | |
| 682 | + border-top: 2rpx solid #efefef; | |
| 683 | + border-bottom: 2rpx solid #efefef; | |
| 684 | + border-right: 2rpx solid #efefef; | |
| 685 | + border-left: 2rpx solid #efefef; | |
| 686 | + } | |
| 687 | + .fun_fir_border_right { | |
| 688 | + border-right: 2rpx solid #efefef; | |
| 689 | + } | |
| 690 | + } | |
| 691 | + .message_num { | |
| 692 | + width: 20rpx; | |
| 693 | + height: 20rpx; | |
| 694 | + border-radius: 20rpx; | |
| 695 | + color: #fff; | |
| 696 | + position: relative; | |
| 697 | + top: 0; | |
| 698 | + right: 0; | |
| 699 | + } | |
| 700 | + .color{ | |
| 701 | + background: #fff; | |
| 702 | + } | |
| 703 | + .colore{ | |
| 704 | + background: #f00; | |
| 705 | + } | |
| 706 | + .warpboxs{ | |
| 707 | + width:100%; | |
| 708 | + box-sizing: border-box; | |
| 709 | + background:#fff; | |
| 710 | + margin-bottom: 20rpx; | |
| 711 | + .warptitle{ | |
| 712 | + font-size:26rpx; | |
| 713 | + color:#333; | |
| 714 | + margin-bottom:30rpx; | |
| 715 | + } | |
| 716 | + .warptitle-left { | |
| 717 | + display: flex; | |
| 718 | + align-items: center; | |
| 719 | + image { | |
| 720 | + width: 34rpx; | |
| 721 | + height: 34rpx; | |
| 722 | + margin-right: 10rpx; | |
| 723 | + } | |
| 724 | + } | |
| 725 | + .warptitle-arrow-right { | |
| 726 | + image { | |
| 727 | + width: 24rpx; | |
| 728 | + height: 24rpx; | |
| 729 | + } | |
| 730 | + } | |
| 731 | + .fun_box{ | |
| 732 | + display: flex; | |
| 733 | + justify-content: flex-start; | |
| 734 | + align-items: center; | |
| 735 | + flex-wrap:wrap; | |
| 736 | + .fun_fir{ | |
| 737 | + flex-shrink: 0; | |
| 738 | + background:#fff; | |
| 739 | + border-radius: 10rpx; | |
| 740 | + text-align: center; | |
| 741 | + width:142rpx; | |
| 742 | + height:115rpx; | |
| 743 | + margin-right:24rpx; | |
| 744 | + margin-bottom:24rpx; | |
| 745 | + display: flex; | |
| 746 | + flex-direction: column; | |
| 747 | + justify-content: center; | |
| 748 | + align-items: center; | |
| 749 | + font-size:24rpx; | |
| 750 | + color:#000; | |
| 751 | + &:nth-child(4n){ | |
| 752 | + margin-right:0; | |
| 753 | + } | |
| 754 | + image{ | |
| 755 | + width:50rpx; | |
| 756 | + height:50rpx; | |
| 757 | + margin-bottom:15rpx; | |
| 758 | + } | |
| 759 | + } | |
| 760 | + | |
| 761 | + } | |
| 762 | + } | |
| 763 | + .u-progress-info { | |
| 764 | + text-align: center; | |
| 765 | + } | |
| 766 | + | |
| 767 | + .headerbox_h5 { | |
| 768 | + display: flex; | |
| 769 | + justify-content: flex-start; | |
| 770 | + align-items: center; | |
| 771 | + padding-top: var(--status-bar-height); | |
| 772 | + padding-left: 30rpx; | |
| 773 | + z-index: 9; | |
| 774 | + background: #f2f3f5; | |
| 775 | + box-sizing: border-box; | |
| 776 | + width: 100%; | |
| 777 | + height: 100rpx; | |
| 778 | + .headerbox-icon { | |
| 779 | + width:16%; | |
| 780 | + image { | |
| 781 | + width: 40rpx; | |
| 782 | + height: 40rpx; | |
| 783 | + margin-top: 10rpx; | |
| 784 | + } | |
| 785 | + } | |
| 786 | + .headerbox-content { | |
| 787 | + width: 64%; | |
| 788 | + height: 60rpx; | |
| 789 | + line-height: 60rpx; | |
| 790 | + text-align: center; | |
| 791 | + } | |
| 792 | + .search_box { | |
| 793 | + height: 60rpx; | |
| 794 | + border-radius: 30rpx; | |
| 795 | + background: #fff; | |
| 796 | + display: flex; | |
| 797 | + justify-content: flex-start; | |
| 798 | + align-items: center; | |
| 799 | + padding: 0 15rpx; | |
| 800 | + | |
| 801 | + .iconsearch { | |
| 802 | + width: 34rpx; | |
| 803 | + height: 34rpx; | |
| 804 | + margin-right: 10rpx; | |
| 805 | + } | |
| 806 | + | |
| 807 | + .self_search { | |
| 808 | + font-size: 24rpx; | |
| 809 | + color: #333; | |
| 810 | + height: 58rpx; | |
| 811 | + line-height: 58rpx; | |
| 812 | + padding: 0; | |
| 813 | + margin: 0; | |
| 814 | + width: 500rpx; | |
| 815 | + } | |
| 816 | + } | |
| 817 | + } | |
| 818 | + | |
| 819 | + .headerbox { | |
| 820 | + background: #fff; | |
| 821 | + box-sizing: border-box; | |
| 822 | + width: 100%; | |
| 823 | + height: 150rpx; | |
| 824 | + position: fixed; | |
| 825 | + left: 0; | |
| 826 | + top: 0rpx; | |
| 827 | + padding-top: var(--status-bar-height); | |
| 828 | + padding-left: 30rpx; | |
| 829 | + z-index: 9; | |
| 830 | + display: flex; | |
| 831 | + justify-content: space-between; | |
| 832 | + .headerbox-icon { | |
| 833 | + width:10%; | |
| 834 | + image { | |
| 835 | + width: 40rpx; | |
| 836 | + height: 40rpx; | |
| 837 | + margin-top: 10rpx; | |
| 838 | + } | |
| 839 | + } | |
| 840 | + .headerbox-content { | |
| 841 | + width: 80%; | |
| 842 | + height: 60rpx; | |
| 843 | + line-height: 60rpx; | |
| 844 | + text-align: center; | |
| 845 | + } | |
| 846 | + .search_box { | |
| 847 | + height: 60rpx; | |
| 848 | + border-radius: 30rpx; | |
| 849 | + background: #fff; | |
| 850 | + display: flex; | |
| 851 | + justify-content: flex-start; | |
| 852 | + align-items: center; | |
| 853 | + padding: 0 15rpx; | |
| 854 | + | |
| 855 | + .icon-search { | |
| 856 | + width: 34rpx; | |
| 857 | + height: 34rpx; | |
| 858 | + margin-right: 10rpx; | |
| 859 | + position: relative; | |
| 860 | + | |
| 861 | + &::before { | |
| 862 | + content: ''; | |
| 863 | + width: 0; | |
| 864 | + height: 0; | |
| 865 | + } | |
| 866 | + } | |
| 867 | + | |
| 868 | + .self_search { | |
| 869 | + font-size: 24rpx; | |
| 870 | + color: #666; | |
| 871 | + height: 58rpx; | |
| 872 | + line-height: 58rpx; | |
| 873 | + padding: 0; | |
| 874 | + margin: 0; | |
| 875 | + width: 500rpx; | |
| 876 | + } | |
| 877 | + } | |
| 878 | + } | |
| 879 | + | |
| 880 | + .topbox { | |
| 881 | + width: 100%; | |
| 882 | + background: linear-gradient(180deg, #DFF0FF 0%, #F1F4F6 48%, #F4F4F4 100%); | |
| 883 | + | |
| 884 | + .top_warp { | |
| 885 | + width: 100%; | |
| 886 | + display: flex; | |
| 887 | + justify-content: space-between; | |
| 888 | + align-items: center; | |
| 889 | + box-sizing: border-box; | |
| 890 | + padding: 30rpx 60rpx; | |
| 891 | + text-align: center; | |
| 892 | + | |
| 893 | + .top_fir { | |
| 894 | + font-size: 24rpx; | |
| 895 | + color: #333; | |
| 896 | + | |
| 897 | + image { | |
| 898 | + width: 70rpx; | |
| 899 | + height: 70rpx; | |
| 900 | + margin-bottom: 10rpx; | |
| 901 | + } | |
| 902 | + } | |
| 903 | + } | |
| 904 | + } | |
| 905 | + | |
| 906 | + .fun_warp { | |
| 907 | + padding: 30rpx 24rpx; | |
| 908 | + background: #fff; | |
| 909 | + width: 710rpx; | |
| 910 | + margin: 0 auto; | |
| 911 | + border-radius: 10rpx; | |
| 912 | + box-shadow: 1rpx 1rpx 10rpx rgba(0, 0, 0, 0.1); | |
| 913 | + | |
| 914 | + .fun_top { | |
| 915 | + display: flex; | |
| 916 | + justify-content: space-between; | |
| 917 | + align-items: center; | |
| 918 | + margin-bottom: 25rpx; | |
| 919 | + | |
| 920 | + .fun_tit { | |
| 921 | + font-size: 26rpx; | |
| 922 | + color: #333333; | |
| 923 | + font-weight: 700; | |
| 924 | + } | |
| 925 | + } | |
| 926 | + | |
| 927 | + .fun_box { | |
| 928 | + display: flex; | |
| 929 | + justify-content: flex-start; | |
| 930 | + align-items: center; | |
| 931 | + flex-wrap: wrap; | |
| 932 | + | |
| 933 | + .fun_fir { | |
| 934 | + flex-shrink: 0; | |
| 935 | + background: #fff; | |
| 936 | + border-radius: 10rpx; | |
| 937 | + text-align: center; | |
| 938 | + width: 23%; | |
| 939 | + height: 150rpx; | |
| 940 | + margin-right: 14rpx; | |
| 941 | + margin-bottom: 24rpx; | |
| 942 | + display: flex; | |
| 943 | + flex-direction: column; | |
| 944 | + justify-content: center; | |
| 945 | + align-items: center; | |
| 946 | + font-size: 24rpx; | |
| 947 | + color: #000; | |
| 948 | + position: relative; | |
| 949 | + | |
| 950 | + &:nth-child(4n) { | |
| 951 | + margin-right: 0; | |
| 952 | + } | |
| 953 | + | |
| 954 | + image { | |
| 955 | + width: 50rpx; | |
| 956 | + height: 50rpx; | |
| 957 | + margin-bottom: 15rpx; | |
| 958 | + } | |
| 959 | + | |
| 960 | + .tab-number { | |
| 961 | + font-size: 24rpx; | |
| 962 | + color: #fff; | |
| 963 | + background: #F43F3B; | |
| 964 | + width: 40rpx; | |
| 965 | + height: 40rpx; | |
| 966 | + border-radius: 50%; | |
| 967 | + text-align: center; | |
| 968 | + line-height: 40rpx; | |
| 969 | + position: absolute; | |
| 970 | + right: 30rpx; | |
| 971 | + top: 0; | |
| 972 | + } | |
| 973 | + } | |
| 974 | + } | |
| 975 | + } | |
| 976 | + | |
| 977 | + .pre-right { | |
| 978 | + display: flex; | |
| 979 | + justify-content: flex-end; | |
| 980 | + align-items: center; | |
| 981 | + padding: 0 30rpx; | |
| 982 | + margin: 20rpx 0 30rpx 0; | |
| 983 | + .form_right { | |
| 984 | + width: 180rpx; | |
| 985 | + height: 50rpx; | |
| 986 | + line-height: 48rpx; | |
| 987 | + border-radius: 8rpx; | |
| 988 | + background: #fff; | |
| 989 | + margin-right: 15rpx; | |
| 990 | + font-size: 22rpx; | |
| 991 | + color: #666; | |
| 992 | + text-align: center; | |
| 993 | + display: flex; | |
| 994 | + justify-content: center; | |
| 995 | + align-items: center; | |
| 996 | + box-shadow: 2rpx 2rpx 50rpx rgba(0, 0, 0, 0.1); | |
| 997 | + | |
| 998 | + .bottomimg { | |
| 999 | + width: 20rpx; | |
| 1000 | + height: 33rpx; | |
| 1001 | + } | |
| 1002 | + } | |
| 1003 | + | |
| 1004 | + // .newimg{ | |
| 1005 | + // image{ | |
| 1006 | + // width:20rpx; | |
| 1007 | + // height:33rpx; | |
| 1008 | + // } | |
| 1009 | + // } | |
| 1010 | + } | |
| 1011 | + | |
| 1012 | + .dataPre { | |
| 1013 | + background-color: #fff; | |
| 1014 | + border-radius: 10rpx; | |
| 1015 | + box-sizing: border-box; | |
| 1016 | + padding: 20rpx 0 40rpx; | |
| 1017 | + margin: 0 24rpx 30rpx 24rpx; | |
| 1018 | + border-radius: 20rpx; | |
| 1019 | + box-shadow: 1rpx 1rpx 10rpx rgba(0, 0, 0, 0.1); | |
| 1020 | + | |
| 1021 | + .pre_content { | |
| 1022 | + background-color: #fff; | |
| 1023 | + display: flex; | |
| 1024 | + flex-wrap: wrap; | |
| 1025 | + .content_item { | |
| 1026 | + width: 33.33%; | |
| 1027 | + text-align: center; | |
| 1028 | + :first-child { | |
| 1029 | + font-size: 32rpx; | |
| 1030 | + font-weight: 600; | |
| 1031 | + margin-top: 26rpx; | |
| 1032 | + margin-bottom: 10rpx; | |
| 1033 | + color:#333; | |
| 1034 | + overflow: hidden; | |
| 1035 | + text-overflow: ellipsis; | |
| 1036 | + white-space: nowrap; | |
| 1037 | + } | |
| 1038 | + :last-child { | |
| 1039 | + font-size: 24rpx; | |
| 1040 | + padding: 0 20rpx; | |
| 1041 | + color: #999; | |
| 1042 | + } | |
| 1043 | + } | |
| 1044 | + } | |
| 1045 | + } | |
| 1046 | + | |
| 1047 | + .pre_list { | |
| 1048 | + display: flex; | |
| 1049 | + justify-content: space-between; | |
| 1050 | + align-items: center; | |
| 1051 | + padding: 20rpx 30rpx; | |
| 1052 | + | |
| 1053 | + .pre_title { | |
| 1054 | + font-size: 28rpx; | |
| 1055 | + font-weight: 700; | |
| 1056 | + } | |
| 1057 | + } | |
| 1058 | + | |
| 1059 | + .body_head { | |
| 1060 | + width: 702rpx; | |
| 1061 | + margin: 0 auto; | |
| 1062 | + box-sizing: border-box; | |
| 1063 | + padding: 30rpx; | |
| 1064 | + border-radius: 20rpx; | |
| 1065 | + background: #fff; | |
| 1066 | + box-shadow: 1rpx 1rpx 10rpx rgba(0, 0, 0, 0.1); | |
| 1067 | + z-index: 5; | |
| 1068 | + .conwarp{ | |
| 1069 | + display: flex; | |
| 1070 | + justify-content: space-between; | |
| 1071 | + align-items: center; | |
| 1072 | + .con_title { | |
| 1073 | + font-weight: 700; | |
| 1074 | + font-size: 28rpx; | |
| 1075 | + } | |
| 1076 | + .achivebox{ | |
| 1077 | + font-size:24rpx; | |
| 1078 | + display: flex; | |
| 1079 | + justify-content: center; | |
| 1080 | + align-items: center; | |
| 1081 | + .achitit{ | |
| 1082 | + margin-right:10rpx; | |
| 1083 | + } | |
| 1084 | + .bottomimg{ | |
| 1085 | + width: 35rpx; | |
| 1086 | + height: 33rpx; | |
| 1087 | + } | |
| 1088 | + } | |
| 1089 | + } | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + .con_head { | |
| 1093 | + display: flex; | |
| 1094 | + align-items: center; | |
| 1095 | + | |
| 1096 | + .dountChart { | |
| 1097 | + margin-top: 70rpx; | |
| 1098 | + width: 350rpx; | |
| 1099 | + height: 350rpx; | |
| 1100 | + margin-right: 24rpx; | |
| 1101 | + } | |
| 1102 | + | |
| 1103 | + .money_show { | |
| 1104 | + padding-top: 45rpx; | |
| 1105 | + | |
| 1106 | + .money_target { | |
| 1107 | + :first-child { | |
| 1108 | + margin-bottom: 30rpx; | |
| 1109 | + color: #666; | |
| 1110 | + } | |
| 1111 | + | |
| 1112 | + :last-child { | |
| 1113 | + font-size: 40rpx; | |
| 1114 | + margin-bottom: 30rpx; | |
| 1115 | + color: #000; | |
| 1116 | + } | |
| 1117 | + } | |
| 1118 | + } | |
| 1119 | + } | |
| 1120 | + } | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + .warpboxss{ | |
| 1127 | + //width:100%; | |
| 1128 | + //box-sizing: border-box; | |
| 1129 | + background:#fff; | |
| 1130 | + padding: 30rpx; | |
| 1131 | + margin: 0 25rpx 40rpx 25rpx; | |
| 1132 | + border-radius: 10rpx; | |
| 1133 | + box-shadow: 0 10rpx 20rpx #b8c6d7; | |
| 1134 | + // margin-top: 25rpx; | |
| 1135 | + .warpboxs-small-title { | |
| 1136 | + //padding: 30rpx 0; | |
| 1137 | + display: flex; | |
| 1138 | + justify-content: space-between; | |
| 1139 | + align-items: center; | |
| 1140 | + font-size: 30rpx; | |
| 1141 | + font-weight: bold; | |
| 1142 | + color: #000; | |
| 1143 | + .warpboxs-small-title-line { | |
| 1144 | + display: inline-block; | |
| 1145 | + background-color: #1a75e0; | |
| 1146 | + height: 26rpx; | |
| 1147 | + width: 10rpx; | |
| 1148 | + margin-right: 10rpx; | |
| 1149 | + } | |
| 1150 | + .warpboxs-small-title-img { | |
| 1151 | + display: flex; | |
| 1152 | + align-items: center; | |
| 1153 | + image { | |
| 1154 | + width: 40rpx; | |
| 1155 | + height: 40rpx; | |
| 1156 | + } | |
| 1157 | + } | |
| 1158 | + } | |
| 1159 | + .fun_box{ | |
| 1160 | + display: flex; | |
| 1161 | + justify-content: flex-start; | |
| 1162 | + align-items: center; | |
| 1163 | + flex-wrap:wrap; | |
| 1164 | + .fun_fir{ | |
| 1165 | + flex-shrink: 0; | |
| 1166 | + background:#fff; | |
| 1167 | + border-radius: 10rpx; | |
| 1168 | + text-align: center; | |
| 1169 | + width:25%; | |
| 1170 | + //height:115rpx; | |
| 1171 | + display: flex; | |
| 1172 | + flex-direction: column; | |
| 1173 | + justify-content: center; | |
| 1174 | + align-items: center; | |
| 1175 | + font-size:24rpx; | |
| 1176 | + color:#666666; | |
| 1177 | + margin-top: 40rpx; | |
| 1178 | + image{ | |
| 1179 | + width:46rpx; | |
| 1180 | + height:46rpx; | |
| 1181 | + margin-bottom:15rpx; | |
| 1182 | + } | |
| 1183 | + } | |
| 1184 | + | |
| 1185 | + } | |
| 1186 | + } | |
| 1187 | +</style> | ... | ... |
绿纤uni-app/pages/home/home.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <view class="warpbox"> | |
| 3 | + <!-- 业务操作板块 --> | |
| 4 | + <view class="warpboxss"> | |
| 5 | + <view class="warpboxs-small-title" :style="isshow1?'padding-bottom: 30rpx;':''" @click="isshow1=!isshow1"> | |
| 6 | + <view><text class="warpboxs-small-title-line"></text>业务操作</view> | |
| 7 | + <view class="warpboxs-small-title-img"> | |
| 8 | + <u-icon name="arrow-down" size="20" color="#666" :style="isshow1?'transform: rotate(0deg);':'transform: rotate(-180deg);'"></u-icon> | |
| 9 | + </view> | |
| 10 | + </view> | |
| 11 | + <view v-show="isshow1"> | |
| 12 | + <view class="fun_box_fir"> | |
| 13 | + <view v-if="iskjb" class="fun_fir_1 fun_fir_border" @click="goToPage('/pages/lx/lx')"> | |
| 14 | + <view class="icon"> | |
| 15 | + <image src="/static/home/order.png" mode="aspectFit"></image> | |
| 16 | + </view> | |
| 17 | + <view>开单</view> | |
| 18 | + </view> | |
| 19 | + <view v-if="iskjb" class="fun_fir_1 fun_fir_border" @click="goToPage('/pages/lx/lx?type=1')"> | |
| 20 | + <view class="icon"> | |
| 21 | + <image src="/static/home/activity-order.png" mode="aspectFit"></image> | |
| 22 | + </view> | |
| 23 | + <view>活动开单</view> | |
| 24 | + </view> | |
| 25 | + <view v-if="iskjb" class="fun_fir_1 fun_fir_border" @click="goToPage('/pages/member-consume/member-consume')"> | |
| 26 | + <view class="icon"> | |
| 27 | + <image src="/static/home/consume-card.png" mode="aspectFit"></image> | |
| 28 | + </view> | |
| 29 | + <view>耗卡</view> | |
| 30 | + </view> | |
| 31 | + </view> | |
| 32 | + <view class="fun_box_fir"> | |
| 33 | + <view v-if="iskjb" class="fun_fir_1 fun_fir_border" @click="goToPage('/pages/refund/refund')"> | |
| 34 | + <view class="icon"> | |
| 35 | + <image src="/static/home/refund-card.png" mode="aspectFit"></image> | |
| 36 | + </view> | |
| 37 | + <view>退卡</view> | |
| 38 | + </view> | |
| 39 | + <view v-if="iskjb" class="fun_fir_1 fun_fir_border" @click="goToPage('/pages/transferCard/transferCard')"> | |
| 40 | + <view class="icon"> | |
| 41 | + <image src="/static/home/transfer-card.png" mode="aspectFit"></image> | |
| 42 | + </view> | |
| 43 | + <view>转卡</view> | |
| 44 | + </view> | |
| 45 | + <view v-if="iskjb" class="fun_fir_1 fun_fir_border" @click="goToPage('/pages/member-create/member-create')"> | |
| 46 | + <view class="icon"> | |
| 47 | + <image src="/static/home/create-member.png" mode="aspectFit"></image> | |
| 48 | + </view> | |
| 49 | + <view>建档</view> | |
| 50 | + </view> | |
| 51 | + </view> | |
| 52 | + <view class="fun_box_fir"> | |
| 53 | + <view v-if="iskjb" class="fun_fir_1 fun_fir_border" @click="goToPage('/pages/expansion/expansion')"> | |
| 54 | + <view class="icon"> | |
| 55 | + <image src="/static/home/expansion.png" mode="aspectFit"></image> | |
| 56 | + </view> | |
| 57 | + <view>拓客</view> | |
| 58 | + </view> | |
| 59 | + <view v-if="iskjb" class="fun_fir_1 fun_fir_border" @click="goToPage('/pages/lx/lx?time=2025-10-01')"> | |
| 60 | + <view class="icon"> | |
| 61 | + <image src="/static/home/dingxuan-order.png" mode="aspectFit"></image> | |
| 62 | + </view> | |
| 63 | + <view>鼎轩开单</view> | |
| 64 | + </view> | |
| 65 | + </view> | |
| 66 | + </view> | |
| 67 | + </view> | |
| 68 | + | |
| 69 | + <!-- 会员管理板块 --> | |
| 70 | + <view class="warpboxss"> | |
| 71 | + <view class="warpboxs-small-title" :style="isshow2?'padding-bottom: 30rpx;':''" @click="isshow2=!isshow2"> | |
| 72 | + <view><text class="warpboxs-small-title-line"></text>会员管理</view> | |
| 73 | + <view class="warpboxs-small-title-img"> | |
| 74 | + <u-icon name="arrow-down" size="20" color="#666" :style="isshow2?'transform: rotate(0deg);':'transform: rotate(-180deg);'"></u-icon> | |
| 75 | + </view> | |
| 76 | + </view> | |
| 77 | + <view v-show="isshow2"> | |
| 78 | + <view class="fun_box_fir"> | |
| 79 | + <view class="fun_fir_1 fun_fir_border" @click="goToPage('/pages/clue-list/clue-list')"> | |
| 80 | + <view class="icon"> | |
| 81 | + <image src="/static/home/member.png" mode="aspectFit"></image> | |
| 82 | + </view> | |
| 83 | + <view>会员</view> | |
| 84 | + </view> | |
| 85 | + </view> | |
| 86 | + </view> | |
| 87 | + </view> | |
| 88 | + | |
| 89 | + <!-- 采购报销板块 --> | |
| 90 | + <view class="warpboxss"> | |
| 91 | + <view class="warpboxs-small-title" :style="isshow3?'padding-bottom: 30rpx;':''" @click="isshow3=!isshow3"> | |
| 92 | + <view><text class="warpboxs-small-title-line"></text>采购报销</view> | |
| 93 | + <view class="warpboxs-small-title-img"> | |
| 94 | + <u-icon name="arrow-down" size="20" color="#666" :style="isshow3?'transform: rotate(0deg);':'transform: rotate(-180deg);'"></u-icon> | |
| 95 | + </view> | |
| 96 | + </view> | |
| 97 | + <view v-show="isshow3"> | |
| 98 | + <view class="fun_box_fir"> | |
| 99 | + <view class="fun_fir_1 fun_fir_border" @click="goToPage('/pages/purchase-list/purchase-list')"> | |
| 100 | + <view class="icon"> | |
| 101 | + <image src="/static/home/purchase.png" mode="aspectFit"></image> | |
| 102 | + </view> | |
| 103 | + <view>物品购买</view> | |
| 104 | + </view> | |
| 105 | + <view class="fun_fir_1 fun_fir_border" @click="goToPage('/pages/reimbursement-list/reimbursement-list')"> | |
| 106 | + <view class="icon"> | |
| 107 | + <image src="/static/home/reimbursement-apply.png" mode="aspectFit"></image> | |
| 108 | + </view> | |
| 109 | + <view>报销申请</view> | |
| 110 | + </view> | |
| 111 | + <view v-if="newuserInfo.gw == '董事长' || newuserInfo.gw == '总裁' || newuserInfo.gw == '总经理' || newuserInfo.gw == '主管' || newuserInfo.mobilePhone == '18884847552' || newuserInfo.mobilePhone == '17882512738' || newuserInfo.mobilePhone == '18588888888'" class="fun_fir_1 fun_fir_border" @click="goToPage('/pages/reimbursement-audit-list/reimbursement-audit-list')"> | |
| 112 | + <view class="icon"> | |
| 113 | + <image src="/static/home/reimbursement-audit.png" mode="aspectFit"></image> | |
| 114 | + </view> | |
| 115 | + <view>报销审核</view> | |
| 116 | + </view> | |
| 117 | + </view> | |
| 118 | + </view> | |
| 119 | + </view> | |
| 120 | + | |
| 121 | + <!-- 记录查询板块 --> | |
| 122 | + <view class="warpboxss"> | |
| 123 | + <view class="warpboxs-small-title" :style="isshow4?'padding-bottom: 30rpx;':''" @click="isshow4=!isshow4"> | |
| 124 | + <view><text class="warpboxs-small-title-line"></text>记录查询</view> | |
| 125 | + <view class="warpboxs-small-title-img"> | |
| 126 | + <u-icon name="arrow-down" size="20" color="#666" :style="isshow4?'transform: rotate(0deg);':'transform: rotate(-180deg);'"></u-icon> | |
| 127 | + </view> | |
| 128 | + </view> | |
| 129 | + <view v-show="isshow4"> | |
| 130 | + <view class="fun_box_fir"> | |
| 131 | + <view class="fun_fir_1 fun_fir_border" @click="goToPage('/pages/usage-list/usage-list')"> | |
| 132 | + <view class="icon"> | |
| 133 | + <image src="/static/home/usage-record.png" mode="aspectFit"></image> | |
| 134 | + </view> | |
| 135 | + <view>使用记录</view> | |
| 136 | + </view> | |
| 137 | + <view class="fun_fir_1 fun_fir_border" @click="goToPage('/pages/laundry-flow-list/laundry-flow-list')"> | |
| 138 | + <view class="icon"> | |
| 139 | + <image src="/static/home/towel-record.png" mode="aspectFit"></image> | |
| 140 | + </view> | |
| 141 | + <view>毛巾记录</view> | |
| 142 | + </view> | |
| 143 | + </view> | |
| 144 | + </view> | |
| 145 | + </view> | |
| 146 | + | |
| 147 | + <!-- 系统管理板块 --> | |
| 148 | + <view class="warpboxss"> | |
| 149 | + <view class="warpboxs-small-title" :style="isshow5?'padding-bottom: 30rpx;':''" @click="isshow5=!isshow5"> | |
| 150 | + <view><text class="warpboxs-small-title-line"></text>其他</view> | |
| 151 | + <view class="warpboxs-small-title-img"> | |
| 152 | + <u-icon name="arrow-down" size="20" color="#666" :style="isshow5?'transform: rotate(0deg);':'transform: rotate(-180deg);'"></u-icon> | |
| 153 | + </view> | |
| 154 | + </view> | |
| 155 | + <view v-show="isshow5"> | |
| 156 | + <view class="fun_box_fir"> | |
| 157 | + <view v-if="newuserInfo.mobilePhone == '18382415096' || newuserInfo.mobilePhone == '19938623860' || newuserInfo.mobilePhone == '18588888888'" class="fun_fir_1 fun_fir_border" @click="goToPage('/pages/store-list/store-list')"> | |
| 158 | + <view class="icon"> | |
| 159 | + <image src="/static/home/store-management.png" mode="aspectFit"></image> | |
| 160 | + </view> | |
| 161 | + <view>门店管理</view> | |
| 162 | + </view> | |
| 163 | + <view class="fun_fir_1 fun_fir_border" @click="goToPage('/pages/web/web')"> | |
| 164 | + <view class="icon"> | |
| 165 | + <image src="/static/home/ai-qa.png" mode="aspectFit"></image> | |
| 166 | + </view> | |
| 167 | + <view>AI问答</view> | |
| 168 | + </view> | |
| 169 | + <view class="fun_fir_1 fun_fir_border" @click="goToPage('/pages/dailyReport/dailyReport')" v-if="showReport"> | |
| 170 | + <view class="icon"> | |
| 171 | + <image src="/static/home/report.png" mode="aspectFit"></image> | |
| 172 | + </view> | |
| 173 | + <view>报表</view> | |
| 174 | + </view> | |
| 175 | + </view> | |
| 176 | + <!-- <view class="fun_box_fir"> | |
| 177 | + <view class="fun_fir_1 fun_fir_border" @click="handleLogout"> | |
| 178 | + <view class="icon"> | |
| 179 | + <u-icon name="arrow-rightward" size="32" color="#43a047"></u-icon> | |
| 180 | + </view> | |
| 181 | + <view>退出</view> | |
| 182 | + </view> | |
| 183 | + </view> --> | |
| 184 | + </view> | |
| 185 | + </view> | |
| 186 | + <view style="height: 140rpx;"></view> | |
| 187 | + <!-- 自定义 tabBar --> | |
| 188 | + <custom-tab-bar /> | |
| 189 | + </view> | |
| 190 | +</template> | |
| 191 | + | |
| 192 | +<script> | |
| 193 | + import CustomTabBar from '@/components/custom-tab-bar/index.vue' | |
| 194 | + | |
| 195 | + export default { | |
| 196 | + components: { | |
| 197 | + CustomTabBar | |
| 198 | + }, | |
| 199 | + data() { | |
| 200 | + return { | |
| 201 | + isshow1: true, | |
| 202 | + isshow2: true, | |
| 203 | + isshow3: true, | |
| 204 | + isshow4: true, | |
| 205 | + isshow5: true, | |
| 206 | + newuserInfo: {}, | |
| 207 | + userInfo: {} | |
| 208 | + } | |
| 209 | + }, | |
| 210 | + computed: { | |
| 211 | + iskjb() { | |
| 212 | + if (this.newuserInfo.gw == '科技老师') { | |
| 213 | + return false | |
| 214 | + } | |
| 215 | + return true | |
| 216 | + }, | |
| 217 | + // 根据用户权限显示报表按钮 | |
| 218 | + showReport() { | |
| 219 | + if (!this.userInfo || !this.userInfo.userAccount) return false | |
| 220 | + const adminAccounts = ['admin', '13198568627', '18884847552', '13608016021', '18628973287'] | |
| 221 | + return adminAccounts.includes(this.userInfo.userAccount) | |
| 222 | + } | |
| 223 | + }, | |
| 224 | + onLoad() { | |
| 225 | + this.checkLoginStatus() | |
| 226 | + this.init() | |
| 227 | + }, | |
| 228 | + onShow() { | |
| 229 | + // 每次显示时更新用户信息 | |
| 230 | + this.userInfo = uni.getStorageSync('userInfo') | |
| 231 | + this.newuserInfo = uni.getStorageSync('newuserInfo') || {} | |
| 232 | + }, | |
| 233 | + methods: { | |
| 234 | + // 初始化 | |
| 235 | + init() { | |
| 236 | + this.userInfo = uni.getStorageSync('userInfo') | |
| 237 | + this.newuserInfo = uni.getStorageSync('newuserInfo') || {} | |
| 238 | + }, | |
| 239 | + // 检查登录状态 | |
| 240 | + checkLoginStatus() { | |
| 241 | + const token = uni.getStorageSync('token') | |
| 242 | + if (!token) { | |
| 243 | + uni.reLaunch({ | |
| 244 | + url: '/pages/login/login' | |
| 245 | + }) | |
| 246 | + return | |
| 247 | + } else { | |
| 248 | + this.userInfo = uni.getStorageSync('userInfo') | |
| 249 | + } | |
| 250 | + }, | |
| 251 | + // 页面跳转 | |
| 252 | + goToPage(url) { | |
| 253 | + uni.navigateTo({ | |
| 254 | + url: url | |
| 255 | + }) | |
| 256 | + }, | |
| 257 | + // 退出登录 | |
| 258 | + handleLogout() { | |
| 259 | + uni.showModal({ | |
| 260 | + title: '提示', | |
| 261 | + content: '确定要退出登录吗?', | |
| 262 | + success: (res) => { | |
| 263 | + if (res.confirm) { | |
| 264 | + this.API.logout().then(res => { | |
| 265 | + if (res.code == 200) { | |
| 266 | + // 清除本地存储 | |
| 267 | + uni.clearStorageSync() | |
| 268 | + // 跳转到登录页 | |
| 269 | + uni.reLaunch({ | |
| 270 | + url: '/pages/login/login' | |
| 271 | + }) | |
| 272 | + } | |
| 273 | + }) | |
| 274 | + } | |
| 275 | + } | |
| 276 | + }) | |
| 277 | + } | |
| 278 | + } | |
| 279 | + } | |
| 280 | +</script> | |
| 281 | + | |
| 282 | +<style lang="scss" scoped> | |
| 283 | + .warpbox { | |
| 284 | + // height: 100vh; | |
| 285 | + padding: 0 40rpx; | |
| 286 | + background-color: #f5f7fa; | |
| 287 | + } | |
| 288 | + | |
| 289 | + .warpboxss { | |
| 290 | + background: #fff; | |
| 291 | + padding: 30rpx; | |
| 292 | + // margin: 0 25rpx 40rpx 25rpx; | |
| 293 | + // margin: 30rpx 0; | |
| 294 | + margin: 40rpx 0; | |
| 295 | + border-radius: 10rpx; | |
| 296 | + box-shadow: 0 0 18rpx 10rpx #efefef; | |
| 297 | + | |
| 298 | + .warpboxs-small-title { | |
| 299 | + display: flex; | |
| 300 | + justify-content: space-between; | |
| 301 | + align-items: center; | |
| 302 | + font-size: 30rpx; | |
| 303 | + font-weight: bold; | |
| 304 | + color: #000; | |
| 305 | + | |
| 306 | + .warpboxs-small-title-line { | |
| 307 | + display: inline-block; | |
| 308 | + background-color: #009b4d; | |
| 309 | + height: 26rpx; | |
| 310 | + width: 10rpx; | |
| 311 | + margin-right: 10rpx; | |
| 312 | + } | |
| 313 | + | |
| 314 | + .warpboxs-small-title-img { | |
| 315 | + display: flex; | |
| 316 | + align-items: center; | |
| 317 | + transition: transform 0.3s; | |
| 318 | + } | |
| 319 | + } | |
| 320 | + | |
| 321 | + .fun_box_fir { | |
| 322 | + display: flex; | |
| 323 | + align-items: center; | |
| 324 | + flex-wrap: wrap; | |
| 325 | + // margin-top: 20rpx; | |
| 326 | + | |
| 327 | + .fun_fir_1 { | |
| 328 | + flex-shrink: 0; | |
| 329 | + background: #fff; | |
| 330 | + text-align: center; | |
| 331 | + width: 33%; | |
| 332 | + display: flex; | |
| 333 | + flex-direction: column; | |
| 334 | + justify-content: center; | |
| 335 | + align-items: center; | |
| 336 | + font-size: 24rpx; | |
| 337 | + color: #000; | |
| 338 | + position: relative; | |
| 339 | + height: 170rpx; | |
| 340 | + transition: all 0.2s; | |
| 341 | + box-sizing: border-box; | |
| 342 | + | |
| 343 | + &:active { | |
| 344 | + transform: scale(0.98); | |
| 345 | + } | |
| 346 | + | |
| 347 | + .icon { | |
| 348 | + display: flex; | |
| 349 | + align-items: center; | |
| 350 | + justify-content: center; | |
| 351 | + | |
| 352 | + image { | |
| 353 | + width: 45rpx; | |
| 354 | + height: 45rpx; | |
| 355 | + margin-bottom: 15rpx; | |
| 356 | + } | |
| 357 | + } | |
| 358 | + } | |
| 359 | + | |
| 360 | + .fun_fir_border { | |
| 361 | + border-top: 2rpx solid #efefef; | |
| 362 | + border-bottom: 2rpx solid #efefef; | |
| 363 | + border-right: 2rpx solid #efefef; | |
| 364 | + border-left: 2rpx solid #efefef; | |
| 365 | + } | |
| 366 | + } | |
| 367 | + } | |
| 368 | +</style> | |
| 0 | 369 | \ No newline at end of file | ... | ... |
绿纤uni-app/refund/refund.vue renamed to 绿纤uni-app/pages/information/information.vue
| 1 | 1 | <template> |
| 2 | 2 | <view> |
| 3 | - | |
| 3 | + <!-- 自定义 tabBar --> | |
| 4 | + <custom-tab-bar /> | |
| 4 | 5 | </view> |
| 5 | 6 | </template> |
| 6 | 7 | |
| 7 | 8 | <script> |
| 9 | + import CustomTabBar from '@/components/custom-tab-bar/index.vue' | |
| 10 | + | |
| 8 | 11 | export default { |
| 9 | - data() { | |
| 10 | - return { | |
| 11 | - | |
| 12 | - } | |
| 13 | - }, | |
| 14 | - methods: { | |
| 15 | - | |
| 12 | + components: { | |
| 13 | + CustomTabBar | |
| 16 | 14 | } |
| 17 | 15 | } |
| 18 | 16 | </script> |
| 19 | 17 | |
| 20 | 18 | <style> |
| 21 | 19 | |
| 22 | 20 | -</style> |
| 21 | +</style> | |
| 23 | 22 | \ No newline at end of file | ... | ... |
绿纤uni-app/pages/me/me.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <view class="page"> | |
| 3 | + <view class="my-top"> | |
| 4 | + <view class="head"> | |
| 5 | + <view class="logo-title"></view> | |
| 6 | + <view class="title">个人中心</view> | |
| 7 | + <view class="setting-mess"></view> | |
| 8 | + </view> | |
| 9 | + </view> | |
| 10 | + | |
| 11 | + <view class="main"> | |
| 12 | + <!-- 用户信息卡片 - 科技感设计 --> | |
| 13 | + <view class="user-card"> | |
| 14 | + <view class="user-card-bg"></view> | |
| 15 | + <view class="user-card-content"> | |
| 16 | + <view class="user-main"> | |
| 17 | + <view class="avatar-container"> | |
| 18 | + <view class="avatar-ring"></view> | |
| 19 | + <image class="avatar" src="/static/head.png" mode="aspectFill"></image> | |
| 20 | + </view> | |
| 21 | + <view class="user-info-wrapper"> | |
| 22 | + <view class="user-name">{{ newuserInfo.realName || newuserInfo.userName || '用户' }}</view> | |
| 23 | + <view class="user-meta"> | |
| 24 | + <view class="role-badge"> | |
| 25 | + <!-- <u-icon name="medal" size="22" color="#43a047"></u-icon> --> | |
| 26 | + <text>{{ newuserInfo.gw || '员工' }}</text> | |
| 27 | + </view> | |
| 28 | + </view> | |
| 29 | + </view> | |
| 30 | + </view> | |
| 31 | + <view class="store-info-glass"> | |
| 32 | + <view class="store-item"> | |
| 33 | + <view class="store-icon"> | |
| 34 | + <u-icon name="home" size="24" color="#43a047"></u-icon> | |
| 35 | + </view> | |
| 36 | + <view class="store-text"> | |
| 37 | + <text class="store-label">门店</text> | |
| 38 | + <text class="store-value">{{ jsjinfo.storeName || '暂无' }}</text> | |
| 39 | + </view> | |
| 40 | + </view> | |
| 41 | + <view class="store-item"> | |
| 42 | + <view class="store-icon"> | |
| 43 | + <u-icon name="star" size="24" color="#ff9800"></u-icon> | |
| 44 | + </view> | |
| 45 | + <view class="store-text"> | |
| 46 | + <text class="store-label">金三角</text> | |
| 47 | + <text class="store-value">{{ jsjinfo.jsjName || '暂无' }}</text> | |
| 48 | + </view> | |
| 49 | + </view> | |
| 50 | + </view> | |
| 51 | + </view> | |
| 52 | + </view> | |
| 53 | + | |
| 54 | + <!-- 统计数据区域 - 紧凑设计 --> | |
| 55 | + <view class="stats-section"> | |
| 56 | + <view class="stats-container"> | |
| 57 | + <view v-if="iskjb" class="stat-item" @click="goToPage('/pages/expansion-list/expansion-list')"> | |
| 58 | + <view class="stat-icon" style="background-color: #e3f2fd;"> | |
| 59 | + <u-icon name="man-add" size="32" color="#2196f3"></u-icon> | |
| 60 | + </view> | |
| 61 | + <view class="stat-info"> | |
| 62 | + <view class="stat-num">{{ summaryData.expansionCount || 0 }}</view> | |
| 63 | + <view class="stat-name">拓客数</view> | |
| 64 | + </view> | |
| 65 | + </view> | |
| 66 | + <view v-if="iskjb" class="stat-item" @click="goToPage('/pages/user-invite-list/user-invite-list')"> | |
| 67 | + <view class="stat-icon" style="background-color: #f3e5f5;"> | |
| 68 | + <u-icon name="account" size="32" color="#9c27b0"></u-icon> | |
| 69 | + </view> | |
| 70 | + <view class="stat-info"> | |
| 71 | + <view class="stat-num">{{ summaryData.inviteCount || 0 }}</view> | |
| 72 | + <view class="stat-name">邀约数</view> | |
| 73 | + </view> | |
| 74 | + </view> | |
| 75 | + <view v-if="iskjb" class="stat-item" @click="goToPage('/pages/user-appointment-list/user-appointment-list')"> | |
| 76 | + <view class="stat-icon" style="background-color: #e8f5e9;"> | |
| 77 | + <u-icon name="calendar" size="32" color="#4caf50"></u-icon> | |
| 78 | + </view> | |
| 79 | + <view class="stat-info"> | |
| 80 | + <view class="stat-num">{{ summaryData.appointmentCount || 0 }}</view> | |
| 81 | + <view class="stat-name">预约数</view> | |
| 82 | + </view> | |
| 83 | + </view> | |
| 84 | + <view class="stat-item" @click="goToPage('/pages/lx-list/lx-list')"> | |
| 85 | + <view class="stat-icon" style="background-color: #fff3e0;"> | |
| 86 | + <u-icon name="list" size="32" color="#ff9800"></u-icon> | |
| 87 | + </view> | |
| 88 | + <view class="stat-info"> | |
| 89 | + <view class="stat-num">{{ summaryData.hkCount || 0 }}</view> | |
| 90 | + <view class="stat-name">开单数</view> | |
| 91 | + </view> | |
| 92 | + </view> | |
| 93 | + <view class="stat-item" @click="goToPage('/pages/consume-list/consume-list')"> | |
| 94 | + <view class="stat-icon" style="background-color: #e1f5fe;"> | |
| 95 | + <u-icon name="minus-square-fill" size="32" color="#03a9f4"></u-icon> | |
| 96 | + </view> | |
| 97 | + <view class="stat-info"> | |
| 98 | + <view class="stat-num">{{ summaryData.consumeCount || 0 }}</view> | |
| 99 | + <view class="stat-name">耗卡数</view> | |
| 100 | + </view> | |
| 101 | + </view> | |
| 102 | + <view class="stat-item" @click="goToPage('/pages/refund-list/refund-list')"> | |
| 103 | + <view class="stat-icon" style="background-color: #ffebee;"> | |
| 104 | + <u-icon name="minus-circle" size="32" color="#f44336"></u-icon> | |
| 105 | + </view> | |
| 106 | + <view class="stat-info"> | |
| 107 | + <view class="stat-num">{{ summaryData.refundCount || 0 }}</view> | |
| 108 | + <view class="stat-name">退卡数</view> | |
| 109 | + </view> | |
| 110 | + </view> | |
| 111 | + </view> | |
| 112 | + </view> | |
| 113 | + | |
| 114 | + <!-- 账户设置区域 --> | |
| 115 | + <view class="settings-section"> | |
| 116 | + <view class="settings-card"> | |
| 117 | + <view class="settings-item" @click="showChangePasswordDialog"> | |
| 118 | + <view class="settings-left"> | |
| 119 | + <view class="settings-icon-wrapper" style="background-color: #e8f5e9;"> | |
| 120 | + <image src="/static/icon1.png" mode="aspectFit"></image> | |
| 121 | + </view> | |
| 122 | + <text class="settings-text">修改密码</text> | |
| 123 | + </view> | |
| 124 | + <u-icon name="arrow-right" size="20" color="#c0c4cc"></u-icon> | |
| 125 | + </view> | |
| 126 | + <view class="settings-item" @click="handleLogout"> | |
| 127 | + <view class="settings-left"> | |
| 128 | + <view class="settings-icon-wrapper" style="background-color: #ffebee;"> | |
| 129 | + <image src="/static/icon2.png" mode="aspectFit"></image> | |
| 130 | + </view> | |
| 131 | + <text class="settings-text">退出登录</text> | |
| 132 | + </view> | |
| 133 | + <u-icon name="arrow-right" size="20" color="#c0c4cc"></u-icon> | |
| 134 | + </view> | |
| 135 | + </view> | |
| 136 | + </view> | |
| 137 | + </view> | |
| 138 | + | |
| 139 | + <!-- 修改密码弹窗 --> | |
| 140 | + <u-popup :show="showPasswordDialog" @close="cancelChangePassword" mode="center" border-radius="20"> | |
| 141 | + <view class="password-dialog"> | |
| 142 | + <view class="dialog-title">修改密码</view> | |
| 143 | + <view class="dialog-content"> | |
| 144 | + <view class="form-item"> | |
| 145 | + <text class="form-label">原密码</text> | |
| 146 | + <input | |
| 147 | + class="form-input" | |
| 148 | + type="password" | |
| 149 | + placeholder="请输入原密码" | |
| 150 | + v-model="passwordForm.oldPassword" | |
| 151 | + :password="true" | |
| 152 | + /> | |
| 153 | + </view> | |
| 154 | + <view class="form-item"> | |
| 155 | + <text class="form-label">新密码</text> | |
| 156 | + <input | |
| 157 | + class="form-input" | |
| 158 | + type="password" | |
| 159 | + placeholder="请输入新密码" | |
| 160 | + v-model="passwordForm.newPassword" | |
| 161 | + :password="true" | |
| 162 | + /> | |
| 163 | + </view> | |
| 164 | + <view class="form-item"> | |
| 165 | + <text class="form-label">确认密码</text> | |
| 166 | + <input | |
| 167 | + class="form-input" | |
| 168 | + type="password" | |
| 169 | + placeholder="请再次输入新密码" | |
| 170 | + v-model="passwordForm.confirmPassword" | |
| 171 | + :password="true" | |
| 172 | + /> | |
| 173 | + </view> | |
| 174 | + </view> | |
| 175 | + <view class="dialog-footer"> | |
| 176 | + <view class="dialog-btn cancel-btn" @click="cancelChangePassword">取消</view> | |
| 177 | + <view class="dialog-btn confirm-btn" @click="confirmChangePassword">确定</view> | |
| 178 | + </view> | |
| 179 | + </view> | |
| 180 | + </u-popup> | |
| 181 | + | |
| 182 | + <!-- 自定义 tabBar --> | |
| 183 | + <custom-tab-bar /> | |
| 184 | + </view> | |
| 185 | +</template> | |
| 186 | + | |
| 187 | +<script> | |
| 188 | + import { | |
| 189 | + mapState, | |
| 190 | + mapMutations | |
| 191 | + } from 'vuex' | |
| 192 | + import memberApi from '@/apis/modules/member.js' | |
| 193 | + import oauthApi from '@/apis/modules/oauth.js' | |
| 194 | + import CustomTabBar from '@/components/custom-tab-bar/index.vue' | |
| 195 | + | |
| 196 | + export default { | |
| 197 | + components: { | |
| 198 | + CustomTabBar | |
| 199 | + }, | |
| 200 | + data() { | |
| 201 | + return { | |
| 202 | + statusBarHeight: 0, | |
| 203 | + userInfo: {}, | |
| 204 | + newuserInfo: {}, | |
| 205 | + jsjinfo: { | |
| 206 | + storeName:'', | |
| 207 | + jsjName:'' | |
| 208 | + }, | |
| 209 | + summaryData: { | |
| 210 | + appointmentCount: 0, | |
| 211 | + inviteCount: 0, | |
| 212 | + expansionCount: 0, | |
| 213 | + hkCount: 0, | |
| 214 | + consumeCount: 0, | |
| 215 | + refundCount: 0 | |
| 216 | + }, | |
| 217 | + showPasswordDialog: false, | |
| 218 | + passwordForm: { | |
| 219 | + oldPassword: '', | |
| 220 | + newPassword: '', | |
| 221 | + confirmPassword: '' | |
| 222 | + } | |
| 223 | + } | |
| 224 | + }, | |
| 225 | + | |
| 226 | + computed: { | |
| 227 | + iskjb() { | |
| 228 | + if (this.newuserInfo.gw == '科技老师') { | |
| 229 | + return false | |
| 230 | + } | |
| 231 | + return true | |
| 232 | + } | |
| 233 | + }, | |
| 234 | + | |
| 235 | + async onLoad() { | |
| 236 | + this.getSystemInfo() | |
| 237 | + this.checkLoginStatus() | |
| 238 | + await this.init() | |
| 239 | + }, | |
| 240 | + | |
| 241 | + async onShow() { | |
| 242 | + // 页面显示时刷新数据 | |
| 243 | + if (this.userInfo && this.userInfo.userId) { | |
| 244 | + await this.init() | |
| 245 | + } | |
| 246 | + }, | |
| 247 | + | |
| 248 | + methods: { | |
| 249 | + // 初始化 | |
| 250 | + async init() { | |
| 251 | + if (!this.userInfo || !this.userInfo.userId) { | |
| 252 | + return | |
| 253 | + } | |
| 254 | + | |
| 255 | + // 获取用户信息 | |
| 256 | + this.API.getUsers(this.userInfo.userId).then(res => { | |
| 257 | + if (res.code === 200) { | |
| 258 | + this.newuserInfo = res.data | |
| 259 | + if (this.newuserInfo.enabledMark != '1') { | |
| 260 | + uni.showToast({ | |
| 261 | + title: '您的账号已被禁用', | |
| 262 | + icon: 'none' | |
| 263 | + }) | |
| 264 | + // 清除本地存储 | |
| 265 | + uni.clearStorageSync() | |
| 266 | + // 跳转到登录页 | |
| 267 | + setTimeout(() => { | |
| 268 | + uni.reLaunch({ | |
| 269 | + url: '/pages/login/login' | |
| 270 | + }) | |
| 271 | + }, 1500) | |
| 272 | + } else { | |
| 273 | + let formattedDate = this.utils.gettime() | |
| 274 | + memberApi.getJsjInfoByUserMonth(this.userInfo.userId, formattedDate).then((resjsj) => { | |
| 275 | + if (resjsj.code == 200) { | |
| 276 | + this.jsjinfo = resjsj.data | |
| 277 | + } | |
| 278 | + }) | |
| 279 | + uni.setStorageSync('newuserInfo', this.newuserInfo) | |
| 280 | + this.getSummaryData() | |
| 281 | + } | |
| 282 | + } | |
| 283 | + }) | |
| 284 | + }, | |
| 285 | + | |
| 286 | + // 获取系统信息 | |
| 287 | + getSystemInfo() { | |
| 288 | + uni.getSystemInfo({ | |
| 289 | + success: (res) => { | |
| 290 | + this.statusBarHeight = res.statusBarHeight | |
| 291 | + } | |
| 292 | + }) | |
| 293 | + }, | |
| 294 | + | |
| 295 | + // 检查登录状态 | |
| 296 | + checkLoginStatus() { | |
| 297 | + const token = uni.getStorageSync('token') | |
| 298 | + | |
| 299 | + if (!token) { | |
| 300 | + uni.reLaunch({ | |
| 301 | + url: '/pages/login/login' | |
| 302 | + }) | |
| 303 | + return | |
| 304 | + } else { | |
| 305 | + this.userInfo = uni.getStorageSync('userInfo') | |
| 306 | + this.newuserInfo = uni.getStorageSync('newuserInfo') || {} | |
| 307 | + } | |
| 308 | + }, | |
| 309 | + | |
| 310 | + // 获取统计数据 | |
| 311 | + async getSummaryData() { | |
| 312 | + try { | |
| 313 | + const currentMonthRange = this.utils.getCurrentMonthRange() | |
| 314 | + if (this.iskjb) { | |
| 315 | + let yyinfo = { | |
| 316 | + pageSize: 1, | |
| 317 | + currentPage: 1, | |
| 318 | + yysj: `${currentMonthRange[0]},${currentMonthRange[1]}` | |
| 319 | + } | |
| 320 | + let yayinfo = { | |
| 321 | + pageSize: 1, | |
| 322 | + yysj: `${currentMonthRange[0]},${currentMonthRange[1]}` | |
| 323 | + } | |
| 324 | + let tkinfo = { | |
| 325 | + pageSize: 1, | |
| 326 | + expansionTime: `${currentMonthRange[0]},${currentMonthRange[1]}` | |
| 327 | + } | |
| 328 | + if (this.newuserInfo.gw == '店助' || this.newuserInfo.gw == '店长') { | |
| 329 | + yyinfo.djmd = this.newuserInfo.mdid || '暂无' | |
| 330 | + yayinfo.storeId = this.newuserInfo.mdid || '暂无' | |
| 331 | + tkinfo.storeId = this.newuserInfo.mdid || '暂无' | |
| 332 | + } else { | |
| 333 | + yyinfo.yyr = this.userInfo.userId | |
| 334 | + yayinfo.yyr = this.userInfo.userId | |
| 335 | + tkinfo.expansionUserId = this.userInfo.userId | |
| 336 | + } | |
| 337 | + // 获取预约数 | |
| 338 | + const appointmentRes = await this.API.getAppointmentList(yyinfo) | |
| 339 | + | |
| 340 | + if (appointmentRes.code === 200) { | |
| 341 | + this.summaryData.appointmentCount = appointmentRes.data.pagination?.total || 0 | |
| 342 | + } | |
| 343 | + | |
| 344 | + // 获取邀请数 | |
| 345 | + const inviteRes = await this.API.getInviteList(yayinfo) | |
| 346 | + | |
| 347 | + if (inviteRes.code === 200) { | |
| 348 | + this.summaryData.inviteCount = inviteRes.data.pagination?.total || 0 | |
| 349 | + } | |
| 350 | + | |
| 351 | + // 获取拓客数 | |
| 352 | + const expansionRes = await this.API.getExpansionList(tkinfo) | |
| 353 | + | |
| 354 | + if (expansionRes.code === 200) { | |
| 355 | + this.summaryData.expansionCount = expansionRes.data.pagination?.total || 0 | |
| 356 | + } | |
| 357 | + } | |
| 358 | + let kainfo = { | |
| 359 | + pageSize: 1, | |
| 360 | + kdrq: `${currentMonthRange[0]},${currentMonthRange[1]}` | |
| 361 | + } | |
| 362 | + let hkinfo = { | |
| 363 | + pageSize: 1, | |
| 364 | + hksj: `${currentMonthRange[0]},${currentMonthRange[1]}` | |
| 365 | + } | |
| 366 | + let tkinfonew = { | |
| 367 | + pageSize: 1, | |
| 368 | + tksj: `${currentMonthRange[0]},${currentMonthRange[1]}` | |
| 369 | + } | |
| 370 | + if (this.newuserInfo.gw == '科技老师') { | |
| 371 | + kainfo.kjblsId = this.userInfo.userId | |
| 372 | + hkinfo.kjblsId = this.userInfo.userId | |
| 373 | + tkinfonew.kjblsId = this.userInfo.userId | |
| 374 | + } else if (this.newuserInfo.gw == '健康师') { | |
| 375 | + kainfo.jksId = this.userInfo.userId | |
| 376 | + hkinfo.jksId = this.userInfo.userId | |
| 377 | + tkinfonew.jksId = this.userInfo.userId | |
| 378 | + } else if (this.newuserInfo.gw == '店助' || this.newuserInfo.gw == '店长') { | |
| 379 | + kainfo.djmd = this.newuserInfo.mdid || '暂无' | |
| 380 | + hkinfo.md = this.newuserInfo.mdid || '暂无' | |
| 381 | + tkinfonew.md = this.newuserInfo.mdid || '暂无' | |
| 382 | + } else { | |
| 383 | + kainfo.CreateUser = this.userInfo.userId | |
| 384 | + hkinfo.czry = this.userInfo.userId | |
| 385 | + tkinfonew.czry = this.userInfo.userId | |
| 386 | + } | |
| 387 | + // 获取开单数(本月) | |
| 388 | + const hkRes = await this.API.getLxList(kainfo) | |
| 389 | + | |
| 390 | + if (hkRes.code === 200) { | |
| 391 | + this.summaryData.hkCount = hkRes.data.pagination?.total || 0 | |
| 392 | + } | |
| 393 | + // 获取耗卡数 | |
| 394 | + | |
| 395 | + const consumeRes = await this.API.getConsumeList(hkinfo) | |
| 396 | + | |
| 397 | + if (consumeRes.code === 200) { | |
| 398 | + this.summaryData.consumeCount = consumeRes.data.pagination?.total || 0 | |
| 399 | + } | |
| 400 | + // 获取退卡数 | |
| 401 | + | |
| 402 | + const refundRes = await this.API.getRefundList(tkinfonew) | |
| 403 | + | |
| 404 | + if (refundRes.code === 200) { | |
| 405 | + this.summaryData.refundCount = refundRes.data.pagination?.total || 0 | |
| 406 | + } | |
| 407 | + | |
| 408 | + } catch (error) { | |
| 409 | + console.error('获取统计数据失败:', error) | |
| 410 | + } | |
| 411 | + }, | |
| 412 | + | |
| 413 | + // 页面跳转 | |
| 414 | + goToPage(url) { | |
| 415 | + uni.navigateTo({ | |
| 416 | + url: url | |
| 417 | + }) | |
| 418 | + }, | |
| 419 | + | |
| 420 | + // 显示修改密码弹窗 | |
| 421 | + showChangePasswordDialog() { | |
| 422 | + console.log('点击修改密码按钮') | |
| 423 | + this.passwordForm = { | |
| 424 | + oldPassword: '', | |
| 425 | + newPassword: '', | |
| 426 | + confirmPassword: '' | |
| 427 | + } | |
| 428 | + this.showPasswordDialog = true | |
| 429 | + console.log('showPasswordDialog:', this.showPasswordDialog) | |
| 430 | + }, | |
| 431 | + | |
| 432 | + // 取消修改密码 | |
| 433 | + cancelChangePassword() { | |
| 434 | + this.showPasswordDialog = false | |
| 435 | + this.passwordForm = { | |
| 436 | + oldPassword: '', | |
| 437 | + newPassword: '', | |
| 438 | + confirmPassword: '' | |
| 439 | + } | |
| 440 | + }, | |
| 441 | + | |
| 442 | + // 确认修改密码 | |
| 443 | + confirmChangePassword() { | |
| 444 | + // 验证输入 | |
| 445 | + if (!this.passwordForm.oldPassword) { | |
| 446 | + uni.showToast({ | |
| 447 | + title: '请输入原密码', | |
| 448 | + icon: 'none' | |
| 449 | + }) | |
| 450 | + return | |
| 451 | + } | |
| 452 | + | |
| 453 | + if (!this.passwordForm.newPassword) { | |
| 454 | + uni.showToast({ | |
| 455 | + title: '请输入新密码', | |
| 456 | + icon: 'none' | |
| 457 | + }) | |
| 458 | + return | |
| 459 | + } | |
| 460 | + | |
| 461 | + if (this.passwordForm.newPassword.length < 6) { | |
| 462 | + uni.showToast({ | |
| 463 | + title: '新密码长度不能少于6位', | |
| 464 | + icon: 'none' | |
| 465 | + }) | |
| 466 | + return | |
| 467 | + } | |
| 468 | + | |
| 469 | + if (this.passwordForm.newPassword !== this.passwordForm.confirmPassword) { | |
| 470 | + uni.showToast({ | |
| 471 | + title: '两次输入的新密码不一致', | |
| 472 | + icon: 'none' | |
| 473 | + }) | |
| 474 | + return | |
| 475 | + } | |
| 476 | + | |
| 477 | + if (this.passwordForm.oldPassword === this.passwordForm.newPassword) { | |
| 478 | + uni.showToast({ | |
| 479 | + title: '新密码不能与原密码相同', | |
| 480 | + icon: 'none' | |
| 481 | + }) | |
| 482 | + return | |
| 483 | + } | |
| 484 | + | |
| 485 | + // 调用修改密码接口 | |
| 486 | + this.changePassword() | |
| 487 | + }, | |
| 488 | + | |
| 489 | + // 修改密码 | |
| 490 | + async changePassword() { | |
| 491 | + try { | |
| 492 | + uni.showLoading({ | |
| 493 | + title: '修改中...' | |
| 494 | + }) | |
| 495 | + | |
| 496 | + // 调用修改密码 API | |
| 497 | + const res = await oauthApi.changePassword({ | |
| 498 | + userId: this.userInfo.userId, | |
| 499 | + oldPassword: this.passwordForm.oldPassword, | |
| 500 | + newPassword: this.passwordForm.newPassword | |
| 501 | + }) | |
| 502 | + | |
| 503 | + uni.hideLoading() | |
| 504 | + | |
| 505 | + if (res.code === 200) { | |
| 506 | + uni.showToast({ | |
| 507 | + title: '密码修改成功', | |
| 508 | + icon: 'success' | |
| 509 | + }) | |
| 510 | + this.showPasswordDialog = false | |
| 511 | + this.passwordForm = { | |
| 512 | + oldPassword: '', | |
| 513 | + newPassword: '', | |
| 514 | + confirmPassword: '' | |
| 515 | + } | |
| 516 | + } else { | |
| 517 | + uni.showToast({ | |
| 518 | + title: res.msg || '密码修改失败', | |
| 519 | + icon: 'none' | |
| 520 | + }) | |
| 521 | + } | |
| 522 | + } catch (error) { | |
| 523 | + uni.hideLoading() | |
| 524 | + console.error('修改密码失败:', error) | |
| 525 | + uni.showToast({ | |
| 526 | + title: '修改密码失败,请稍后重试', | |
| 527 | + icon: 'none' | |
| 528 | + }) | |
| 529 | + } | |
| 530 | + }, | |
| 531 | + | |
| 532 | + // 退出登录 | |
| 533 | + handleLogout() { | |
| 534 | + uni.showModal({ | |
| 535 | + title: '提示', | |
| 536 | + content: '确定要退出登录吗?', | |
| 537 | + success: (res) => { | |
| 538 | + if (res.confirm) { | |
| 539 | + this.API.logout().then(res => { | |
| 540 | + if (res.code == 200) { | |
| 541 | + // 清除本地存储 | |
| 542 | + uni.clearStorageSync() | |
| 543 | + // 跳转到登录页 | |
| 544 | + uni.reLaunch({ | |
| 545 | + url: '/pages/login/login' | |
| 546 | + }) | |
| 547 | + } | |
| 548 | + }) | |
| 549 | + } | |
| 550 | + } | |
| 551 | + }) | |
| 552 | + } | |
| 553 | + } | |
| 554 | + } | |
| 555 | +</script> | |
| 556 | + | |
| 557 | +<style lang="scss" scoped> | |
| 558 | + .page { | |
| 559 | + position: absolute; | |
| 560 | + width: 100%; | |
| 561 | + // height: 100%; | |
| 562 | + background-color: #f5f7fa; | |
| 563 | + height: 100vh; | |
| 564 | + overflow-y: scroll; | |
| 565 | + } | |
| 566 | + | |
| 567 | + .my-top { | |
| 568 | + position: absolute; | |
| 569 | + width: 100%; | |
| 570 | + height: 300rpx; | |
| 571 | + /* #ifdef MP */ | |
| 572 | + height: 360rpx; | |
| 573 | + /* #endif */ | |
| 574 | + overflow: hidden; | |
| 575 | + } | |
| 576 | + | |
| 577 | + .head { | |
| 578 | + background-color: #fff; | |
| 579 | + border-bottom: 1rpx solid #e4e7ed; | |
| 580 | + position: fixed; | |
| 581 | + left: 0; | |
| 582 | + top: 0; | |
| 583 | + z-index: 100; | |
| 584 | + display: flex; | |
| 585 | + align-items: center; | |
| 586 | + justify-content: space-between; | |
| 587 | + width: 100%; | |
| 588 | + height: 100rpx; | |
| 589 | + /* #ifdef APP-PLUS */ | |
| 590 | + height: calc(100rpx + var(--status-bar-height)); | |
| 591 | + padding-top: var(--status-bar-height); | |
| 592 | + /* #endif */ | |
| 593 | + /* #ifdef MP */ | |
| 594 | + height: calc(120rpx + var(--status-bar-height)); | |
| 595 | + padding-top: calc(40rpx + var(--status-bar-height)); | |
| 596 | + /* #endif */ | |
| 597 | + box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04); | |
| 598 | + } | |
| 599 | + | |
| 600 | + .logo-title { | |
| 601 | + width: 8%; | |
| 602 | + } | |
| 603 | + | |
| 604 | + .head .title { | |
| 605 | + width: 94%; | |
| 606 | + font-size: 32rpx; | |
| 607 | + font-weight: 600; | |
| 608 | + text-align: center; | |
| 609 | + color: #303133; | |
| 610 | + } | |
| 611 | + | |
| 612 | + .setting-mess { | |
| 613 | + width: 8%; | |
| 614 | + display: flex; | |
| 615 | + align-items: center; | |
| 616 | + } | |
| 617 | + | |
| 618 | + .main { | |
| 619 | + position: relative; | |
| 620 | + padding-bottom: 120rpx; | |
| 621 | + top: 120rpx; | |
| 622 | + /* #ifdef MP */ | |
| 623 | + top: 190rpx; | |
| 624 | + padding-bottom: 180rpx; | |
| 625 | + /* #endif */ | |
| 626 | + padding: 0 40rpx; | |
| 627 | + } | |
| 628 | + | |
| 629 | + /* 用户信息卡片 - 商业化紧凑设计 */ | |
| 630 | + .user-card { | |
| 631 | + position: relative; | |
| 632 | + margin: 24rpx 0; | |
| 633 | + border-radius: 20rpx; | |
| 634 | + overflow: hidden; | |
| 635 | + animation: slideDown 0.4s ease-out; | |
| 636 | + box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08); | |
| 637 | + } | |
| 638 | + | |
| 639 | + .user-card-bg { | |
| 640 | + position: absolute; | |
| 641 | + top: 0; | |
| 642 | + left: 0; | |
| 643 | + right: 0; | |
| 644 | + bottom: 0; | |
| 645 | + background: linear-gradient(135deg, #e8f4f8 0%, #f0e8f5 50%, #f5f0e8 100%); | |
| 646 | + } | |
| 647 | + | |
| 648 | + .user-card-content { | |
| 649 | + position: relative; | |
| 650 | + padding: 24rpx; | |
| 651 | + background: rgba(255, 255, 255, 0.6); | |
| 652 | + backdrop-filter: blur(10rpx); | |
| 653 | + -webkit-backdrop-filter: blur(10rpx); | |
| 654 | + } | |
| 655 | + | |
| 656 | + .user-main { | |
| 657 | + display: flex; | |
| 658 | + align-items: center; | |
| 659 | + margin-bottom: 20rpx; | |
| 660 | + } | |
| 661 | + | |
| 662 | + .avatar-container { | |
| 663 | + position: relative; | |
| 664 | + margin-right: 20rpx; | |
| 665 | + flex-shrink: 0; | |
| 666 | + } | |
| 667 | + | |
| 668 | + .avatar-ring { | |
| 669 | + position: absolute; | |
| 670 | + top: -3rpx; | |
| 671 | + left: -3rpx; | |
| 672 | + width: 100rpx; | |
| 673 | + height: 100rpx; | |
| 674 | + border-radius: 50rpx; | |
| 675 | + border: 2rpx solid rgba(67, 160, 71, 0.3); | |
| 676 | + animation: rotate 3s linear infinite; | |
| 677 | + } | |
| 678 | + | |
| 679 | + .avatar { | |
| 680 | + width: 94rpx; | |
| 681 | + height: 94rpx; | |
| 682 | + border-radius: 47rpx; | |
| 683 | + border: 2rpx solid rgba(255, 255, 255, 0.9); | |
| 684 | + position: relative; | |
| 685 | + z-index: 1; | |
| 686 | + box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1); | |
| 687 | + } | |
| 688 | + | |
| 689 | + .user-info-wrapper { | |
| 690 | + flex: 1; | |
| 691 | + min-width: 0; | |
| 692 | + } | |
| 693 | + | |
| 694 | + .user-name { | |
| 695 | + font-size: 32rpx; | |
| 696 | + font-weight: 600; | |
| 697 | + color: #303133; | |
| 698 | + margin-bottom: 8rpx; | |
| 699 | + overflow: hidden; | |
| 700 | + text-overflow: ellipsis; | |
| 701 | + white-space: nowrap; | |
| 702 | + } | |
| 703 | + | |
| 704 | + .user-meta { | |
| 705 | + display: flex; | |
| 706 | + align-items: center; | |
| 707 | + } | |
| 708 | + | |
| 709 | + .role-badge { | |
| 710 | + display: inline-flex; | |
| 711 | + align-items: center; | |
| 712 | + background: rgba(67, 160, 71, 0.1); | |
| 713 | + border-radius: 12rpx; | |
| 714 | + padding: 6rpx 12rpx; | |
| 715 | + border: 1rpx solid rgba(67, 160, 71, 0.2); | |
| 716 | + font-size: 24rpx; | |
| 717 | + color: #43a047; | |
| 718 | + font-weight: 500; | |
| 719 | + } | |
| 720 | + | |
| 721 | + .role-badge text { | |
| 722 | + margin-left: 6rpx; | |
| 723 | + } | |
| 724 | + | |
| 725 | + .store-info-glass { | |
| 726 | + display: flex; | |
| 727 | + gap: 12rpx; | |
| 728 | + padding-top: 20rpx; | |
| 729 | + border-top: 1rpx solid rgba(0, 0, 0, 0.06); | |
| 730 | + } | |
| 731 | + | |
| 732 | + .store-item { | |
| 733 | + flex: 1; | |
| 734 | + display: flex; | |
| 735 | + align-items: center; | |
| 736 | + background: rgba(255, 255, 255, 0.7); | |
| 737 | + backdrop-filter: blur(8rpx); | |
| 738 | + -webkit-backdrop-filter: blur(8rpx); | |
| 739 | + border-radius: 12rpx; | |
| 740 | + padding: 12rpx; | |
| 741 | + border: 1rpx solid rgba(0, 0, 0, 0.05); | |
| 742 | + box-shadow: 0 1rpx 4rpx rgba(0, 0, 0, 0.04); | |
| 743 | + } | |
| 744 | + | |
| 745 | + .store-icon { | |
| 746 | + width: 44rpx; | |
| 747 | + height: 44rpx; | |
| 748 | + // background: rgba(67, 160, 71, 0.1); | |
| 749 | + // border-radius: 10rpx; | |
| 750 | + display: flex; | |
| 751 | + align-items: center; | |
| 752 | + justify-content: center; | |
| 753 | + margin-right: 16rpx; | |
| 754 | + flex-shrink: 0; | |
| 755 | + } | |
| 756 | + | |
| 757 | + .store-text { | |
| 758 | + flex: 1; | |
| 759 | + display: flex; | |
| 760 | + flex-direction: column; | |
| 761 | + min-width: 0; | |
| 762 | + } | |
| 763 | + | |
| 764 | + .store-label { | |
| 765 | + font-size: 24rpx; | |
| 766 | + color: #909399; | |
| 767 | + margin-bottom: 4rpx; | |
| 768 | + } | |
| 769 | + | |
| 770 | + .store-value { | |
| 771 | + font-size: 28rpx; | |
| 772 | + color: #303133; | |
| 773 | + font-weight: 500; | |
| 774 | + overflow: hidden; | |
| 775 | + text-overflow: ellipsis; | |
| 776 | + white-space: nowrap; | |
| 777 | + } | |
| 778 | + | |
| 779 | + /* 统计数据区域 - 紧凑设计 */ | |
| 780 | + .stats-section { | |
| 781 | + margin: 24rpx 0; | |
| 782 | + animation: slideDown 0.5s ease-out; | |
| 783 | + } | |
| 784 | + | |
| 785 | + .stats-container { | |
| 786 | + background: #ffffff; | |
| 787 | + border-radius: 20rpx; | |
| 788 | + padding: 18rpx; | |
| 789 | + border: 1rpx solid rgba(0, 0, 0, 0.06); | |
| 790 | + box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08); | |
| 791 | + display: grid; | |
| 792 | + grid-template-columns: repeat(3, 1fr); | |
| 793 | + gap: 14rpx; | |
| 794 | + } | |
| 795 | + | |
| 796 | + .stat-item { | |
| 797 | + background: #fff; | |
| 798 | + border-radius: 16rpx; | |
| 799 | + padding: 18rpx 14rpx; | |
| 800 | + display: flex; | |
| 801 | + align-items: center; | |
| 802 | + border: 1rpx solid #f0f2f5; | |
| 803 | + box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04); | |
| 804 | + transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); | |
| 805 | + cursor: pointer; | |
| 806 | + } | |
| 807 | + | |
| 808 | + .stat-item:active { | |
| 809 | + transform: translateY(-2rpx) scale(0.98); | |
| 810 | + box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1); | |
| 811 | + } | |
| 812 | + | |
| 813 | + .stat-icon { | |
| 814 | + width: 56rpx; | |
| 815 | + height: 56rpx; | |
| 816 | + border-radius: 12rpx; | |
| 817 | + display: flex; | |
| 818 | + align-items: center; | |
| 819 | + justify-content: center; | |
| 820 | + margin-right: 12rpx; | |
| 821 | + flex-shrink: 0; | |
| 822 | + } | |
| 823 | + | |
| 824 | + .stat-info { | |
| 825 | + flex: 1; | |
| 826 | + min-width: 0; | |
| 827 | + } | |
| 828 | + | |
| 829 | + .stat-num { | |
| 830 | + font-size: 28rpx; | |
| 831 | + font-weight: 600; | |
| 832 | + color: #303133; | |
| 833 | + line-height: 1.2; | |
| 834 | + margin-bottom: 4rpx; | |
| 835 | + } | |
| 836 | + | |
| 837 | + .stat-name { | |
| 838 | + font-size: 24rpx; | |
| 839 | + color: #909399; | |
| 840 | + } | |
| 841 | + | |
| 842 | + /* 账户设置区域 - 商业化设计 */ | |
| 843 | + .settings-section { | |
| 844 | + margin: 24rpx 0; | |
| 845 | + animation: slideDown 0.6s ease-out; | |
| 846 | + } | |
| 847 | + | |
| 848 | + .settings-card { | |
| 849 | + background: #ffffff; | |
| 850 | + border-radius: 20rpx; | |
| 851 | + overflow: hidden; | |
| 852 | + border: 1rpx solid rgba(0, 0, 0, 0.06); | |
| 853 | + box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08); | |
| 854 | + } | |
| 855 | + | |
| 856 | + .settings-item { | |
| 857 | + display: flex; | |
| 858 | + align-items: center; | |
| 859 | + justify-content: space-between; | |
| 860 | + padding: 28rpx 32rpx; | |
| 861 | + border-bottom: 1rpx solid #f0f2f5; | |
| 862 | + cursor: pointer; | |
| 863 | + transition: all 0.3s ease; | |
| 864 | + background-color: #ffffff; | |
| 865 | + } | |
| 866 | + | |
| 867 | + .settings-item:last-child { | |
| 868 | + border-bottom: none; | |
| 869 | + } | |
| 870 | + | |
| 871 | + .settings-item:active { | |
| 872 | + background-color: #f8f9fa; | |
| 873 | + transform: translateX(4rpx); | |
| 874 | + } | |
| 875 | + | |
| 876 | + .settings-left { | |
| 877 | + display: flex; | |
| 878 | + align-items: center; | |
| 879 | + flex: 1; | |
| 880 | + } | |
| 881 | + | |
| 882 | + .settings-icon-wrapper { | |
| 883 | + width: 72rpx; | |
| 884 | + height: 72rpx; | |
| 885 | + border-radius: 16rpx; | |
| 886 | + display: flex; | |
| 887 | + align-items: center; | |
| 888 | + justify-content: center; | |
| 889 | + margin-right: 24rpx; | |
| 890 | + image { | |
| 891 | + width: 48rpx; | |
| 892 | + height: 48rpx; | |
| 893 | + } | |
| 894 | + } | |
| 895 | + | |
| 896 | + .settings-text { | |
| 897 | + font-size: 28rpx; | |
| 898 | + color: #303133; | |
| 899 | + font-weight: 500; | |
| 900 | + } | |
| 901 | + | |
| 902 | + /* 动画效果 */ | |
| 903 | + @keyframes slideDown { | |
| 904 | + from { | |
| 905 | + opacity: 0; | |
| 906 | + transform: translateY(-20rpx); | |
| 907 | + } | |
| 908 | + to { | |
| 909 | + opacity: 1; | |
| 910 | + transform: translateY(0); | |
| 911 | + } | |
| 912 | + } | |
| 913 | + | |
| 914 | + @keyframes rotate { | |
| 915 | + from { | |
| 916 | + transform: rotate(0deg); | |
| 917 | + } | |
| 918 | + to { | |
| 919 | + transform: rotate(360deg); | |
| 920 | + } | |
| 921 | + } | |
| 922 | + | |
| 923 | + /* 修改密码弹窗样式 - 商业化设计 */ | |
| 924 | + .password-dialog { | |
| 925 | + padding: 40rpx; | |
| 926 | + background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%); | |
| 927 | + border-radius: 20rpx; | |
| 928 | + box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.12); | |
| 929 | + min-width: 600rpx; | |
| 930 | + } | |
| 931 | + | |
| 932 | + .dialog-title { | |
| 933 | + font-size: 32rpx; | |
| 934 | + font-weight: 600; | |
| 935 | + color: #303133; | |
| 936 | + text-align: center; | |
| 937 | + margin-bottom: 40rpx; | |
| 938 | + position: relative; | |
| 939 | + padding-bottom: 20rpx; | |
| 940 | + } | |
| 941 | + | |
| 942 | + .dialog-title::after { | |
| 943 | + content: ''; | |
| 944 | + position: absolute; | |
| 945 | + bottom: 0; | |
| 946 | + left: 50%; | |
| 947 | + transform: translateX(-50%); | |
| 948 | + width: 60rpx; | |
| 949 | + height: 4rpx; | |
| 950 | + background: linear-gradient(90deg, #43a047 0%, #66bb6a 100%); | |
| 951 | + border-radius: 2rpx; | |
| 952 | + } | |
| 953 | + | |
| 954 | + .dialog-content { | |
| 955 | + margin-bottom: 40rpx; | |
| 956 | + } | |
| 957 | + | |
| 958 | + .form-item { | |
| 959 | + margin-bottom: 28rpx; | |
| 960 | + } | |
| 961 | + | |
| 962 | + .form-item:last-child { | |
| 963 | + margin-bottom: 0; | |
| 964 | + } | |
| 965 | + | |
| 966 | + .form-label { | |
| 967 | + display: block; | |
| 968 | + font-size: 28rpx; | |
| 969 | + color: #606266; | |
| 970 | + margin-bottom: 12rpx; | |
| 971 | + font-weight: 500; | |
| 972 | + } | |
| 973 | + | |
| 974 | + .form-input { | |
| 975 | + width: 100%; | |
| 976 | + height: 80rpx; | |
| 977 | + padding: 0 24rpx; | |
| 978 | + border: 2rpx solid #e4e7ed; | |
| 979 | + border-radius: 12rpx; | |
| 980 | + font-size: 28rpx; | |
| 981 | + color: #303133; | |
| 982 | + box-sizing: border-box; | |
| 983 | + background-color: #ffffff; | |
| 984 | + transition: all 0.3s ease; | |
| 985 | + box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04); | |
| 986 | + } | |
| 987 | + | |
| 988 | + .form-input:focus { | |
| 989 | + border-color: #43a047; | |
| 990 | + background-color: #fff; | |
| 991 | + box-shadow: 0 2rpx 12rpx rgba(67, 160, 71, 0.15); | |
| 992 | + } | |
| 993 | + | |
| 994 | + .dialog-footer { | |
| 995 | + display: flex; | |
| 996 | + justify-content: space-between; | |
| 997 | + gap: 20rpx; | |
| 998 | + margin-top: 40rpx; | |
| 999 | + } | |
| 1000 | + | |
| 1001 | + .dialog-btn { | |
| 1002 | + flex: 1; | |
| 1003 | + height: 80rpx; | |
| 1004 | + line-height: 80rpx; | |
| 1005 | + text-align: center; | |
| 1006 | + border-radius: 12rpx; | |
| 1007 | + font-size: 28rpx; | |
| 1008 | + font-weight: 500; | |
| 1009 | + cursor: pointer; | |
| 1010 | + transition: all 0.3s ease; | |
| 1011 | + box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08); | |
| 1012 | + } | |
| 1013 | + | |
| 1014 | + .cancel-btn { | |
| 1015 | + background-color: #f5f7fa; | |
| 1016 | + color: #606266; | |
| 1017 | + border: 1rpx solid #e4e7ed; | |
| 1018 | + } | |
| 1019 | + | |
| 1020 | + .cancel-btn:active { | |
| 1021 | + background-color: #e4e7ed; | |
| 1022 | + transform: scale(0.98); | |
| 1023 | + box-shadow: 0 1rpx 4rpx rgba(0, 0, 0, 0.1); | |
| 1024 | + } | |
| 1025 | + | |
| 1026 | + .confirm-btn { | |
| 1027 | + background: linear-gradient(135deg, #43a047 0%, #66bb6a 100%); | |
| 1028 | + color: #fff; | |
| 1029 | + border: none; | |
| 1030 | + } | |
| 1031 | + | |
| 1032 | + .confirm-btn:active { | |
| 1033 | + background: linear-gradient(135deg, #388e3c 0%, #43a047 100%); | |
| 1034 | + transform: scale(0.98); | |
| 1035 | + box-shadow: 0 1rpx 4rpx rgba(67, 160, 71, 0.3); | |
| 1036 | + } | |
| 1037 | +</style> | |
| 0 | 1038 | \ No newline at end of file | ... | ... |
绿纤uni-app/static/head.png
0 → 100644
12.5 KB
绿纤uni-app/static/home/activity-order.png
0 → 100644
2.16 KB
绿纤uni-app/static/home/ai-qa.png
0 → 100644
2.36 KB
绿纤uni-app/static/home/consume-card.png
0 → 100644
1.6 KB
绿纤uni-app/static/home/create-member.png
0 → 100644
1.88 KB
绿纤uni-app/static/home/dingxuan-order.png
0 → 100644
2.71 KB
绿纤uni-app/static/home/expansion.png
0 → 100644
2.72 KB
绿纤uni-app/static/home/member.png
0 → 100644
2.72 KB
绿纤uni-app/static/home/order.png
0 → 100644
2.05 KB
绿纤uni-app/static/home/purchase.png
0 → 100644
1.98 KB
绿纤uni-app/static/home/refund-card.png
0 → 100644
1.97 KB
绿纤uni-app/static/home/reimbursement-apply.png
0 → 100644
3.29 KB
绿纤uni-app/static/home/reimbursement-audit.png
0 → 100644
2.87 KB
绿纤uni-app/static/home/report.png
0 → 100644
1.77 KB
绿纤uni-app/static/home/store-management.png
0 → 100644
3.27 KB
绿纤uni-app/static/home/towel-record.png
0 → 100644
2.46 KB
绿纤uni-app/static/home/transfer-card.png
0 → 100644
2.33 KB
绿纤uni-app/static/home/usage-record.png
0 → 100644
2.75 KB
绿纤uni-app/static/home/退出.png
0 → 100644
1.47 KB
绿纤uni-app/static/icon1.png
0 → 100644
4.05 KB
绿纤uni-app/static/icon2.png
0 → 100644
2.01 KB
绿纤uni-app/static/tabBar/icon1.png
0 → 100644
2.98 KB
绿纤uni-app/static/tabBar/icon2.png
0 → 100644
2.7 KB
绿纤uni-app/static/tabBar/icon3.png
0 → 100644
3.64 KB
绿纤uni-app/static/tabBar/icon4.png
0 → 100644
3.37 KB
绿纤uni-app/static/tabBar/icon5.png
0 → 100644
2.67 KB
绿纤uni-app/static/tabBar/icon6.png
0 → 100644
2.38 KB