Browse Source

feat: 更新

贺智杰 2 ngày trước cách đây
mục cha
commit
8efc468f0a

+ 3 - 56
traceCodePackages/traceabilityCodeQuery/pages/detail/index.vue

@@ -14,7 +14,7 @@
         </view>
       </view>
 
-      <view class="detail-row detail-baseline">
+      <view class="detail-row">
         <view class="detail-label">生产企业:</view>
         <view class="detail-value detail-wrap detail-company-value" :class="{ 'detail-clamp': !isExpanded }"
           :style="{ marginBottom: needToggle ? '40rpx' : undefined }" id="companyValue">
@@ -62,8 +62,8 @@
           <view class="detail-desc">[{{ value.entTypeName }}]&nbsp;{{ getRegion(value) }}</view>
           <view class="detail-extra" v-if="!!value.inBoundBillsTime || !!value.outBoundBillsTime">
             <view class="detail-extra-item" v-if="!!value.inBoundBillsTime">
-              <image src="../../../static/images/warehousing.png" mode="scaleToFill"
-                :style="{ width: '34rpx', height: '34rpx', marginTop: '4rpx' }" />
+              <!-- <image src="../../../static/images/warehousing.png" mode="scaleToFill"
+                :style="{ width: '34rpx', height: '34rpx', marginTop: '4rpx' }" /> -->
               <text>{{ value.inBoundTypeName }}:{{
                 formatDate(value.inBoundBillsTime)
                 }}</text>
@@ -79,55 +79,6 @@
           </view>
         </view>
       </view>
-      <!-- <view class="detail-timeline-item">
-        <view class="detail-left">
-          <view class="detail-dot"></view>
-          <view class="detail-line"></view>
-        </view>
-        <view class="detail-right">
-          <view class="detail-title">丰沃达医药物流(安徽)有限公司</view>
-          <view class="detail-desc">批发企业-坐标:安徽省,合肥市</view>
-          <view class="detail-extra">
-            <view class="detail-extra-item detail-text-red">
-              <text>退货入库:2025-12-12</text>
-            </view>
-            <view class="detail-extra-item">销售出库:2025-12-12</view>
-          </view>
-        </view>
-      </view>
-      <view class="detail-timeline-item">
-        <view class="detail-left">
-          <view class="detail-dot"></view>
-          <view class="detail-line"></view>
-        </view>
-        <view class="detail-right">
-          <view class="detail-title"
-            >安庆市百姓缘东苑连锁有限公司龙眠山路店</view
-          >
-          <view class="detail-desc"
-            >零售企业-坐标:安徽省,安庆市,宜秀区,高店乡,安徽省,安庆市,宜秀区,高店乡,安徽省,安庆市,宜秀区,高店乡</view
-          >
-        </view>
-      </view>
-      <view class="detail-timeline-item">
-        <view class="detail-left">
-          <view class="detail-dot"></view>
-        </view>
-        <view class="detail-right" :style="{ borderBottom: 'none' }">
-          <view class="detail-title"
-            >安庆市百姓缘东苑连锁有限公司龙眠山路店</view
-          >
-          <view class="detail-desc"
-            >零售企业-坐标:安徽省,安庆市,宜秀区,高店乡</view
-          >
-          <view class="detail-extra">
-            <view class="detail-extra-item">
-              <text>无入库信息</text>
-            </view>
-            <view class="detail-extra-item">销售出库:2025-12-12</view>
-          </view>
-        </view>
-      </view> -->
     </view>
   </view>
   <view class="detail-page-empty" :style="{ height: pageHeight }" v-if="!data && !loading">
@@ -287,11 +238,7 @@ export default {
 .detail-row {
   position: relative;
   display: flex;
-  align-items: center;
   margin-top: 12rpx;
-}
-
-.detail-row.detail-baseline {
   align-items: baseline;
 }
 

+ 4 - 4
traceCodePackages/traceabilityReport/pages/customerScanningRate/index.vue

@@ -17,13 +17,13 @@
 
     <view class="scan-rate-content">
       <ScanRateTable ref="scanTableVip" title="VIP客户扫码率" :api="`/bills/getVipScanRate`" :params="{
-        type: activeRange + '',
+        type: activeRange + '', pageSize: 40
       }" scanType="1" :products="products" @dropdown-open="closeDropdown" tableType="VIP" headerFontSize="28rpx" />
       <ScanRateTable ref="scanTableL2" title="二级客户扫码率" :api="`/bills/getSecondCustomerScanRate`" :params="{
-        type: activeRange + '',
+        type: activeRange + '', pageSize: 40
       }" scanType="2" :products="products" @dropdown-open="closeDropdown" tableType="二级" headerFontSize="28rpx" />
       <ScanRateTable ref="scanTableL3" title="三级客户扫码率" :api="`/bills/getThreeCustomerScanRate`" :params="{
