贺智杰 2 дней назад
Родитель
Сommit
a4d089ad52

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

@@ -60,7 +60,7 @@
           <view class="detail-title" :class="{'detail-bold': i == 0}">{{ value.entName }}</view>
           <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 detail-text-red" v-if="!!value.inBoundBillsTime">
+            <view class="detail-extra-item" v-if="!!value.inBoundBillsTime">
               <image src="../../../static/images/warehousing.png" mode="scaleToFill"
                 :style="{ width: '34rpx', height: '34rpx', marginTop: '4rpx' }" />
               <text>{{ value.inBoundTypeName }}:{{

+ 3 - 3
traceCodePackages/traceabilityReport/pages/customerScanningRate/detail/index.vue

@@ -17,7 +17,7 @@
       </view>
       <view class="meta">
         <view class="dot"></view>
-        <text class="meta-text">品种:{{ physicName }}</text>
+        <text class="meta-text">品种:{{ physicName || '全品种' }}</text>
       </view>
       <view class="meta">
         <view class="dot"></view>
@@ -114,8 +114,8 @@ export default {
     this.regionCode = options.regionCode || "";
     this.drugEntBaseInfoId = options.drugEntBaseInfoId || "";
     this.scanType = options.scanType || "1";
-    this.physicName = decodeURIComponent(options.physicName || "--");
-    this.regionName = decodeURIComponent(options.regionName || "--");
+    this.physicName = decodeURIComponent(options.physicName || "");
+    this.regionName = decodeURIComponent(options.regionName || "");
     this.customerLevel =
       this.scanType == 1 ? "VIP" : this.scanType == 2 ? "二级" : "三级";
     this.getCustomerInfo();

+ 6 - 0
traceCodePackages/traceabilityReport/pages/customerScanningRate/index.vue

@@ -61,6 +61,7 @@ export default {
                   <view>入库扫码率</view>
                 </view>`,
           width: "165rpx",
+          unit: '%'
         },
         {
           key: "oneOutScanRate",
@@ -69,6 +70,7 @@ export default {
                   <view>出库扫码率</view>
                 </view>`,
           width: "165rpx",
+          unit: '%'
         },
         {
           key: "twoCustomerInScanRate",
@@ -77,6 +79,7 @@ export default {
                   <view>入库扫码率</view>
                 </view>`,
           width: "165rpx",
+          unit: '%'
         },
         {
           key: "twoCustomerOutScanRate",
@@ -85,6 +88,7 @@ export default {
                   <view>出库扫码率</view>
                 </view>`,
           width: "165rpx",
+          unit: '%'
         },
         {
           key: "threeCustomerInScanRate",
@@ -93,6 +97,7 @@ export default {
                   <view>入库扫码率</view>
                 </view>`,
           width: "165rpx",
+          unit: '%'
         },
         {
           key: "threeCustomerOutScanRate",
@@ -101,6 +106,7 @@ export default {
                   <view>出库扫码率</view>
                 </view>`,
           width: "165rpx",
+          unit: '%'
         },
       ],
       products: [],

+ 22 - 13
traceCodePackages/traceabilityReport/pages/customerScanningRate/wigets/ScanRateTable.vue

@@ -53,7 +53,7 @@
             </view>
             <scroll-view scroll-y="true" class="dropdown-scroll-view" lower-threshold="80"
               @scrolltolower="loadMoreProducts">
-              <view class="dropdown-item" v-for="(p, i) in productList" :key="getUid()" :style="p.drugEntBaseInfoId === product?.drugEntBaseInfoId || (!product?.drugEntBaseInfoId &&i == 0)
+              <view class="dropdown-item" v-for="(p, i) in productList" :key="getUid()" :style="p.drugEntBaseInfoId === product?.drugEntBaseInfoId || (!product?.drugEntBaseInfoId && i == 0)
                 ? {
                   backgroundColor: '#2c69ff',
                   color: '#fff',
@@ -104,7 +104,8 @@
               <view class="row" v-for="(item, i) in list" :key="getUid()">
                 <view v-for="(col, ci) in columns" :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] || "--" }}</view>
+                  :style="bodyCellStyle(ci, col)" @click="handleClick(item, col)">{{ item[col.key] ? (item[col.key] +
+                    (col.unit || '')) : '--' }}</view>
               </view>
               <view class="row loading-row" v-if="hasmore">
                 <view class="loading-wrapper">
@@ -184,14 +185,17 @@ export default {
         {
           key: "totalInRate",
           title: "入库扫码率",
+          unit: '%'
         },
         {
           key: "totalOutRate",
           title: "出库扫码率",
+          unit: '%'
         },
         {
           key: "totalSelfExaminationRate",
           title: "自验证率",
+          unit: '%'
         },
       ],
     },
@@ -207,10 +211,6 @@ export default {
       type: String,
       default: "76rpx",
     },
-    tableWidth: {
-      type: String,
-      default: "100%",
-    },
     headerFontSize: {
       type: String,
       default: "32rpx",
@@ -227,6 +227,11 @@ export default {
       type: String,
       default: "#2c69ff",
     },
+    //若需要横向滚动且左侧固定,则tableWidth需等于columns所有width之和(可以略小于)
+    tableWidth: {
+      type: String,
+      default: "100%",
+    },
     columns: {
       type: Array,
       default: () => [
@@ -234,7 +239,7 @@ export default {
           key: "regionName",
           title: "区域",
           underline: true,
-          fixed: false,
+          fixed: true,
           width: "",
         },
         {
@@ -244,6 +249,7 @@ export default {
           width: "",
           tooltip:
             "客户出库扫码量(与下游入库单中相同的追溯码)/下游企业入库扫码量",
+          unit: '%'
         },
         {
           key: "inScanRate",
@@ -252,6 +258,7 @@ export default {
           width: "",
           tooltip:
             "客户入库扫码量(与上游出库单中相同的追溯码)/上游企业出库扫码量",
+          unit: '%'
         },
         {
           key: "selfExaminationRate",
@@ -259,6 +266,7 @@ export default {
           fixed: false,
           width: "",
           tooltip: "客户出库扫码量(与入库单中相同的追溯码)/入库扫码量",
+          unit: '%'
         },
       ],
     },
@@ -392,7 +400,7 @@ export default {
     getUid,
     getSummary(col, ci) {
       if (ci == 0) return "合计";
-      return this.summaryData[ci];
+      return this.summaryData[ci] + (col.unit || '');
     },
     closeAllTooltip() {
       this.headerTooltip = {};
@@ -539,7 +547,7 @@ export default {
               : [...this.list];
             if (this.list.length < this.totalCount) {
               this.hasmore = true;
-              this.pageNum++;
+              this.tablePage++;
             } else {
               this.hasmore = false;
             }
@@ -567,6 +575,7 @@ export default {
       base.position = "sticky";
       base.zIndex = 2;
       base.top = "0rpx";
+      base.background = "#eaf2ff";
       // base.display = 'flex';
       // base.alignItems = 'center';
       // base.justifyContent = 'center';
@@ -575,7 +584,6 @@ export default {
       }
       if (col.fixed) {
         base.left = this.stickyLeft(ci);
-        base.background = "#eaf2ff";
       }
       return base;
     },
@@ -642,9 +650,9 @@ export default {
           "&regionName=" +
           encodeURIComponent(data.regionName) +
           "&drugEntBaseInfoId=" +
-          data.druGentBaseInfoId +
+          (data.druGentBaseInfoId || '') +
           "&physicName=" +
-          encodeURIComponent(data.name) +
+          encodeURIComponent(data.name || '') +
           "&scanType=" +
           this.scanType +
           (this.params.type ? "&type=" + this.params.type : ""),
@@ -807,7 +815,7 @@ export default {
 } */
 .row {
   display: flex;
-  align-items: center;
+  align-items: stretch;
   border-bottom: 1rpx solid #eef0f4;
 }
 
@@ -861,6 +869,7 @@ export default {
 
 .table-body .cell {
   background-color: #fff;
+  text-align: center;
 }
 
 .table-body .striped {