index.vue 23 KB

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