-        type: activeRange + '',
+        type: activeRange + '', pageSize: 40
       }" scanType="3" :products="products" @dropdown-open="closeDropdown" tableType="三级" headerFontSize="28rpx" />
       <ScanRateTable ref="scanTableVariety" title="品种扫码率" :columns="varietyColumns" tableWidth="1200rpx"
         headerFontSize="24rpx" bodyFontColor="#000" :api="`/bills/geVarietyScanRate`" tableType="variety" :params="{
@@ -128,7 +128,7 @@ export default {
       }).then(res => {
         if (res.code == 200) {
           const _data = res.data;
-          this.regions = [{ regionCode: null, regionName: '全省份' }, ..._data];
+          this.regions = [{ regionCode: null, regionName: '全片区' }, ..._data];
         }
       })
     },

+ 20 - 8
traceCodePackages/traceabilityReport/pages/customerScanningRate/wigets/ScanRateTable.vue

@@ -9,7 +9,7 @@
         <view v-if="showSelector && tableType === 'variety'" class="selector-wrap">
           <view class="selector" @click.stop="toggleDropdownRegion">
             <text class="selector-text">{{
-              region?.regionCode ? region.regionName : "选择"
+              region?.regionCode ? region.regionName : "选择片区"
             }}</text>
             <text class="selector-arrow" :class="{ open: dropdownRegionOpen }"></text>
           </view>
@@ -80,7 +80,7 @@
             zIndex: 10,
             fontWeight: headerBold ? 'bold' : 'normal',
           }">
-            <view v-for="(col, ci) in columns" :key="getUid()" class="cell" :style="{
+            <view v-for="(col, ci) in columnList" :key="getUid()" class="cell" :style="{
               ...headerCellStyle(ci, col),
             }">
               <view v-if="isPlainTitle(col.title)" :style="{
@@ -102,10 +102,9 @@
           <view v-if="!loading && list && list.length > 0" class="table-body">
             <template>
               <view class="row" v-for="(item, i) in list" :key="getUid()">
-                <view v-for="(col, ci) in columns" :key="getUid()" class="cell"
+                <view v-for="(col, ci) in columnList" :key="getUid()" class="cell"
                   :class="{ underline: col.underline, striped: striped && (i + 1) % 2 === 0 }"
-                  :style="bodyCellStyle(ci, col)" @click="handleClick(item, col)">{{ item[col.key] ? (item[col.key] +
-                    (col.unit || '')) : '--' }}</view>
+                  :style="bodyCellStyle(ci, col)" @click="handleClick(item, col)">{{ renderCell(item, col) }}</view>
               </view>
               <view class="row loading-row" v-if="hasmore">
                 <view class="loading-wrapper">
@@ -120,7 +119,7 @@
                 borderTop: '1rpx solid #eef0f4',
                 color: summaryFontColor,
               }">
-                <view v-for="(col, ci) in columns" :key="getUid()" class="cell" :style="{
+                <view v-for="(col, ci) in columnList" :key="getUid()" class="cell" :style="{
                   ...bodyCellStyle(ci, col),
                   fontWeight: summaryBold ? 'bold' : 'normal',
                 }">{{ getSummary(col, ci) }}</view>
@@ -307,6 +306,13 @@ export default {
     tableBodyHeight() {
       return 6 * 80;
     },
+    columnList() {
+      if(this.params) {
+        const type = this.params?.type
+        if(type === '1' || type === '2') return this.columns.filter(i => i.key !== 'selfExaminationRate');
+      }
+        return this.columns
+    }
   },
   watch: {
     dropdownRegionOpen(val) {
@@ -373,6 +379,12 @@ export default {
     this.fetchList();
   },
   methods: {
+    renderCell(item, col) {
+      if (!item[col.key]) return '--';
+      const reg = /rate/i;
+      if(reg.test(col.key)) return (Math.floor(Number(item[col.key])) + (col.unit || ''));
+      return item[col.key];
+    },
     initRegionList() {
       this.regionList = this.filteredRegions.slice(0, 10);
     },
@@ -400,7 +412,7 @@ export default {
     getUid,
     getSummary(col, ci) {
       if (ci == 0) return "合计";
-      return this.summaryData[ci] + (col.unit || '');
+      return Math.floor(Number(this.summaryData[ci])) + (col.unit || '');
     },
     closeAllTooltip() {
       this.headerTooltip = {};
@@ -516,10 +528,10 @@ export default {
         request(this.api, {
           drugEntBaseInfoId: this.product ? (this.product?.drugEntBaseInfoId || '') : '',
           regionCode: this.region ? (this.region?.regionCode || '') : '',
-          ...(this.params || {}),
           pageNum: this.tablePage,
           pageSize: this.tablePageSize,
           path: 'customerScanningRate/wigets/ScanRateTable.vue',
+          ...(this.params || {}),
         }).then(res => {
           if (res.code == 200) {
             const _data = res.data || {};