Browse Source

feat: 更新

贺智杰 4 days ago
parent
commit
774e033dc5

+ 1 - 1
traceCodePackages/traceabilityCodeQuery/pages/detail/index.vue

@@ -412,7 +412,7 @@ export default {
   width: 2rpx;
   flex: 1;
   background: #8face68f;
-  margin-right: 5rpx;
+  margin-right: 2rpx;
 }
 
 .detail-right {

+ 2 - 2
traceCodePackages/traceabilityCodeQuery/pages/index.vue

@@ -46,9 +46,9 @@
     <view v-else-if="!loading" style="margin-top: 20rpx;">
       <Empty text="暂无扫码历史" />
     </view>
-    <view class="loading-view" v-else="loading">
+    <view class="loading-view" v-else>
       <image class="loading-icon" src="../../static/images/loading.png" mode="scaleToFill"
-        :style="{ width: '66rpx', height: '50rpx' }" />
+        :style="{ width: '50rpx', height: '50rpx' }" />
     </view>
   </scroll-view>
 </template>

+ 84 - 63
traceCodePackages/traceabilityReport/pages/blacklist/detail/index.vue

@@ -1,72 +1,47 @@
 <template>
   <!-- <Water></Water> -->
   <view class="nav" :style="{ paddingTop: statusBarHeight + 'px' }">
-    <text
-      class="nav-back"
-      :style="{ top: statusBarHeight + 'px' }"
-      @click="onBack"
-    ></text>
+    <text class="nav-back" :style="{ top: statusBarHeight + 'px' }" @click="onBack"></text>
     <view class="nav-title">{{ title }}</view>
   </view>
   <view class="page">
-    <view class="tip">点击“上游客户”名称展开详细表格</view>
-    <view
-      class="list-container"
-      :style="{ paddingTop: statusBarHeight + 60 + 'px' }"
-    >
-      <view
-        class="card product-card"
-        v-for="(prd, i) in products"
-        :key="'prd-' + i"
-      >
-        <view
-          class="customer-row"
-          v-for="(c, j) in prd.customers"
-          :key="'cust-' + j"
-        >
-          <text class="customer-label">上游客户:</text>
-          <text class="customer-name" @click.stop="toggleCustomer(i, j)">{{
-            c.name
-          }}</text>
-          <text class="expand-tag" @click.stop="toggleCustomer(i, j)">{{
-            c.expanded ? "收起" : "展开"
-          }}</text>
-        </view>
-        <view
-          class="table-card"
-          v-for="(c, j) in prd.customers"
-          :key="'tbl-' + j"
-          v-show="c.expanded"
-        >
-          <scroll-view scroll-x="true" class="table-scroll">
-            <view class="blk-table">
-              <view class="blk-header">
-                <view class="th col-region">货源片区</view>
-                <view class="th col-qty">数量</view>
-                <view class="th col-batch">批号</view>
-                <view class="th col-sample">监管码样本(抽样)</view>
-                <view class="th col-terminal">终端到达数量</view>
-              </view>
-              <view class="blk-body">
-                <view
-                  class="blk-row"
-                  v-for="(row, idx) in c.details"
-                  :key="'row-' + idx"
-                >
-                  <view class="td col-region">{{ row.region }}</view>
-                  <view class="td col-qty">{{ row.quantity }}</view>
-                  <view class="td col-batch">{{ row.batchNo }}</view>
-                  <view class="td col-sample">{{ row.sample }}</view>
-                  <view class="td col-terminal">{{ row.arrivalQty }}</view>
+    <view class="list-container" :style="{ paddingTop: statusBarHeight + 60 + 'px' }">
+      <view class="tip">点击客户名称展开详细表格</view>
+      <view v-for="(prd, i) in products" :key="'prd-' + i">
+        <view class="section-title">感冒灵</view>
+        <view class="card product-card">
+          <view class="customer-row" v-for="(c, j) in prd.customers" :key="'cust-' + j">
+            <text class="customer-label">上游客户:</text>
+            <text class="customer-name" @click.stop="toggleCustomer(i, j)">{{
+              c.name
+              }}</text>
+            <text class="expand-tag" @click.stop="toggleCustomer(i, j)">{{
+              c.expanded ? "收起" : "展开"
+              }}</text>
+          </view>
+          <view class="table-card" v-for="(c, j) in prd.customers" :key="'tbl-' + j" v-show="c.expanded">
+            <scroll-view scroll-x="true" class="table-scroll">
+              <view class="blk-table">
+                <view class="blk-header">
+                  <view class="th col-region">货源片区</view>
+                  <view class="th col-qty">数量</view>
+                  <view class="th col-batch">批号</view>
+                  <view class="th col-sample">监管码样本(抽样)</view>
+                  <view class="th col-terminal">终端到达数量</view>
+                </view>
+                <view class="blk-body">
+                  <view class="blk-row" v-for="(row, idx) in c.details" :key="'row-' + idx">
+                    <view class="td col-region">{{ row.region }}</view>
+                    <view class="td col-qty">{{ row.quantity }}</view>
+                    <view class="td col-batch">{{ row.batchNo }}</view>
+                    <view class="td col-sample">{{ row.sample }}</view>
+                    <view class="td col-terminal">{{ row.arrivalQty }}</view>
+                  </view>
+                  <view v-if="!c.details || c.details.length === 0" class="empty-row">暂无数据</view>
                 </view>
-                <view
-                  v-if="!c.details || c.details.length === 0"
-                  class="empty-row"
-                  >暂无数据</view
-                >
               </view>
-            </view>
-          </scroll-view>
+            </scroll-view>
+          </view>
         </view>
       </view>
     </view>
@@ -98,7 +73,7 @@ export default {
     onBack() {
       try {
         uni.navigateBack();
-      } catch (e) {}
+      } catch (e) { }
     },
     toggleCustomer(i, j) {
       const cur = this.products[i].customers[j];
@@ -147,11 +122,13 @@ export default {
   justify-content: center;
   z-index: 10;
 }
+
 .nav-title {
   font-size: 36rpx;
   color: #fff;
   font-weight: 700;
 }
+
 .nav-back {
   position: absolute;
   left: 40rpx;
@@ -165,19 +142,42 @@ export default {
   margin-left: 40rpx;
   margin-top: -6rpx;
 }
+
 .page {
   min-height: 100vh;
   background: #f3f6f9;
 }
+
+.section-title {
+  position: relative;
+  font-size: 30rpx;
+  font-weight: bold;
+  color: #2c69ff;
+  margin-left: 24rpx;
+}
+
+.section-title::after {
+  content: "";
+  position: absolute;
+  left: -20rpx;
+  bottom: 11rpx;
+  width: 8rpx;
+  height: 50%;
+  background: #2c69ff;
+  border-radius: 10px;
+}
+
 .tip {
   font-size: 24rpx;
   color: #999;
   padding: 24rpx;
 }
+
 .list-container {
   padding: 0 24rpx 24rpx;
   box-sizing: border-box;
 }
+
 .card {
   margin: 24rpx;
   background: #fff;
@@ -185,51 +185,62 @@ export default {
   font-size: 30rpx;
   box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
 }
+
 .product-card {
   padding: 24rpx;
 }
+
 .product-title {
   font-size: 32rpx;
   font-weight: bold;
   color: #333;
   margin-bottom: 16rpx;
 }
+
 .customer-row {
   display: flex;
   align-items: center;
   padding: 12rpx 0;
   border-bottom: 1rpx solid #f0f0f0;
 }
+
 .customer-row:last-child {
   border-bottom: none;
 }
+
 .customer-label {
   font-size: 28rpx;
   color: #666;
   margin-right: 10rpx;
 }
+
 .customer-name {
   font-size: 28rpx;
   color: #2c69ff;
 }
+
 .expand-tag {
   margin-left: auto;
   font-size: 26rpx;
   color: #2c69ff;
 }
+
 .table-card {
   padding: 0;
   overflow: hidden;
   margin-top: 16rpx;
 }
+
 .table-scroll {
   width: 100%;
 }
+
 .blk-table {
-  min-width: 1200rpx;
+  min-width: 1060rpx;
   border-top: 1rpx solid #eee;
   border-left: 1rpx solid #eee;
 }
+
 .blk-header {
   display: flex;
   background: #f5f7fa;
@@ -237,14 +248,17 @@ export default {
   font-weight: bold;
   color: #333;
 }
+
 .blk-body {
   font-size: 26rpx;
   color: #666;
 }
+
 .blk-row {
   display: flex;
   border-bottom: 1rpx solid #eee;
 }
+
 .th,
 .td {
   padding: 16rpx 10rpx;
@@ -257,26 +271,33 @@ export default {
   box-sizing: border-box;
   flex-shrink: 0;
 }
+
 .th {
   border-bottom: 1rpx solid #eee;
 }
+
 .empty-row {
   padding: 30rpx;
   text-align: center;
   color: #999;
 }
+
 .col-region {
   width: 200rpx;
 }
+
 .col-qty {
   width: 140rpx;
 }
+
 .col-batch {
   width: 200rpx;
 }
+
 .col-sample {
   width: 300rpx;
 }
+
 .col-terminal {
   width: 220rpx;
 }

+ 0 - 10
traceCodePackages/traceabilityReport/pages/ganmaoling/detail/index.vue

@@ -190,16 +190,6 @@ export default {
 	font-size: 32rpx;
 }
 
-/* .section-title {
-	font-size: 32rpx;
-	font-weight: bold;
-	color: #333;
-	margin: 30rpx 24rpx 20rpx;
-	padding-left: 16rpx;
-	border-left: 8rpx solid #2c69ff;
-	line-height: 1;
-} */
-
 .section-title {
 	position: relative;
 	font-size: 32rpx;

+ 23 - 39
traceCodePackages/traceabilityReport/pages/ganmaoling/index.vue

@@ -1,41 +1,24 @@
 <template>
   <view class="detail-page">
-    <view class="tip"
-      >数据更新时间:{{
-        formatDate(
-          new Date().setDate(new Date().getDate() - 1),
-          "YYYY-MM-DD",
-        ) || "--"
-      }}</view
-    >
-
-    <scroll-view
-      class="list-scroll"
-      scroll-y="true"
-      refresher-enabled
-      :refresher-triggered="isRefreshing"
-      @refresherrefresh="onRefresh"
-      @scrolltolower="onLoadMore"
-    >
+    <view class="tip">数据更新时间:{{
+      formatDate(
+        new Date().setDate(new Date().getDate() - 1),
+        "YYYY-MM-DD",
+      ) || "--"
+    }}</view>
+
+    <scroll-view class="list-scroll" scroll-y="true" refresher-enabled :refresher-triggered="isRefreshing"
+      @refresherrefresh="onRefresh" @scrolltolower="onLoadMore">
       <view class="list-container">
-        <view
-          class="card-item"
-          v-for="(item, index) in rows"
-          :key="index"
-          @click="toDetail(item)"
-        >
+        <view class="card-item" v-for="(item, index) in rows" :key="index" @click="toDetail(item)">
           <view class="left-info">
-            <view class="row1-name"
-              >{{ item.receiverName }}
-              <view
-                class="level-tag"
-                :class="getLevelClass(item.customerLevel)"
-              >
-                {{ item.customerLevel }}
-              </view></view
-            >
+            <view class="row1-name">{{ item.receiverName }}
+            </view>
             <view class="row2-info">
               <text class="province">{{ item.receiverProvince }}</text>
+              <text class="level-tag" :class="getLevelClass(item.customerLevel)">
+                {{ item.customerLevel }}
+              </text>
             </view>
             <view class="row3-nature">{{ item.customerNature }}</view>
             <view class="row4-manager">{{ item.manager }}</view>
@@ -47,10 +30,7 @@
         </view>
 
         <view class="loading-more" v-if="loading">
-          <image
-            class="loading-icon"
-            src="../../../static/images/loading.png"
-          />
+          <image class="loading-icon" src="../../../static/images/loading.png" />
         </view>
 
         <view v-if="!loading && rows.length === 0" class="empty-data">
@@ -193,7 +173,8 @@ export default {
 
 .list-scroll {
   flex: 1;
-  height: 0; /* Important for flex expansion */
+  height: 0;
+  /* Important for flex expansion */
   padding: 0 24rpx;
   box-sizing: border-box;
 }
@@ -207,7 +188,8 @@ export default {
 .card-item {
   display: flex;
   justify-content: space-between;
-  align-items: flex-start; /* Align top */
+  align-items: flex-start;
+  /* Align top */
   background: #fff;
   border-radius: 16rpx;
   padding: 30rpx;
@@ -276,7 +258,8 @@ export default {
 .right-info {
   display: flex;
   align-items: center;
-  align-self: center; /* Center vertically relative to card */
+  align-self: center;
+  /* Center vertically relative to card */
 }
 
 .alert-count {
@@ -319,6 +302,7 @@ export default {
   from {
     transform: rotate(0deg);
   }
+
   to {
     transform: rotate(360deg);
   }