index.vue 27 KB

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