index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766
  1. <template>
  2. <Water></Water>
  3. <view class="detail-page">
  4. <view class="tabs">
  5. <view class="tab" v-for="(t, i) in tabs" :key="t.label" :class="{ active: category == t.value }"
  6. :style="{ opacity: isLoading ? 0.5 : 1 }" @click="selectTab(t)">
  7. {{ t.label }}
  8. </view>
  9. </view>
  10. <view class="grid-scroll">
  11. <scroll-view v-show="category == 1" scroll-y class="grid-scroll-view" @scrolltolower="onTableScrollToLower">
  12. <view>
  13. <view v-if="!loading && rows.length > 0" class="card-list">
  14. <view class="company-card" v-for="(company, cIdx) in rows" :key="cIdx">
  15. <view class="company-header" @click="toggleExpand(company)">
  16. <view class="company-title">
  17. <text class="company-name">入库方:{{ company.name }}</text>
  18. <view class="company-products" v-if="company.products && company.products.length">
  19. <text class="company-product-item" v-for="(prod, pIdx) in company.products" :key="pIdx">
  20. {{ prod.name }} {{ prod.spec }}
  21. </text>
  22. </view>
  23. <view class="company-meta">
  24. <view class="company-meta-row">
  25. <text class="company-meta-item">客户性质:{{ company.customerNature || "--" }}</text>
  26. <text class="company-meta-item">客户等级:{{ company.customerLevel || "--" }}</text>
  27. </view>
  28. <view class="company-meta-row">
  29. <text class="company-meta-item">责任经理:{{ company.responsibleManager || "--" }}</text>
  30. </view>
  31. </view>
  32. <!-- <text class="company-total">总数量:{{ company.totalQty }}</text> -->
  33. </view>
  34. <uni-icons :type="company.expanded ? 'up' : 'down'" size="20" color="#999"></uni-icons>
  35. </view>
  36. <view v-if="company.expanded" class="company-body">
  37. <view class="exporter-section" v-for="(exp, eIdx) in company.exporters" :key="eIdx">
  38. <view class="exporter-title" @click="toggleSubExpand(exp)">
  39. <text>{{ category == 1 ? '出库方' : '入库方' }}:{{ exp.name }}</text>
  40. <uni-icons :type="exp.expanded ? 'up' : 'down'" size="16" color="#666"></uni-icons>
  41. </view>
  42. <view class="exporter-meta">
  43. <view class="exporter-meta-row">
  44. <text class="exporter-meta-item">客户性质:{{ exp.fromCustomerNature || "--" }}</text>
  45. <text class="exporter-meta-item">客户等级:{{ exp.fromCustomerLevel || "--" }}</text>
  46. </view>
  47. <view class="exporter-meta-row">
  48. <text class="exporter-meta-item">责任经理:{{ exp.fromResponsibleManager || "--" }}</text>
  49. </view>
  50. </view>
  51. <view v-if="exp.expanded" class="product-group" v-for="(pg, pIdx) in exp.products" :key="pIdx">
  52. <!-- Product Header Removed as requested, info is now in company header -->
  53. <!-- <view class="product-header">
  54. <text class="product-name">{{ pg.name }}</text>
  55. <text class="product-spec">{{ pg.spec }}</text>
  56. </view> -->
  57. <scroll-view scroll-x class="batch-scroll">
  58. <view class="batch-table">
  59. <view class="batch-header-row">
  60. <text class="th-cell col-batch">批号</text>
  61. <text class="th-cell col-region">货源地区</text>
  62. <text class="th-cell col-qty">货源数量(盒)</text>
  63. <text class="th-cell col-qty">终端到达数量(盒)</text>
  64. <text class="th-cell col-time">出库时间</text>
  65. <text class="th-cell col-code">追溯码抽样</text>
  66. </view>
  67. <view class="batch-row" v-for="(batch, bIdx) in pg.batches" :key="bIdx">
  68. <text class="td-cell col-batch">{{ batch.produceBatchNo }}</text>
  69. <text class="td-cell col-region">{{ batch.regionName }}</text>
  70. <text class="td-cell col-qty">{{ batch.fromQty }}</text>
  71. <text class="td-cell col-qty">{{ batch.toQty }}</text>
  72. <text class="td-cell col-time">{{ batch.billTime }}</text>
  73. <text class="td-cell col-code copyable-code" @click="copyTraceCode(batch.tracCode)">
  74. {{ batch.tracCode }}
  75. </text>
  76. </view>
  77. </view>
  78. </scroll-view>
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. <view class="loading-row" v-if="hasMore">
  84. <view class="loading-wrapper">
  85. <image class="loading-icon" src="../../../../static/images/loading.png" />
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. </scroll-view>
  91. <scroll-view v-show="category == 2" class="grid-scroll" scroll-y="true" scroll-x="true" :show-scrollbar="false"
  92. enhanced @scrolltolower="onTableScrollToLower">
  93. <view>
  94. <view v-if="!_loading && _rows.length > 0" class="card-list">
  95. <view class="company-card" v-for="(company, cIdx) in _rows" :key="cIdx">
  96. <view class="company-header" @click="toggleExpand(company)">
  97. <view class="company-title">
  98. <text class="company-name">出库方:{{ company.name }}</text>
  99. <view class="company-products" v-if="company.products && company.products.length">
  100. <text class="company-product-item" v-for="(prod, pIdx) in company.products" :key="pIdx">
  101. {{ prod.name }} {{ prod.spec }}
  102. </text>
  103. </view>
  104. <view class="company-meta">
  105. <view class="company-meta-row">
  106. <text class="company-meta-item">客户性质:{{ company.customerNature || "--" }}</text>
  107. <text class="company-meta-item">客户等级:{{ company.customerLevel || "--" }}</text>
  108. </view>
  109. <view class="company-meta-row">
  110. <text class="company-meta-item">责任经理:{{ company.responsibleManager || "--" }}</text>
  111. </view>
  112. </view>
  113. <!-- <text class="company-total">总数量:{{ company.totalQty }}</text> -->
  114. </view>
  115. <uni-icons :type="company.expanded ? 'up' : 'down'" size="20" color="#999"></uni-icons>
  116. </view>
  117. <view v-if="company.expanded" class="company-body">
  118. <view class="exporter-section" v-for="(exp, eIdx) in company.exporters" :key="eIdx">
  119. <view class="exporter-title" @click="toggleSubExpand(exp)">
  120. <text>{{ category == 1 ? '出库方' : '入库方' }}:{{ exp.name }}</text>
  121. <uni-icons :type="exp.expanded ? 'up' : 'down'" size="16" color="#666"></uni-icons>
  122. </view>
  123. <view class="exporter-meta">
  124. <view class="exporter-meta-row">
  125. <text class="exporter-meta-item">客户性质:{{ exp.fromCustomerNature || "--" }}</text>
  126. <text class="exporter-meta-item">客户等级:{{ exp.fromCustomerLevel || "--" }}</text>
  127. </view>
  128. <view class="exporter-meta-row">
  129. <text class="exporter-meta-item">责任经理:{{ exp.fromResponsibleManager || "--" }}</text>
  130. </view>
  131. </view>
  132. <view v-if="exp.expanded" class="product-group" v-for="(pg, pIdx) in exp.products" :key="pIdx">
  133. <scroll-view scroll-x class="batch-scroll">
  134. <view class="batch-table">
  135. <view class="batch-header-row">
  136. <text class="th-cell col-batch">批号</text>
  137. <text class="th-cell col-region">货源地区</text>
  138. <text class="th-cell col-qty">货源数量</text>
  139. <text class="th-cell col-qty">终端到达数量</text>
  140. <text class="th-cell col-time">入库时间</text>
  141. <text class="th-cell col-code">追溯码抽样</text>
  142. </view>
  143. <view class="batch-row" v-for="(batch, bIdx) in pg.batches" :key="bIdx">
  144. <text class="td-cell col-batch">{{ batch.produceBatchNo }}</text>
  145. <text class="td-cell col-region">{{ batch.regionName }}</text>
  146. <text class="td-cell col-qty">{{ batch.fromQty }}</text>
  147. <text class="td-cell col-qty">{{ batch.toQty }}</text>
  148. <text class="td-cell col-time">{{ batch.billTime }}</text>
  149. <text class="td-cell col-code copyable-code" @click="copyTraceCode(batch.tracCode)">
  150. {{ batch.tracCode }}
  151. </text>
  152. </view>
  153. </view>
  154. </scroll-view>
  155. </view>
  156. </view>
  157. </view>
  158. </view>
  159. <view class="loading-row" v-if="_hasMore">
  160. <view class="loading-wrapper">
  161. <image class="loading-icon" src="../../../../static/images/loading.png" />
  162. </view>
  163. </view>
  164. </view>
  165. </view>
  166. </scroll-view>
  167. <view v-if="isLoading" class="loading-wrap">
  168. <view class="loading-row">
  169. <view class="loading-wrapper">
  170. <image class="loading-icon" src="../../../../static/images/loading.png" />
  171. </view>
  172. </view>
  173. </view>
  174. <view v-if="showEmptyData" class="empty-data">
  175. <EmptyView text="该时间段没有数据,请重新选择时间段" />
  176. </view>
  177. </view>
  178. </view>
  179. <BottomScrollTip :text="'左右滑动表格查看更多内容'" />
  180. </template>
  181. <script>
  182. import EmptyView from "../../../../wigets/empty.vue";
  183. import BottomScrollTip from "../../../../wigets/BottomScrollTip.vue";
  184. import Water from "@/components/water/water.vue";
  185. import request from "../../../../request/index.js";
  186. import { formatDate } from "../../../../utils/utils.js";
  187. export default {
  188. components: {
  189. EmptyView,
  190. BottomScrollTip,
  191. Water,
  192. },
  193. data() {
  194. return {
  195. shareTitle: "报表详情",
  196. taskId: "",
  197. tableBodyHeight: 0,
  198. baseRowHeight: 76,
  199. tabs: [
  200. {
  201. label: "药品购进",
  202. value: "1",
  203. },
  204. {
  205. label: "药品销售",
  206. value: "2",
  207. },
  208. ],
  209. category: "1",
  210. loading: true,
  211. rows: [],
  212. totalCount: 0,
  213. fetchLoading: false,
  214. hasMore: true,
  215. pageNum: 1,
  216. pageSize: 10,
  217. _loading: true,
  218. _rows: [],
  219. _totalCount: 0,
  220. _fetchLoading: false,
  221. _hasMore: true,
  222. _pageNum: 1,
  223. _pageSize: 10,
  224. };
  225. },
  226. onLoad(options) {
  227. const title = this.safeDecode(options && options.title) || "报表详情";
  228. this.shareTitle = title;
  229. this.taskId = options && options.id ? options.id : "";
  230. uni.setNavigationBarTitle({ title });
  231. this.tableBodyHeight = 14 * 80;
  232. this.fetchList();
  233. },
  234. onShareAppMessage() {
  235. return {
  236. title: this.shareTitle || "报表详情",
  237. path: this.buildSharePath(),
  238. };
  239. },
  240. onShareTimeline() {
  241. return {
  242. title: this.shareTitle || "报表详情",
  243. query: this.buildShareQuery(),
  244. };
  245. },
  246. computed: {
  247. isLoading() {
  248. return (
  249. (this.loading && this.category == 1) ||
  250. (this._loading && this.category == 2)
  251. );
  252. },
  253. showEmptyData() {
  254. if (this.isLoading) return false;
  255. if (
  256. (this.category == 1 && this.rows.length === 0) ||
  257. (this.category == 2 && this._rows.length === 0)
  258. )
  259. return true;
  260. return false;
  261. },
  262. },
  263. methods: {
  264. safeDecode(value) {
  265. const raw = value == null ? "" : String(value);
  266. if (!raw) return "";
  267. try {
  268. return decodeURIComponent(raw);
  269. } catch (e) {
  270. return raw;
  271. }
  272. },
  273. buildShareQuery() {
  274. const id = encodeURIComponent(this.taskId || "");
  275. const title = encodeURIComponent(this.shareTitle || "");
  276. return `id=${id}&title=${title}`;
  277. },
  278. buildSharePath() {
  279. return `/traceCodePackages/traceabilityReport/pages/reportExport/detail/index?${this.buildShareQuery()}`;
  280. },
  281. selectTab(t) {
  282. if (this.isLoading) return;
  283. this.category = t.value;
  284. this.fetchList();
  285. },
  286. computeLeafCount(node) {
  287. if (!node || !node.enterpriseList || !node.enterpriseList.length)
  288. return 1;
  289. let sum = 0;
  290. node.enterpriseList.forEach((c) => {
  291. sum += this.computeLeafCount(c);
  292. });
  293. node.leafCount = sum;
  294. return sum;
  295. },
  296. processData(list) {
  297. const res = [];
  298. if (!list || !list.length) return res;
  299. list.forEach((company) => {
  300. const companyNode = {
  301. name: company.enterpriseName,
  302. customerLevel: company.customerLevel || "",
  303. customerNature: company.customerNature || "",
  304. responsibleManager: company.responsibleManager || "",
  305. totalQty: 0,
  306. expanded: false, // Default collapsed
  307. exporters: [],
  308. products: [], // Collect unique products here
  309. };
  310. const uniqueProducts = {};
  311. (company.enterpriseList || []).forEach((exp) => {
  312. const expNode = {
  313. name: exp.fromEntName,
  314. fromCustomerLevel: exp.fromCustomerLevel || "",
  315. fromCustomerNature: exp.fromCustomerNature || "",
  316. fromResponsibleManager: exp.fromResponsibleManager || "",
  317. expanded: false, // Default collapsed
  318. products: [],
  319. };
  320. const productGroups = {};
  321. (exp.enterpriseList || []).forEach((item) => {
  322. const key = (item.physicName || "") + "|" + (item.pkgSpec || "");
  323. // Collect global unique products for the company header
  324. if (!uniqueProducts[key]) {
  325. uniqueProducts[key] = {
  326. name: item.physicName,
  327. spec: item.pkgSpec || "",
  328. };
  329. }
  330. if (!productGroups[key]) {
  331. productGroups[key] = {
  332. name: item.physicName,
  333. spec: item.pkgSpec || "",
  334. batches: [],
  335. };
  336. }
  337. const { minBillTime, maxBillTime } = item;
  338. const billTime = `${formatDate(minBillTime, "YYYY-MM-DD")}——${formatDate(maxBillTime, "YYYY-MM-DD")}`;
  339. const qty = Number(item.toQty) || 0;
  340. companyNode.totalQty += qty;
  341. productGroups[key].batches.push({
  342. ...item,
  343. billTime,
  344. });
  345. });
  346. Object.values(productGroups).forEach((pg) => {
  347. expNode.products.push(pg);
  348. });
  349. companyNode.exporters.push(expNode);
  350. });
  351. companyNode.products = Object.values(uniqueProducts);
  352. res.push(companyNode);
  353. });
  354. return res;
  355. },
  356. toggleExpand(item) {
  357. this.$set(item, "expanded", !item.expanded);
  358. },
  359. toggleSubExpand(item) {
  360. this.$set(item, "expanded", !item.expanded);
  361. },
  362. copyTraceCode(code) {
  363. const text = String(code || "").trim();
  364. if (!text) {
  365. uni.showToast({ title: "无可复制内容", icon: "none" });
  366. return;
  367. }
  368. uni.setClipboardData({
  369. data: text,
  370. success: () => {
  371. uni.showToast({ title: "追溯码已复制", icon: "none" });
  372. },
  373. });
  374. },
  375. onTableScrollToLower(e) {
  376. if (e?.detail?.direction === "right") return;
  377. // if (this.isLoading) return;
  378. // if (this.rows.length >= this.totalCount) return;
  379. // this.isLoading = true;
  380. // const remain = this.totalCount - this.rows.length;
  381. // const toAdd = Math.min(15, remain);
  382. // setTimeout(() => {
  383. // const more = this.rows.slice(0, toAdd);
  384. // this.rows = this.rows.concat(more);
  385. // this.isLoading = false;
  386. // }, 800);
  387. this.fetchList();
  388. },
  389. fetchList() {
  390. let obj = {
  391. pageNum: "pageNum",
  392. pageSize: "pageSize",
  393. totalCount: "totalCount",
  394. hasMore: "hasMore",
  395. fetchLoading: "fetchLoading",
  396. rows: "rows",
  397. loading: "loading",
  398. };
  399. if (this.category == 2) {
  400. obj.pageNum = "_pageNum";
  401. obj.pageSize = "_pageSize";
  402. obj.totalCount = "_totalCount";
  403. obj.hasMore = "_hasMore";
  404. obj.fetchLoading = "_fetchLoading";
  405. obj.rows = "_rows";
  406. obj.loading = "_loading";
  407. }
  408. if (this[obj.fetchLoading] || !this[obj.hasMore]) return;
  409. this[obj.fetchLoading] = true;
  410. let url = `/report/getTaskTableData`;
  411. try {
  412. request(url, {
  413. id: this.taskId,
  414. category: this.category,
  415. pageNum: this[obj.pageNum],
  416. pageSize: this[obj.pageSize],
  417. path: "/reportExport/detail/index.vue",
  418. }).then((res) => {
  419. if (res.code == 200) {
  420. const { total, list } = res.data || {};
  421. this[obj.totalCount] = total || 0;
  422. let _list = [];
  423. if (Array.isArray(list)) {
  424. _list = this.processData(list);
  425. }
  426. this[obj.rows] = [...this[obj.rows], ..._list];
  427. if (this[obj.rows].length < this[obj.totalCount]) {
  428. this[obj.hasMore] = true;
  429. this[obj.pageNum]++;
  430. } else {
  431. this[obj.hasMore] = false;
  432. }
  433. }
  434. this[obj.fetchLoading] = false;
  435. this[obj.loading] = false;
  436. });
  437. } catch (res) {
  438. console.log(res);
  439. this[obj.fetchLoading] = false;
  440. this[obj.loading] = false;
  441. }
  442. // this.rows = [];
  443. // setTimeout(() => {
  444. // const n = Math.min(15, this.totalCount);
  445. // this.rows = this.buildRows(this.genHierData()).slice(0, n);
  446. // this.fetchLoading = false;
  447. // }, 1000);
  448. },
  449. },
  450. };
  451. </script>
  452. <style scoped>
  453. .detail-page {
  454. box-sizing: border-box;
  455. padding: 24rpx;
  456. position: relative;
  457. min-height: 100vh;
  458. background: #f3f6f9;
  459. padding-bottom: calc(50rpx + env(safe-area-inset-bottom));
  460. }
  461. .grid-scroll {
  462. padding-bottom: 80rpx;
  463. }
  464. .tabs {
  465. display: flex;
  466. align-items: center;
  467. background: #fff;
  468. border-radius: 90rpx;
  469. padding: 10rpx;
  470. margin-bottom: 30rpx;
  471. }
  472. .tab {
  473. flex: 1;
  474. height: 70rpx;
  475. display: flex;
  476. align-items: center;
  477. justify-content: center;
  478. padding: 0 24rpx;
  479. border-radius: 70rpx;
  480. font-size: 28rpx;
  481. color: #333;
  482. }
  483. .tab+.tab {
  484. margin-left: 12rpx;
  485. }
  486. .tab.active {
  487. background: #2c69ff;
  488. color: #fff;
  489. }
  490. .card {
  491. position: relative;
  492. margin-top: 12rpx;
  493. font-size: 30rpx;
  494. overflow: hidden;
  495. }
  496. /* New Card Styles */
  497. .card-list {
  498. padding: 24rpx;
  499. background: #f5f7fa;
  500. min-height: 100vh;
  501. }
  502. .company-card {
  503. background: #fff;
  504. border-radius: 16rpx;
  505. margin-bottom: 24rpx;
  506. overflow: hidden;
  507. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05);
  508. }
  509. .company-header {
  510. padding: 24rpx 30rpx;
  511. background: #fff;
  512. display: flex;
  513. justify-content: space-between;
  514. align-items: center;
  515. border-bottom: 1rpx solid #f0f0f0;
  516. }
  517. .company-title {
  518. display: flex;
  519. flex-direction: column;
  520. }
  521. .company-name {
  522. font-size: 32rpx;
  523. font-weight: bold;
  524. color: #333;
  525. margin-bottom: 8rpx;
  526. }
  527. .company-products {
  528. margin-bottom: 8rpx;
  529. }
  530. .company-meta {
  531. margin-bottom: 8rpx;
  532. }
  533. .company-meta-row {
  534. display: flex;
  535. align-items: center;
  536. justify-content: space-between;
  537. margin-bottom: 6rpx;
  538. }
  539. .company-meta-row:last-child {
  540. margin-bottom: 0;
  541. }
  542. .company-meta-item {
  543. font-size: 26rpx;
  544. color: #666;
  545. margin-right: 24rpx;
  546. display: inline-block;
  547. }
  548. .company-product-item {
  549. font-size: 26rpx;
  550. color: #666;
  551. margin-right: 16rpx;
  552. display: inline-block;
  553. }
  554. .company-total {
  555. font-size: 24rpx;
  556. color: #999;
  557. }
  558. .company-body {
  559. background: #fff;
  560. padding: 0 24rpx 24rpx;
  561. }
  562. .exporter-section {
  563. margin-top: 24rpx;
  564. border: 1rpx solid #eef0f4;
  565. border-radius: 12rpx;
  566. overflow: hidden;
  567. }
  568. .exporter-title {
  569. background: #f8f9fb;
  570. padding: 16rpx 24rpx;
  571. font-size: 28rpx;
  572. font-weight: 600;
  573. color: #333;
  574. display: flex;
  575. justify-content: space-between;
  576. align-items: center;
  577. border-bottom: 1rpx solid #eef0f4;
  578. }
  579. .exporter-meta {
  580. background: #f8f9fb;
  581. padding: 8rpx 24rpx 16rpx;
  582. border-bottom: 1rpx solid #eef0f4;
  583. }
  584. .exporter-meta-row {
  585. display: flex;
  586. align-items: center;
  587. justify-content: space-between;
  588. margin-bottom: 6rpx;
  589. }
  590. .exporter-meta-row:last-child {
  591. margin-bottom: 0;
  592. }
  593. .exporter-meta-item {
  594. font-size: 26rpx;
  595. color: #666;
  596. margin-right: 24rpx;
  597. display: inline-block;
  598. }
  599. .product-group {
  600. padding: 0;
  601. }
  602. .product-header {
  603. padding: 16rpx 24rpx;
  604. display: flex;
  605. justify-content: space-between;
  606. font-size: 26rpx;
  607. color: #666;
  608. border-bottom: 1rpx solid #f0f0f0;
  609. }
  610. .batch-scroll {
  611. width: 100%;
  612. }
  613. .batch-table {
  614. min-width: 1550rpx;
  615. }
  616. .batch-header-row {
  617. display: flex;
  618. background: #f7f9fc;
  619. color: #2c69ff;
  620. }
  621. .batch-row {
  622. display: flex;
  623. border-bottom: 1rpx solid #f0f0f0;
  624. }
  625. .batch-row:nth-child(even) {
  626. background-color: #f7f9fc;
  627. }
  628. .batch-row:last-child {
  629. border-bottom: none;
  630. }
  631. .th-cell {
  632. padding: 16rpx 10rpx;
  633. font-size: 24rpx;
  634. text-align: center;
  635. flex-shrink: 0;
  636. font-weight: 600;
  637. }
  638. .td-cell {
  639. padding: 16rpx 10rpx;
  640. font-size: 24rpx;
  641. color: #333;
  642. text-align: center;
  643. flex-shrink: 0;
  644. word-break: break-all;
  645. display: flex;
  646. align-items: center;
  647. justify-content: center;
  648. }
  649. .col-batch {
  650. width: 220rpx;
  651. }
  652. .col-region {
  653. width: 180rpx;
  654. }
  655. .col-qty {
  656. width: 210rpx;
  657. }
  658. .col-time {
  659. width: 340rpx;
  660. }
  661. .col-code {
  662. width: 280rpx;
  663. }
  664. .copyable-code {
  665. color: #2c69ff;
  666. }
  667. .loading-row {
  668. padding: 24rpx;
  669. display: flex;
  670. justify-content: center;
  671. }
  672. .loading-wrapper {
  673. position: sticky;
  674. top: 50%;
  675. left: 0;
  676. width: calc(100vw - 48rpx);
  677. height: 76rpx;
  678. display: flex;
  679. align-items: center;
  680. justify-content: center;
  681. }
  682. .loading-icon {
  683. width: 40rpx;
  684. height: 40rpx;
  685. animation: spin 1s linear infinite;
  686. }
  687. @keyframes spin {
  688. from {
  689. transform: rotate(0deg);
  690. }
  691. to {
  692. transform: rotate(360deg);
  693. }
  694. }
  695. .empty-data,
  696. .loading-wrap {
  697. position: absolute;
  698. left: 0;
  699. top: 280rpx;
  700. z-index: 91;
  701. width: 100%;
  702. background-color: transparent;
  703. border-bottom-left-radius: 16rpx;
  704. border-bottom-right-radius: 16rpx;
  705. }
  706. .empty-data {
  707. top: 280rpx;
  708. display: flex;
  709. align-items: center;
  710. justify-content: center;
  711. background-color: transparent;
  712. }
  713. </style>