index.vue 25 KB

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