index.vue 27 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063
  1. <template>
  2. <view class="detail-page">
  3. <!-- 背景层 -->
  4. <view class="header-bg"></view>
  5. <!-- 顶部内容层 -->
  6. <view class="header-section">
  7. <view class="header-content">
  8. <view class="title-group">
  9. <text class="main-title">感冒灵大批量跨区域客户</text>
  10. <text class="sub-title">订单维度:单个公司单日累计 {{ ">" }} 8000盒</text>
  11. <text class="sub-title">地域维度:出库企业所在省份 ≠ 入库企业所在省份</text>
  12. </view>
  13. <view class="stat-box">
  14. <text class="stat-num">{{ totalCount }}</text>
  15. <text class="stat-unit">家</text>
  16. </view>
  17. </view>
  18. <view class="header-toolbar">
  19. <view class="filter-tabs">
  20. <view
  21. class="tab-item"
  22. v-for="(tab, index) in timeFilters"
  23. :key="index"
  24. :class="{ active: currentFilter === tab.value }"
  25. @click="switchFilter(tab.value)">
  26. {{ tab.label }}
  27. </view>
  28. </view>
  29. <view class="filter-wrap">
  30. <view class="selector" @click.stop="toggleProvinceDropdown">
  31. <text class="selector-text">{{ selectedProvince || "全部省份" }}</text>
  32. <text class="selector-arrow" :class="{ open: dropdownProvinceOpen }"></text>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. <!-- 列表区域 -->
  38. <scroll-view class="list-scroll" scroll-y="true" refresher-enabled :refresher-triggered="isRefreshing" @refresherrefresh="onRefresh">
  39. <view class="list-container">
  40. <view class="date-group" v-for="groupItem in groupedRows" :key="groupItem.date">
  41. <view class="date-group-card">
  42. <view class="group-left">
  43. <view
  44. class="group-select-btn"
  45. :class="{
  46. selected: isGroupFullySelected(groupItem),
  47. partial: isGroupPartiallySelected(groupItem),
  48. }"
  49. @click.stop="toggleGroupSelection(groupItem)">
  50. <text v-if="isGroupFullySelected(groupItem)">✓</text>
  51. <text v-else-if="isGroupPartiallySelected(groupItem)">-</text>
  52. </view>
  53. <text class="date-label">{{ groupItem.date }}</text>
  54. </view>
  55. </view>
  56. <view class="card-item" v-for="(item, index) in groupItem.list" :key="item.__selectId || index" @click="toDetail(item)">
  57. <view class="card-header">
  58. <view class="header-left">
  59. <view class="company-select-btn" :class="{ selected: isCompanySelected(item) }" @click.stop="toggleCompanySelection(item)">
  60. <text v-if="isCompanySelected(item)">✓</text>
  61. </view>
  62. <text class="index-num">{{ index + 1 }}</text>
  63. <text class="company-name">{{ item.customerName }}</text>
  64. <text class="level-tag" :class="getLevelClass(item.customerLevel)">
  65. {{ item.customerLevel }}
  66. </text>
  67. </view>
  68. <view class="header-right">
  69. <text class="alert-count">{{ item.totalWarningAmount }}次预警</text>
  70. </view>
  71. </view>
  72. <view class="card-body">
  73. <view class="info-grid">
  74. <view class="info-item">
  75. <text class="label">省份</text>
  76. <text class="value">{{ item.customerProvinceName ?? "--" }}</text>
  77. </view>
  78. <view class="info-item">
  79. <text class="label">责任人</text>
  80. <text class="value">{{ item.responsibleManager }}</text>
  81. </view>
  82. <view class="info-item">
  83. <text class="label">性质</text>
  84. <text class="value">{{ item.customerCategory }}</text>
  85. </view>
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. <view v-if="!loading && rows.length === 0" class="empty-data">
  91. <EmptyView text="无相关数据" />
  92. </view>
  93. </view>
  94. </scroll-view>
  95. <!-- 底部按钮区 -->
  96. <view class="footer-btn-area">
  97. <button class="action-btn export-btn" @click="handleExport">导出至邮箱</button>
  98. </view>
  99. <!-- 蒙层 -->
  100. <view class="report-export-create-modal-mask" v-if="emailModalOpen" @click="closeEmailModal" @touchmove.stop.prevent></view>
  101. <!-- 邮箱导出弹窗 -->
  102. <view
  103. class="report-export-create-modal report-export-create-email-modal"
  104. :class="{ 'report-export-create-modal--open': emailModalOpen }"
  105. v-if="emailModalOpen">
  106. <view class="report-export-create-modal-title">
  107. <text>发送至邮箱</text>
  108. <view class="report-export-create-modal-close" @click.stop="closeEmailModal">×</view>
  109. </view>
  110. <view class="report-export-create-modal-body">
  111. <up-input
  112. v-model="emailForm.email"
  113. border="none"
  114. :customStyle="{
  115. backgroundColor: '#ebf3fb',
  116. height: '80rpx',
  117. paddingLeft: '20rpx',
  118. }"
  119. placeholder="请填写邮箱"
  120. @input="emailError = false"
  121. disabled>
  122. <template #suffix>
  123. <view style="margin-right: 20rpx; color: #666">@999.com.cn</view>
  124. </template>
  125. </up-input>
  126. <text v-if="emailError" class="report-export-error-text">请输入邮箱</text>
  127. </view>
  128. <view class="report-export-create-modal-footer">
  129. <view class="report-export-create-modal-btn cancel-btn" @click.stop="closeEmailModal">取消</view>
  130. <view class="report-export-create-modal-btn confirm-btn" @click.stop="handleSendEmail">发送</view>
  131. </view>
  132. </view>
  133. <!-- 独立的下拉菜单层 -->
  134. <view class="dropdown-layer" v-if="dropdownProvinceOpen" @click.stop>
  135. <view class="dropdown">
  136. <view class="dropdown-search-bar">
  137. <input class="dropdown-search-input" v-model="provinceSearchText" placeholder="搜索省份..." placeholder-style="color: #999" />
  138. </view>
  139. <scroll-view scroll-y="true" class="dropdown-scroll-view">
  140. <view
  141. class="dropdown-item"
  142. v-for="(p, i) in filteredProvinceList"
  143. :key="p || i"
  144. :class="{
  145. active: p === selectedProvince || (!selectedProvince && i === 0),
  146. }"
  147. @click.stop="selectProvince(p)">
  148. {{ p || "全部省份" }}
  149. <text v-if="p === selectedProvince || (!selectedProvince && i === 0)" class="check-mark">✓</text>
  150. </view>
  151. <view v-if="filteredProvinceList.length === 0" class="dropdown-empty">暂无数据</view>
  152. </scroll-view>
  153. </view>
  154. </view>
  155. </view>
  156. <BottomScrollTip :text="'下滑动查看更多内容'" :bottom="'140rpx'" />
  157. </template>
  158. <script>
  159. import EmptyView from "../../../wigets/empty.vue";
  160. import request from "../../../request/index.js";
  161. import BottomScrollTip from "../../../wigets/BottomScrollTip.vue";
  162. import { formatDate, guid } from "../../../utils/utils.js";
  163. export default {
  164. components: {
  165. EmptyView,
  166. BottomScrollTip,
  167. },
  168. data() {
  169. return {
  170. isRefreshing: false,
  171. loading: false,
  172. rows: [],
  173. allRows: [],
  174. dropdownProvinceOpen: false,
  175. provinceSearchText: "",
  176. provinceList: [""],
  177. selectedProvince: "",
  178. currentFilter: "all",
  179. timeFilters: [
  180. { label: "全部", value: "all" },
  181. { label: "近7天", value: "7" },
  182. { label: "近15天", value: "15" },
  183. { label: "近30天", value: "30" },
  184. ],
  185. totalCount: 0,
  186. emailModalOpen: false,
  187. emailForm: {
  188. email: "",
  189. },
  190. emailError: false,
  191. // 多选导出选择状态:存每条记录的唯一 __selectId
  192. selectedCompanyKeys: [],
  193. };
  194. },
  195. created() {
  196. this.resetFetch();
  197. this.getProviceList();
  198. const userEmail = uni.getStorageSync("traceCode_useremail");
  199. this.emailForm.email = userEmail;
  200. },
  201. methods: {
  202. formatDate,
  203. switchFilter(value) {
  204. if (this.currentFilter === value) return;
  205. this.currentFilter = value;
  206. this.resetFetch();
  207. },
  208. // 选择的唯一 key(由列表接口注入 __selectId)
  209. getCompanyKey(item = {}) {
  210. return String(item.__selectId || "");
  211. },
  212. isCompanySelected(item) {
  213. const key = this.getCompanyKey(item);
  214. if (!key) return false;
  215. return (this.selectedCompanyKeys || []).includes(key);
  216. },
  217. toggleCompanySelection(item) {
  218. const key = this.getCompanyKey(item);
  219. if (!key) return;
  220. const has = this.isCompanySelected(item);
  221. if (has) {
  222. this.selectedCompanyKeys = (this.selectedCompanyKeys || []).filter((k) => k !== key);
  223. } else {
  224. this.selectedCompanyKeys = [...(this.selectedCompanyKeys || []), key];
  225. }
  226. },
  227. isGroupFullySelected(groupItem = {}) {
  228. const list = Array.isArray(groupItem.list) ? groupItem.list : [];
  229. if (!list.length) return false;
  230. return list.every((it) => this.isCompanySelected(it));
  231. },
  232. isGroupPartiallySelected(groupItem = {}) {
  233. const list = Array.isArray(groupItem.list) ? groupItem.list : [];
  234. if (!list.length) return false;
  235. const selectedCount = list.filter((it) => this.isCompanySelected(it)).length;
  236. return selectedCount > 0 && selectedCount < list.length;
  237. },
  238. toggleGroupSelection(groupItem = {}) {
  239. const list = Array.isArray(groupItem.list) ? groupItem.list : [];
  240. if (!list.length) return;
  241. const groupKeys = list.map((it) => this.getCompanyKey(it)).filter(Boolean);
  242. if (!groupKeys.length) return;
  243. const allSelected = groupKeys.every((k) => (this.selectedCompanyKeys || []).includes(k));
  244. if (allSelected) {
  245. this.selectedCompanyKeys = (this.selectedCompanyKeys || []).filter((k) => !groupKeys.includes(k));
  246. } else {
  247. const merged = new Set([...(this.selectedCompanyKeys || []), ...groupKeys]);
  248. this.selectedCompanyKeys = Array.from(merged);
  249. }
  250. },
  251. getUpdatedDate(fullTime) {
  252. const t = String(fullTime || "");
  253. if (!t) return "未知日期";
  254. return t.split(" ")[0] || t.split("T")[0] || "未知日期";
  255. },
  256. getProviceList() {
  257. request("/common/getProviceList", {
  258. path: "traceabilityReport/pages/ganmaoling/index.vue",
  259. }).then((res) => {
  260. if (res.code == 200) {
  261. const _data = res.data || [];
  262. this.provinceList = ["", ..._data.map((item) => item.regionName)];
  263. }
  264. });
  265. },
  266. getLevelClass(level) {
  267. if (level === "VIP") return "tag-vip";
  268. if (level === "二级") return "tag-l2";
  269. if (level === "三级") return "tag-l3";
  270. return "tag-default";
  271. },
  272. fetchList() {
  273. if (this.loading) return;
  274. this.loading = true;
  275. const days = this.currentFilter === "all" ? -1 : this.currentFilter;
  276. request(
  277. `/report/ganmaoling/list?days=${days}`,
  278. {
  279. path: "traceabilityReport/pages/ganmaoling/index.vue",
  280. },
  281. "get",
  282. ).then((res) => {
  283. if (res.code == 200) {
  284. this.allRows = (res.data || []).map((it) => ({
  285. ...it,
  286. __selectId: it?.__selectId || guid("glm_"),
  287. }));
  288. this.applyFilter();
  289. }
  290. this.loading = false;
  291. this.isRefreshing = false;
  292. });
  293. },
  294. async onRefresh() {
  295. this.isRefreshing = true;
  296. this.fetchList();
  297. },
  298. resetFetch() {
  299. this.rows = [];
  300. this.selectedCompanyKeys = [];
  301. this.fetchList();
  302. },
  303. applyFilter() {
  304. if (!this.selectedProvince) {
  305. this.rows = [...this.allRows];
  306. } else {
  307. this.rows = this.allRows.filter((item) => item.customerProvinceName === this.selectedProvince);
  308. }
  309. this.totalCount = this.rows.length;
  310. // 切换筛选条件后清空已选企业,避免脏选中
  311. this.selectedCompanyKeys = [];
  312. },
  313. toggleProvinceDropdown() {
  314. this.dropdownProvinceOpen = !this.dropdownProvinceOpen;
  315. },
  316. closeProvinceDropdown() {
  317. this.dropdownProvinceOpen = false;
  318. },
  319. selectProvince(province) {
  320. this.selectedProvince = province || "";
  321. this.dropdownProvinceOpen = false;
  322. this.applyFilter();
  323. },
  324. toDetail(item) {
  325. uni.navigateTo({
  326. url: `/traceCodePackages/traceabilityReport/pages/ganmaoling/detail/index?name=${encodeURIComponent(item.customerName)}&updatedTime=${item.updatedTime || ""}`,
  327. });
  328. },
  329. handleExport() {
  330. if ((this.selectedCompanyKeys || []).length === 0) {
  331. uni.showToast({
  332. title: "请选择要导出的企业",
  333. icon: "none",
  334. });
  335. return;
  336. }
  337. this.emailModalOpen = true;
  338. this.emailError = false;
  339. },
  340. closeEmailModal() {
  341. this.emailModalOpen = false;
  342. },
  343. async handleSendEmail() {
  344. if (!this.emailForm.email) {
  345. this.emailError = true;
  346. return;
  347. }
  348. const selectedRows = (this.rows || []).filter((r) => (this.selectedCompanyKeys || []).includes(this.getCompanyKey(r)));
  349. const selectedDates = Array.from(new Set(selectedRows.map((r) => this.getUpdatedDate(r.updatedTime)))).filter(Boolean);
  350. if (!selectedDates.length) {
  351. uni.showToast({ title: "未找到可导出的日期", icon: "none" });
  352. return;
  353. }
  354. uni.showLoading({ title: "发送中..." });
  355. try {
  356. // for (let i = 0; i < selectedDates.length; i++) {
  357. // const dateStr = selectedDates[i];
  358. // const res = await request(
  359. // `/report/ganmaoling/sendemail`,
  360. // {
  361. // updatedTime: dateStr,
  362. // emailAddress: this.emailForm.email + "@999.com.cn",
  363. // path: "traceabilityReport/pages/ganmaoling/index.vue",
  364. // },
  365. // "post",
  366. // );
  367. // if (res?.code != 200) {
  368. // uni.hideLoading();
  369. // uni.showToast({
  370. // title: res?.msg || "发送失败",
  371. // icon: "none",
  372. // });
  373. // return;
  374. // }
  375. // }
  376. const emailDTOList = selectedRows.map((item) => ({
  377. companyNameList: item.customerName.split(","),
  378. statisticsDate: item.updatedTime,
  379. taskId: item.refEntId,
  380. }));
  381. const res = await request(
  382. `/api/email/send`,
  383. {
  384. emailDTOList,
  385. type: 1,
  386. uid: uni.getStorageSync("userInfo").ldap,
  387. path: "traceabilityReport/pages/ganmaoling/index.vue",
  388. },
  389. "post",
  390. );
  391. if (res?.code != 200) {
  392. uni.hideLoading();
  393. uni.showToast({
  394. title: res?.msg || "发送失败",
  395. icon: "none",
  396. });
  397. return;
  398. }
  399. uni.hideLoading();
  400. uni.showToast({ title: "发送成功", icon: "success" });
  401. this.closeEmailModal();
  402. } catch (e) {
  403. uni.hideLoading();
  404. uni.showToast({ title: "发送失败", icon: "none" });
  405. }
  406. },
  407. },
  408. computed: {
  409. groupedRows() {
  410. const groups = {};
  411. (this.rows || []).forEach((item) => {
  412. const date = this.getUpdatedDate(item.updatedTime);
  413. if (!groups[date]) groups[date] = [];
  414. groups[date].push(item);
  415. });
  416. return Object.keys(groups)
  417. .sort((a, b) => new Date(String(b).replace(/-/g, "/")).getTime() - new Date(String(a).replace(/-/g, "/")).getTime())
  418. .map((date) => ({
  419. date,
  420. list: groups[date],
  421. }));
  422. },
  423. filteredProvinceList() {
  424. if (!this.provinceSearchText) {
  425. return this.provinceList;
  426. }
  427. return this.provinceList.filter((p) => p?.toLowerCase()?.includes(this.provinceSearchText.toLowerCase()));
  428. },
  429. },
  430. };
  431. </script>
  432. <style scoped>
  433. .detail-page {
  434. display: flex;
  435. flex-direction: column;
  436. height: calc(100vh - 116rpx - env(safe-area-inset-bottom));
  437. box-sizing: border-box;
  438. background: #f5f7fa;
  439. position: relative;
  440. }
  441. /* Header Background Layer */
  442. .header-bg {
  443. position: absolute;
  444. top: 0;
  445. left: 0;
  446. width: 100%;
  447. height: 320rpx;
  448. /* Fixed height for background */
  449. background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
  450. border-bottom-left-radius: 40rpx;
  451. border-bottom-right-radius: 40rpx;
  452. z-index: 1;
  453. box-shadow: 0 10rpx 30rpx rgba(24, 144, 255, 0.2);
  454. }
  455. /* Header Content Layer */
  456. .header-section {
  457. padding: 40rpx 40rpx 80rpx;
  458. position: relative;
  459. z-index: 3;
  460. /* Above List */
  461. color: #fff;
  462. /* Transparent background to allow overlap effect */
  463. }
  464. .header-content {
  465. display: flex;
  466. justify-content: space-between;
  467. align-items: flex-start;
  468. position: relative;
  469. z-index: 2;
  470. margin-bottom: 30rpx;
  471. }
  472. .title-group {
  473. display: flex;
  474. flex-direction: column;
  475. flex: 1;
  476. margin-right: 20rpx;
  477. }
  478. .main-title {
  479. font-size: 44rpx;
  480. font-weight: bold;
  481. margin-bottom: 16rpx;
  482. letter-spacing: 2rpx;
  483. line-height: 1.2;
  484. }
  485. .sub-title {
  486. font-size: 24rpx;
  487. opacity: 0.9;
  488. margin-bottom: 8rpx;
  489. line-height: 1.4;
  490. }
  491. .stat-box {
  492. display: flex;
  493. align-items: baseline;
  494. }
  495. .stat-num {
  496. font-size: 56rpx;
  497. font-weight: bold;
  498. margin-right: 8rpx;
  499. font-family: "DINAlternate-Bold", sans-serif;
  500. }
  501. .stat-unit {
  502. font-size: 24rpx;
  503. opacity: 0.8;
  504. }
  505. /* Header Toolbar */
  506. .header-toolbar {
  507. display: flex;
  508. justify-content: space-between;
  509. align-items: center;
  510. position: relative;
  511. z-index: 3;
  512. gap: 20rpx;
  513. }
  514. .update-tip {
  515. display: inline-flex;
  516. align-items: center;
  517. background: rgba(255, 255, 255, 0.15);
  518. padding: 8rpx 20rpx;
  519. border-radius: 30rpx;
  520. font-size: 22rpx;
  521. backdrop-filter: blur(10px);
  522. }
  523. .tip-icon {
  524. margin-right: 8rpx;
  525. font-size: 20rpx;
  526. }
  527. /* Filter Styles */
  528. .filter-wrap {
  529. position: relative;
  530. }
  531. .selector {
  532. display: flex;
  533. align-items: center;
  534. color: #fff;
  535. font-size: 26rpx;
  536. font-weight: 500;
  537. padding: 8rpx 20rpx;
  538. background: rgba(255, 255, 255, 0.2);
  539. border-radius: 30rpx;
  540. border: 1rpx solid rgba(255, 255, 255, 0.3);
  541. }
  542. .selector-text {
  543. max-width: 200rpx;
  544. overflow: hidden;
  545. white-space: nowrap;
  546. text-overflow: ellipsis;
  547. }
  548. .selector-arrow {
  549. margin-left: 10rpx;
  550. width: 0;
  551. height: 0;
  552. border-left: 8rpx solid transparent;
  553. border-right: 8rpx solid transparent;
  554. border-top: 10rpx solid #fff;
  555. transition: transform 0.3s;
  556. }
  557. .selector-arrow.open {
  558. transform: rotate(180deg);
  559. }
  560. /* Header date filter tabs */
  561. .filter-tabs {
  562. display: flex;
  563. background: rgba(255, 255, 255, 0.2);
  564. border-radius: 16rpx;
  565. padding: 6rpx 6rpx;
  566. z-index: 30;
  567. position: relative;
  568. flex: 1;
  569. max-width: 420rpx;
  570. }
  571. .tab-item {
  572. flex: 1;
  573. text-align: center;
  574. font-size: 24rpx;
  575. padding: 10rpx 0;
  576. border-radius: 12rpx;
  577. color: rgba(255, 255, 255, 0.8);
  578. transition: all 0.3s;
  579. }
  580. .tab-item.active {
  581. background: #fff;
  582. color: #2b32b2;
  583. font-weight: 600;
  584. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
  585. }
  586. /* Date-group (history style) */
  587. .date-group {
  588. margin-bottom: 40rpx;
  589. }
  590. .date-group-card {
  591. display: flex;
  592. align-items: center;
  593. justify-content: flex-start;
  594. background: #fff;
  595. padding: 16rpx 22rpx;
  596. border-radius: 16rpx;
  597. margin-bottom: 20rpx;
  598. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.03);
  599. border-left: 6rpx solid #1488cc;
  600. }
  601. .group-left {
  602. display: flex;
  603. align-items: center;
  604. }
  605. .date-label {
  606. font-size: 28rpx;
  607. font-weight: 600;
  608. color: #333;
  609. }
  610. .group-select-btn {
  611. width: 36rpx;
  612. height: 36rpx;
  613. border-radius: 50%;
  614. border: 2rpx solid #1488cc;
  615. color: #1488cc;
  616. display: flex;
  617. align-items: center;
  618. justify-content: center;
  619. font-size: 22rpx;
  620. background: rgba(20, 136, 204, 0.06);
  621. margin-right: 14rpx;
  622. }
  623. .group-select-btn.selected {
  624. background: #1488cc;
  625. color: #fff;
  626. }
  627. .group-select-btn.partial {
  628. background: rgba(20, 136, 204, 0.15);
  629. }
  630. .company-select-btn {
  631. width: 36rpx;
  632. height: 36rpx;
  633. border-radius: 50%;
  634. border: 2rpx solid #d0d7e2;
  635. color: #d0d7e2;
  636. display: flex;
  637. align-items: center;
  638. justify-content: center;
  639. margin-right: 12rpx;
  640. font-size: 22rpx;
  641. background: #fff;
  642. flex-shrink: 0;
  643. }
  644. .company-select-btn.selected {
  645. border-color: #1488cc;
  646. color: #1488cc;
  647. background: rgba(20, 136, 204, 0.08);
  648. }
  649. /* Dropdown Layer (Absolute on top of everything) */
  650. .dropdown-layer {
  651. position: absolute;
  652. top: 300rpx;
  653. /* Adjust based on header layout */
  654. right: 40rpx;
  655. z-index: 999;
  656. }
  657. .dropdown {
  658. width: 360rpx;
  659. background: #fff;
  660. border-radius: 12rpx;
  661. box-shadow: 0 8rpx 30rpx rgba(0, 0, 0, 0.15);
  662. overflow: hidden;
  663. }
  664. .dropdown-search-bar {
  665. padding: 16rpx;
  666. border-bottom: 1rpx solid #f0f0f0;
  667. }
  668. .dropdown-search-input {
  669. background: #f5f7fa;
  670. height: 64rpx;
  671. border-radius: 32rpx;
  672. padding: 0 24rpx;
  673. font-size: 26rpx;
  674. }
  675. .dropdown-scroll-view {
  676. max-height: 400rpx;
  677. }
  678. .dropdown-item {
  679. padding: 20rpx 30rpx;
  680. font-size: 28rpx;
  681. color: #333;
  682. display: flex;
  683. justify-content: space-between;
  684. align-items: center;
  685. transition: background 0.2s;
  686. }
  687. .dropdown-item:active {
  688. background: #f5f7fa;
  689. }
  690. .dropdown-item.active {
  691. color: #1890ff;
  692. font-weight: 500;
  693. background: #e6f7ff;
  694. }
  695. .check-mark {
  696. font-size: 24rpx;
  697. }
  698. .dropdown-empty {
  699. padding: 40rpx;
  700. text-align: center;
  701. color: #999;
  702. font-size: 26rpx;
  703. }
  704. /* List Section */
  705. .list-scroll {
  706. flex: 1;
  707. height: 0;
  708. padding: 0 24rpx;
  709. box-sizing: border-box;
  710. margin-top: -50rpx;
  711. /* Overlap effect */
  712. position: relative;
  713. z-index: 2;
  714. /* Between bg and header content */
  715. }
  716. .list-container {
  717. padding-top: 10rpx;
  718. padding-bottom: calc(200rpx + env(safe-area-inset-bottom));
  719. }
  720. .card-item {
  721. background: #fff;
  722. border-radius: 20rpx;
  723. padding: 26rpx 22rpx;
  724. margin-bottom: 20rpx;
  725. box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.05);
  726. transition: transform 0.2s;
  727. }
  728. .card-item:active {
  729. transform: scale(0.99);
  730. }
  731. .card-header {
  732. display: flex;
  733. justify-content: space-between;
  734. align-items: center;
  735. margin-bottom: 16rpx;
  736. }
  737. .header-left {
  738. flex: 1;
  739. display: flex;
  740. align-items: center;
  741. flex-wrap: nowrap;
  742. margin-right: 20rpx;
  743. gap: 0;
  744. min-width: 0;
  745. }
  746. .index-num {
  747. font-size: 24rpx;
  748. color: #999;
  749. font-family: monospace;
  750. margin-right: 12rpx;
  751. }
  752. .company-name {
  753. font-size: 32rpx;
  754. font-weight: 600;
  755. color: #096dd9;
  756. line-height: 1.4;
  757. text-decoration: underline;
  758. margin-right: 8rpx;
  759. }
  760. .level-tag {
  761. font-size: 20rpx;
  762. padding: 4rpx 12rpx;
  763. border-radius: 8rpx;
  764. white-space: nowrap;
  765. line-height: 1.2;
  766. }
  767. .header-right {
  768. flex-shrink: 0;
  769. }
  770. .tag-vip {
  771. background: linear-gradient(135deg, #e6f7ff, #bae7ff);
  772. color: #096dd9;
  773. }
  774. .tag-l2 {
  775. background: linear-gradient(135deg, #f6ffed, #d9f7be);
  776. color: #389e0d;
  777. }
  778. .tag-l3 {
  779. background: linear-gradient(135deg, #fff7e6, #ffe7ba);
  780. color: #d46b08;
  781. }
  782. .tag-default {
  783. background: #f5f5f5;
  784. color: #999;
  785. }
  786. .card-body {
  787. background: #f9fbfd;
  788. border-radius: 12rpx;
  789. padding: 24rpx;
  790. }
  791. .info-grid {
  792. display: flex;
  793. flex-wrap: wrap;
  794. gap: 24rpx;
  795. }
  796. .info-item {
  797. display: flex;
  798. align-items: center;
  799. min-width: 45%;
  800. }
  801. .info-item .label {
  802. font-size: 24rpx;
  803. color: #999;
  804. margin-right: 12rpx;
  805. }
  806. .info-item .value {
  807. font-size: 26rpx;
  808. color: #666;
  809. font-weight: 500;
  810. }
  811. .alert-count {
  812. font-size: 22rpx;
  813. color: #ff4d4f;
  814. background: rgba(255, 77, 79, 0.1);
  815. padding: 6rpx 16rpx;
  816. border-radius: 20rpx;
  817. font-weight: 600;
  818. }
  819. .empty-data {
  820. padding-top: 120rpx;
  821. }
  822. .footer-btn-area {
  823. padding: 24rpx 32rpx calc(24rpx + env(safe-area-inset-bottom));
  824. background: #fff;
  825. box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.08);
  826. position: fixed;
  827. z-index: 100;
  828. bottom: 0;
  829. width: 100%;
  830. box-sizing: border-box;
  831. display: flex;
  832. gap: 24rpx;
  833. }
  834. .action-btn {
  835. flex: 1;
  836. height: 88rpx;
  837. line-height: 88rpx;
  838. border-radius: 44rpx;
  839. font-size: 30rpx;
  840. font-weight: 600;
  841. text-align: center;
  842. border: none;
  843. transition: all 0.3s;
  844. }
  845. .action-btn::after {
  846. border: none;
  847. }
  848. .action-btn:active {
  849. transform: scale(0.96);
  850. }
  851. .history-btn {
  852. background: #fff;
  853. color: #1890ff;
  854. border: 2rpx solid #1890ff;
  855. box-shadow: 0 4rpx 12rpx rgba(24, 144, 255, 0.1);
  856. }
  857. .export-btn {
  858. background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
  859. color: #fff;
  860. box-shadow: 0 6rpx 16rpx rgba(24, 144, 255, 0.35);
  861. }
  862. /* 弹窗样式 */
  863. .report-export-create-modal-mask {
  864. position: fixed;
  865. top: 0;
  866. left: 0;
  867. right: 0;
  868. bottom: 0;
  869. background: rgba(0, 0, 0, 0.6);
  870. z-index: 999;
  871. backdrop-filter: blur(2px);
  872. }
  873. .report-export-create-modal {
  874. position: fixed;
  875. z-index: 1000;
  876. background: #fff;
  877. transition: all 0.3s ease;
  878. }
  879. .report-export-create-email-modal {
  880. top: 50%;
  881. left: 50%;
  882. transform: translate(-50%, -50%);
  883. width: 620rpx;
  884. border-radius: 24rpx;
  885. opacity: 0;
  886. visibility: hidden;
  887. overflow: hidden;
  888. }
  889. .report-export-create-email-modal.report-export-create-modal--open {
  890. opacity: 1;
  891. visibility: visible;
  892. }
  893. .report-export-create-modal-title {
  894. padding: 36rpx 32rpx;
  895. font-size: 36rpx;
  896. color: #333;
  897. text-align: center;
  898. font-weight: 600;
  899. border-bottom: 1rpx solid #f0f0f0;
  900. position: relative;
  901. }
  902. .report-export-create-modal-close {
  903. position: absolute;
  904. right: 32rpx;
  905. top: 50%;
  906. transform: translateY(-50%);
  907. font-size: 44rpx;
  908. color: #999;
  909. line-height: 1;
  910. padding: 10rpx;
  911. }
  912. .report-export-create-modal-body {
  913. padding: 48rpx 40rpx 32rpx;
  914. }
  915. .report-export-error-text {
  916. font-size: 24rpx;
  917. color: #ff4d4f;
  918. margin-top: 12rpx;
  919. display: block;
  920. }
  921. .report-export-create-modal-footer {
  922. padding: 0 40rpx 48rpx;
  923. display: flex;
  924. justify-content: space-between;
  925. gap: 24rpx;
  926. }
  927. .report-export-create-modal-btn {
  928. height: 88rpx;
  929. line-height: 88rpx;
  930. border-radius: 44rpx;
  931. text-align: center;
  932. font-size: 30rpx;
  933. font-weight: 600;
  934. flex: 1;
  935. margin: 0;
  936. }
  937. .cancel-btn {
  938. background: #f5f7fa;
  939. color: #666;
  940. border: 1rpx solid #e4e7ed;
  941. }
  942. .confirm-btn {
  943. background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
  944. color: #fff;
  945. box-shadow: 0 6rpx 16rpx rgba(24, 144, 255, 0.3);
  946. }
  947. </style>